From 5b539e73b6e090aae5491ffadb9521c809908e7d Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Sat, 3 Oct 2020 16:06:14 +0530 Subject: [PATCH 01/24] Add EmitTypedEvent in events --- types/events.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/types/events.go b/types/events.go index d334d3d60b6f..ce120344a7fc 100644 --- a/types/events.go +++ b/types/events.go @@ -1,10 +1,13 @@ package types import ( + "encoding/json" "fmt" "sort" "strings" + "github.com/cosmos/cosmos-sdk/codec" + proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" ) @@ -39,6 +42,41 @@ func (em EventManager) ABCIEvents() []abci.Event { return em.events.ToABCIEvents() } +func (em *EventManager) EmitTypedEvent(event proto.Message) error { + evtType := proto.MessageName(event) + evtJSON, err := codec.ProtoMarshalJSON(event) + if err != nil { + return err + } + + var attrMap map[string]json.RawMessage + err = json.Unmarshal(evtJSON, &attrMap) + if err != nil { + return err + } + + var attrs []abci.EventAttribute + for k, v := range attrMap { + attrs = append(attrs, abci.EventAttribute{ + Key: []byte(k), + Value: v, + }) + } + + em.EmitEvent(Event{ + Type: evtType, + Attributes: attrs, + }) + + return nil +} + +func ParseTypedEvent(event abci.Event) (proto.Message, error) { + // look up proto.Message type by event.Type + // populate attributes into map[string]json.RawMessage and marshal that to a json string + // unmarshal the json string to the proto.Message +} + // ---------------------------------------------------------------------------- // Events // ---------------------------------------------------------------------------- From ed85dd74f1d7f1d6ea2f5f38598287bf7e8d3f34 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Mon, 5 Oct 2020 15:43:39 +0530 Subject: [PATCH 02/24] Add parseTypedEvent method --- types/events.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/types/events.go b/types/events.go index ce120344a7fc..c98e828dd655 100644 --- a/types/events.go +++ b/types/events.go @@ -3,6 +3,7 @@ package types import ( "encoding/json" "fmt" + "reflect" "sort" "strings" @@ -75,6 +76,33 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { // look up proto.Message type by event.Type // populate attributes into map[string]json.RawMessage and marshal that to a json string // unmarshal the json string to the proto.Message + concreteGoType := proto.MessageType(event.Type) + if concreteGoType == nil { + return nil, fmt.Errorf("failed to retrieve the message of type %q", event.Type) + } + + value := reflect.New(concreteGoType).Elem() + protoMsg, ok := value.Interface().(proto.Message) + if !ok { + return nil, fmt.Errorf("%q does not implement proto.Message", event.Type) + } + + attrMap := make(map[string]json.RawMessage) + for _, attr := range event.Attributes { + attrMap[string(attr.Key)] = attr.Value + } + + attrBytes, err := json.Marshal(attrMap) + if err != nil { + return nil, err + } + + err = proto.Unmarshal(attrBytes, protoMsg) + if err != nil { + return nil, err + } + + return protoMsg, nil } // ---------------------------------------------------------------------------- From 7d9919bc041e68e5ffc9d0e04c22c5dc123622aa Mon Sep 17 00:00:00 2001 From: anilCSE Date: Tue, 6 Oct 2020 13:09:57 +0530 Subject: [PATCH 03/24] Use jsonpb --- types/events.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index c98e828dd655..b7abd3f44ed4 100644 --- a/types/events.go +++ b/types/events.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" proto "github.com/gogo/protobuf/proto" + "github.com/golang/protobuf/jsonpb" abci "github.com/tendermint/tendermint/abci/types" ) @@ -97,7 +98,7 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { return nil, err } - err = proto.Unmarshal(attrBytes, protoMsg) + err = jsonpb.Unmarshal(strings.NewReader(string(attrBytes)), protoMsg) if err != nil { return nil, err } From deb1e3c6fb558d1914ff00cf374fc8a9ceae60f7 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 6 Oct 2020 15:49:30 +0530 Subject: [PATCH 04/24] Modify unmarshal proto in events --- types/events.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index c98e828dd655..6d80c603cfec 100644 --- a/types/events.go +++ b/types/events.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/cosmos/cosmos-sdk/codec" + "github.com/gogo/protobuf/jsonpb" proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" ) @@ -97,7 +98,10 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { return nil, err } - err = proto.Unmarshal(attrBytes, protoMsg) + fmt.Printf("Attributes...%s\n", string(attrBytes)) + fmt.Printf("Proto...%+v\t %T\n", protoMsg, protoMsg) + + err = jsonpb.UnmarshalString(string(attrBytes), protoMsg) if err != nil { return nil, err } From 171f362ef8f0f2d51e20fb905953389b6bd209e9 Mon Sep 17 00:00:00 2001 From: anilCSE Date: Wed, 7 Oct 2020 01:23:45 +0530 Subject: [PATCH 05/24] Add a test for typed events --- types/events.go | 1 - types/events_test.go | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index a84f8eacb813..c67d356e9a96 100644 --- a/types/events.go +++ b/types/events.go @@ -10,7 +10,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/gogo/protobuf/jsonpb" proto "github.com/gogo/protobuf/proto" - "github.com/golang/protobuf/jsonpb" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/types/events_test.go b/types/events_test.go index d712e24cd8ff..56442194d84d 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -2,6 +2,7 @@ package types_test import ( "encoding/json" + "fmt" "testing" "github.com/stretchr/testify/suite" @@ -68,6 +69,21 @@ func (s *eventsTestSuite) TestEventManager() { s.Require().Equal(em.Events(), events.AppendEvent(event)) } +func (s *eventsTestSuite) TestEventManagerTypedEvents() { + em := sdk.NewEventManager() + + coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + s.Require().NoError(em.EmitTypedEvent(&coin)) + s.Require().Len(em.Events(), 1) + + fmt.Println(em.Events()[0]) + + msg, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) + s.Require().NoError(err) + + fmt.Println(msg, "msg") +} + func (s *eventsTestSuite) TestStringifyEvents() { e := sdk.Events{ sdk.NewEvent("message", sdk.NewAttribute("sender", "foo")), From f158344286455d72a213b96720d1794d013cbc70 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 7 Oct 2020 17:28:00 +0530 Subject: [PATCH 06/24] Fix reflect issue in parseTypedEvent --- types/events.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index c67d356e9a96..9dadc54f39bf 100644 --- a/types/events.go +++ b/types/events.go @@ -82,7 +82,13 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { return nil, fmt.Errorf("failed to retrieve the message of type %q", event.Type) } - value := reflect.New(concreteGoType).Elem() + var value reflect.Value + if concreteGoType.Kind() == reflect.Ptr { + value = reflect.New(concreteGoType.Elem()) + } else { + value = reflect.Zero(concreteGoType) + } + protoMsg, ok := value.Interface().(proto.Message) if !ok { return nil, fmt.Errorf("%q does not implement proto.Message", event.Type) From faeab07e4e7e6025aaf17d7bd654150667b6d967 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Thu, 15 Oct 2020 12:28:51 +0530 Subject: [PATCH 07/24] Modify event tests and add comments --- types/events.go | 5 ++--- types/events_test.go | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/types/events.go b/types/events.go index 9dadc54f39bf..115ef2c73245 100644 --- a/types/events.go +++ b/types/events.go @@ -44,6 +44,7 @@ func (em EventManager) ABCIEvents() []abci.Event { return em.events.ToABCIEvents() } +// EmitTypedEvent takes typed event and emits converting it into sdk.Event func (em *EventManager) EmitTypedEvent(event proto.Message) error { evtType := proto.MessageName(event) evtJSON, err := codec.ProtoMarshalJSON(event) @@ -73,10 +74,8 @@ func (em *EventManager) EmitTypedEvent(event proto.Message) error { return nil } +// ParseTypedEvent converts abci.Event back to typed event func ParseTypedEvent(event abci.Event) (proto.Message, error) { - // look up proto.Message type by event.Type - // populate attributes into map[string]json.RawMessage and marshal that to a json string - // unmarshal the json string to the proto.Message concreteGoType := proto.MessageType(event.Type) if concreteGoType == nil { return nil, fmt.Errorf("failed to retrieve the message of type %q", event.Type) diff --git a/types/events_test.go b/types/events_test.go index 56442194d84d..946d2da9a7ab 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -2,7 +2,6 @@ package types_test import ( "encoding/json" - "fmt" "testing" "github.com/stretchr/testify/suite" @@ -76,12 +75,10 @@ func (s *eventsTestSuite) TestEventManagerTypedEvents() { s.Require().NoError(em.EmitTypedEvent(&coin)) s.Require().Len(em.Events(), 1) - fmt.Println(em.Events()[0]) - msg, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) - s.Require().NoError(err) - fmt.Println(msg, "msg") + s.Require().NoError(err) + s.Require().Equal(coin.String(), msg.String()) } func (s *eventsTestSuite) TestStringifyEvents() { From 50f3f1f8fbe7343b847946599f1f9bcea403f110 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Thu, 15 Oct 2020 15:58:43 +0530 Subject: [PATCH 08/24] Add EmitTypedEvents and refactor other methods --- types/events.go | 42 +++++++++++++++++++++++++++++++++--------- types/events_test.go | 12 +++++++----- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/types/events.go b/types/events.go index 115ef2c73245..35392559958e 100644 --- a/types/events.go +++ b/types/events.go @@ -44,18 +44,44 @@ func (em EventManager) ABCIEvents() []abci.Event { return em.events.ToABCIEvents() } -// EmitTypedEvent takes typed event and emits converting it into sdk.Event -func (em *EventManager) EmitTypedEvent(event proto.Message) error { - evtType := proto.MessageName(event) - evtJSON, err := codec.ProtoMarshalJSON(event) +// EmitTypedEvent takes typed event and emits converting it into Event +func (em *EventManager) EmitTypedEvent(tev proto.Message) error { + event, err := TypedEventToEvent(tev) if err != nil { return err } + em.EmitEvent(event) + return nil +} + +// EmitTypedEvents takes series of typed events and emit +func (em *EventManager) EmitTypedEvents(tevs ...proto.Message) error { + events := make(Events, len(tevs)) + for i, tev := range tevs { + res, err := TypedEventToEvent(tev) + if err != nil { + return err + } + events[i] = res + } + + em.EmitEvents(events) + return nil +} + +// TypedEventToEvent takes typed event and converts to Event object +func TypedEventToEvent(tev proto.Message) (Event, error) { + evtType := proto.MessageName(tev) + evtJSON, err := codec.ProtoMarshalJSON(tev) + if err != nil { + return Event{}, err + } + var attrMap map[string]json.RawMessage err = json.Unmarshal(evtJSON, &attrMap) if err != nil { - return err + return Event{}, err } var attrs []abci.EventAttribute @@ -66,12 +92,10 @@ func (em *EventManager) EmitTypedEvent(event proto.Message) error { }) } - em.EmitEvent(Event{ + return Event{ Type: evtType, Attributes: attrs, - }) - - return nil + }, nil } // ParseTypedEvent converts abci.Event back to typed event diff --git a/types/events_test.go b/types/events_test.go index 946d2da9a7ab..f54443ad957e 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -71,14 +71,16 @@ func (s *eventsTestSuite) TestEventManager() { func (s *eventsTestSuite) TestEventManagerTypedEvents() { em := sdk.NewEventManager() - coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) - s.Require().NoError(em.EmitTypedEvent(&coin)) - s.Require().Len(em.Events(), 1) + coin1 := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + coin2 := sdk.NewCoin("fakedenom2", sdk.NewInt(1999999)) - msg, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) + s.Require().NoError(em.EmitTypedEvents(&coin1)) + s.Require().NoError(em.EmitTypedEvent(&coin2)) + s.Require().Len(em.Events(), 2) + msg, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) s.Require().NoError(err) - s.Require().Equal(coin.String(), msg.String()) + s.Require().Equal(coin1.String(), msg.String()) } func (s *eventsTestSuite) TestStringifyEvents() { From fa6a618eb99fa78221189998d8d021e93ee71fdf Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Thu, 15 Oct 2020 18:58:14 +0530 Subject: [PATCH 09/24] Fix golangci-lint issues --- types/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index 35392559958e..e752eab084ab 100644 --- a/types/events.go +++ b/types/events.go @@ -84,7 +84,7 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { return Event{}, err } - var attrs []abci.EventAttribute + attrs := make([]abci.EventAttribute, 0, len(attrMap)) for k, v := range attrMap { attrs = append(attrs, abci.EventAttribute{ Key: []byte(k), From 526d94235c52973863946315e95e0e77bd0e0ec5 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Fri, 16 Oct 2020 19:25:37 +0530 Subject: [PATCH 10/24] Update ProtoMarshalJSON params --- types/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/events.go b/types/events.go index e752eab084ab..28230ee10568 100644 --- a/types/events.go +++ b/types/events.go @@ -73,7 +73,7 @@ func (em *EventManager) EmitTypedEvents(tevs ...proto.Message) error { // TypedEventToEvent takes typed event and converts to Event object func TypedEventToEvent(tev proto.Message) (Event, error) { evtType := proto.MessageName(tev) - evtJSON, err := codec.ProtoMarshalJSON(tev) + evtJSON, err := codec.ProtoMarshalJSON(tev, nil) if err != nil { return Event{}, err } From 5f472bfcfba35b444af7afb7c4c06a0f89c88504 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 27 Oct 2020 16:37:34 +0530 Subject: [PATCH 11/24] Address PR comments --- types/events.go | 2 ++ types/events_test.go | 31 +++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/types/events.go b/types/events.go index 28230ee10568..44d48d9cd5b8 100644 --- a/types/events.go +++ b/types/events.go @@ -30,11 +30,13 @@ func NewEventManager() *EventManager { func (em *EventManager) Events() Events { return em.events } // EmitEvent stores a single Event object. +// Deprecated: Use EmitTypedEvent func (em *EventManager) EmitEvent(event Event) { em.events = em.events.AppendEvent(event) } // EmitEvents stores a series of Event objects. +// Deprecated: Use EmitTypedEvents func (em *EventManager) EmitEvents(events Events) { em.events = em.events.AppendEvents(events) } diff --git a/types/events_test.go b/types/events_test.go index f54443ad957e..7363355fb1b8 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -2,11 +2,14 @@ package types_test import ( "encoding/json" + "reflect" "testing" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + testdata "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -71,16 +74,32 @@ func (s *eventsTestSuite) TestEventManager() { func (s *eventsTestSuite) TestEventManagerTypedEvents() { em := sdk.NewEventManager() - coin1 := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) - coin2 := sdk.NewCoin("fakedenom2", sdk.NewInt(1999999)) + coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + cat := testdata.Cat{ + Moniker: "Garfield", + Lives: 6, + } + animal, err := codectypes.NewAnyWithValue(&cat) + s.Require().NoError(err) + hasAnimal := testdata.HasAnimal{ + X: 1000, + Animal: animal, + } - s.Require().NoError(em.EmitTypedEvents(&coin1)) - s.Require().NoError(em.EmitTypedEvent(&coin2)) + s.Require().NoError(em.EmitTypedEvents(&coin)) + s.Require().NoError(em.EmitTypedEvent(&hasAnimal)) s.Require().Len(em.Events(), 2) - msg, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) + msg1, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) + s.Require().NoError(err) + s.Require().Equal(coin.String(), msg1.String()) + s.Require().Equal(reflect.TypeOf(&coin), reflect.TypeOf(msg1)) + + msg2, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[1]) s.Require().NoError(err) - s.Require().Equal(coin1.String(), msg.String()) + s.Require().Equal(reflect.TypeOf(&hasAnimal), reflect.TypeOf(msg2)) + response := msg2.(*testdata.HasAnimal) + s.Require().Equal(hasAnimal.Animal.String(), response.Animal.String()) } func (s *eventsTestSuite) TestStringifyEvents() { From ebb07e36c577feaa86c02c3bf1c5d027e0f5954b Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 27 Oct 2020 18:24:54 +0530 Subject: [PATCH 12/24] Add typed events in ibc transfer --- .../ibc/applications/transfer/v1/event.proto | 62 + .../transfer/keeper/msg_server.go | 31 +- x/ibc/applications/transfer/keeper/relay.go | 15 +- x/ibc/applications/transfer/module.go | 83 +- x/ibc/applications/transfer/types/event.pb.go | 1847 +++++++++++++++++ 5 files changed, 1980 insertions(+), 58 deletions(-) create mode 100644 proto/ibc/applications/transfer/v1/event.proto create mode 100644 x/ibc/applications/transfer/types/event.pb.go diff --git a/proto/ibc/applications/transfer/v1/event.proto b/proto/ibc/applications/transfer/v1/event.proto new file mode 100644 index 000000000000..3d7b9787635d --- /dev/null +++ b/proto/ibc/applications/transfer/v1/event.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// EventOnRecvPacket is a typed event emitted on receiving packet +message EventOnRecvPacket { + string receiver = 1; + + string denom = 2; + + uint64 amount = 3; + + bool success = 4; +} + +// EventOnAcknowledgementPacket is a typed event emitted on packet acknowledgement +message EventOnAcknowledgementPacket { + string receiver = 1; + + string denom = 2; + + uint64 amount = 3; + + ibc.core.channel.v1.Acknowledgement acknowledgement = 4 [(gogoproto.nullable) = false]; +} + +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +message EventAcknowledgementSuccess { + bytes success = 1; +} + +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +message EventAcknowledgementError { + string error = 1; +} + +// EventOnTimeoutPacket is a typed event emitted on packet timeout +message EventOnTimeoutPacket { + string refund_receiver = 1; + + string refund_denom = 2; + + uint64 refund_amount = 3; +} + +// EventTransfer is a typed event emitted on ibc transfer +message EventTransfer { + string sender = 1; + + string receiver = 2; +} + +// EventDenominationTrace is a typed event for denomination trace +message EventDenominationTrace { + bytes trace_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + + string denom = 2; +} diff --git a/x/ibc/applications/transfer/keeper/msg_server.go b/x/ibc/applications/transfer/keeper/msg_server.go index dd2999af341e..b66e6b375af3 100644 --- a/x/ibc/applications/transfer/keeper/msg_server.go +++ b/x/ibc/applications/transfer/keeper/msg_server.go @@ -27,17 +27,26 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. k.Logger(ctx).Info("IBC fungible token transfer", "token", msg.Token.Denom, "amount", msg.Token.Amount.String(), "sender", msg.Sender, "receiver", msg.Receiver) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeTransfer, - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventTransfer{ + Sender: msg.Sender, + Receiver: msg.Receiver, + }, + ); err != nil { + return nil, err + } + + // ctx.EventManager().EmitEvents(sdk.Events{ + // sdk.NewEvent( + // types.EventTypeTransfer, + // sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), + // sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver), + // ), + // sdk.NewEvent( + // sdk.EventTypeMessage, + // sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + // ), + // }) return &types.MsgTransferResponse{}, nil } diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index c9bc4470d344..bdef277dd6f1 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -260,13 +260,14 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t } voucherDenom := denomTrace.IBCDenom() - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeDenomTrace, - sdk.NewAttribute(types.AttributeKeyTraceHash, traceHash.String()), - sdk.NewAttribute(types.AttributeKeyDenom, voucherDenom), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventDenominationTrace{ + TraceHash: traceHash, + Denom: voucherDenom, + }, + ); err != nil { + return err + } voucher := sdk.NewCoin(voucherDenom, sdk.NewIntFromUint64(data.Amount)) diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 99478288095d..b23da2f757de 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -311,16 +311,17 @@ func (am AppModule) OnRecvPacket( acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypePacket, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), - sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), - sdk.NewAttribute(types.AttributeKeyAmount, fmt.Sprintf("%d", data.Amount)), - sdk.NewAttribute(types.AttributeKeyAckSuccess, fmt.Sprintf("%t", err != nil)), - ), + err = ctx.EventManager().EmitTypedEvent( + &types.EventOnRecvPacket{ + Receiver: data.Receiver, + Denom: data.Denom, + Amount: data.Amount, + Success: err != nil, + }, ) + if err != nil { + acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) + } // NOTE: acknowledgement will be written synchronously during IBC handler execution. return &sdk.Result{ @@ -347,32 +348,34 @@ func (am AppModule) OnAcknowledgementPacket( return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypePacket, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), - sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), - sdk.NewAttribute(types.AttributeKeyAmount, fmt.Sprintf("%d", data.Amount)), - sdk.NewAttribute(types.AttributeKeyAck, fmt.Sprintf("%v", ack)), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventOnAcknowledgementPacket{ + Receiver: data.Receiver, + Denom: data.Denom, + Amount: data.Amount, + Acknowledgement: ack, + }, + ); err != nil { + return nil, err + } switch resp := ack.Response.(type) { case *channeltypes.Acknowledgement_Result: - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypePacket, - sdk.NewAttribute(types.AttributeKeyAckSuccess, string(resp.Result)), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventAcknowledgementSuccess{ + Success: resp.Result, + }, + ); err != nil { + return nil, err + } case *channeltypes.Acknowledgement_Error: - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypePacket, - sdk.NewAttribute(types.AttributeKeyAckError, resp.Error), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventAcknowledgementError{ + Error: resp.Error, + }, + ); err != nil { + return nil, err + } } return &sdk.Result{ @@ -394,15 +397,15 @@ func (am AppModule) OnTimeoutPacket( return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeTimeout, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyRefundReceiver, data.Sender), - sdk.NewAttribute(types.AttributeKeyRefundDenom, data.Denom), - sdk.NewAttribute(types.AttributeKeyRefundAmount, fmt.Sprintf("%d", data.Amount)), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventOnTimeoutPacket{ + RefundReceiver: data.Sender, + RefundDenom: data.Denom, + RefundAmount: data.Amount, + }, + ); err != nil { + return nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), diff --git a/x/ibc/applications/transfer/types/event.pb.go b/x/ibc/applications/transfer/types/event.pb.go new file mode 100644 index 000000000000..d3fc228b025b --- /dev/null +++ b/x/ibc/applications/transfer/types/event.pb.go @@ -0,0 +1,1847 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/transfer/v1/event.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" + 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 + +// EventOnRecvPacket is a typed event emitted on receiving packet +type EventOnRecvPacket struct { + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *EventOnRecvPacket) Reset() { *m = EventOnRecvPacket{} } +func (m *EventOnRecvPacket) String() string { return proto.CompactTextString(m) } +func (*EventOnRecvPacket) ProtoMessage() {} +func (*EventOnRecvPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{0} +} +func (m *EventOnRecvPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOnRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOnRecvPacket.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 *EventOnRecvPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOnRecvPacket.Merge(m, src) +} +func (m *EventOnRecvPacket) XXX_Size() int { + return m.Size() +} +func (m *EventOnRecvPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventOnRecvPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOnRecvPacket proto.InternalMessageInfo + +func (m *EventOnRecvPacket) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventOnRecvPacket) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventOnRecvPacket) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func (m *EventOnRecvPacket) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +// EventOnAcknowledgementPacket is a typed event emitted on packet acknowledgement +type EventOnAcknowledgementPacket struct { + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + Acknowledgement types.Acknowledgement `protobuf:"bytes,4,opt,name=acknowledgement,proto3" json:"acknowledgement"` +} + +func (m *EventOnAcknowledgementPacket) Reset() { *m = EventOnAcknowledgementPacket{} } +func (m *EventOnAcknowledgementPacket) String() string { return proto.CompactTextString(m) } +func (*EventOnAcknowledgementPacket) ProtoMessage() {} +func (*EventOnAcknowledgementPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{1} +} +func (m *EventOnAcknowledgementPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOnAcknowledgementPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOnAcknowledgementPacket.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 *EventOnAcknowledgementPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOnAcknowledgementPacket.Merge(m, src) +} +func (m *EventOnAcknowledgementPacket) XXX_Size() int { + return m.Size() +} +func (m *EventOnAcknowledgementPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventOnAcknowledgementPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOnAcknowledgementPacket proto.InternalMessageInfo + +func (m *EventOnAcknowledgementPacket) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventOnAcknowledgementPacket) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventOnAcknowledgementPacket) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func (m *EventOnAcknowledgementPacket) GetAcknowledgement() types.Acknowledgement { + if m != nil { + return m.Acknowledgement + } + return types.Acknowledgement{} +} + +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +type EventAcknowledgementSuccess struct { + Success []byte `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *EventAcknowledgementSuccess) Reset() { *m = EventAcknowledgementSuccess{} } +func (m *EventAcknowledgementSuccess) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementSuccess) ProtoMessage() {} +func (*EventAcknowledgementSuccess) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{2} +} +func (m *EventAcknowledgementSuccess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementSuccess.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 *EventAcknowledgementSuccess) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementSuccess.Merge(m, src) +} +func (m *EventAcknowledgementSuccess) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementSuccess) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementSuccess.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementSuccess proto.InternalMessageInfo + +func (m *EventAcknowledgementSuccess) GetSuccess() []byte { + if m != nil { + return m.Success + } + return nil +} + +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +type EventAcknowledgementError struct { + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *EventAcknowledgementError) Reset() { *m = EventAcknowledgementError{} } +func (m *EventAcknowledgementError) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementError) ProtoMessage() {} +func (*EventAcknowledgementError) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{3} +} +func (m *EventAcknowledgementError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementError.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 *EventAcknowledgementError) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementError.Merge(m, src) +} +func (m *EventAcknowledgementError) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementError) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementError.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementError proto.InternalMessageInfo + +func (m *EventAcknowledgementError) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +// EventOnTimeoutPacket is a typed event emitted on packet timeout +type EventOnTimeoutPacket struct { + RefundReceiver string `protobuf:"bytes,1,opt,name=refund_receiver,json=refundReceiver,proto3" json:"refund_receiver,omitempty"` + RefundDenom string `protobuf:"bytes,2,opt,name=refund_denom,json=refundDenom,proto3" json:"refund_denom,omitempty"` + RefundAmount uint64 `protobuf:"varint,3,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount,omitempty"` +} + +func (m *EventOnTimeoutPacket) Reset() { *m = EventOnTimeoutPacket{} } +func (m *EventOnTimeoutPacket) String() string { return proto.CompactTextString(m) } +func (*EventOnTimeoutPacket) ProtoMessage() {} +func (*EventOnTimeoutPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{4} +} +func (m *EventOnTimeoutPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOnTimeoutPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOnTimeoutPacket.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 *EventOnTimeoutPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOnTimeoutPacket.Merge(m, src) +} +func (m *EventOnTimeoutPacket) XXX_Size() int { + return m.Size() +} +func (m *EventOnTimeoutPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventOnTimeoutPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOnTimeoutPacket proto.InternalMessageInfo + +func (m *EventOnTimeoutPacket) GetRefundReceiver() string { + if m != nil { + return m.RefundReceiver + } + return "" +} + +func (m *EventOnTimeoutPacket) GetRefundDenom() string { + if m != nil { + return m.RefundDenom + } + return "" +} + +func (m *EventOnTimeoutPacket) GetRefundAmount() uint64 { + if m != nil { + return m.RefundAmount + } + return 0 +} + +// EventTransfer is a typed event emitted on ibc transfer +type EventTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (m *EventTransfer) Reset() { *m = EventTransfer{} } +func (m *EventTransfer) String() string { return proto.CompactTextString(m) } +func (*EventTransfer) ProtoMessage() {} +func (*EventTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{5} +} +func (m *EventTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTransfer.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 *EventTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransfer.Merge(m, src) +} +func (m *EventTransfer) XXX_Size() int { + return m.Size() +} +func (m *EventTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransfer proto.InternalMessageInfo + +func (m *EventTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTransfer) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +// EventDenominationTrace is a typed event for denomination trace +type EventDenominationTrace struct { + TraceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=trace_hash,json=traceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"trace_hash,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *EventDenominationTrace) Reset() { *m = EventDenominationTrace{} } +func (m *EventDenominationTrace) String() string { return proto.CompactTextString(m) } +func (*EventDenominationTrace) ProtoMessage() {} +func (*EventDenominationTrace) Descriptor() ([]byte, []int) { + return fileDescriptor_c490d680aa16af7e, []int{6} +} +func (m *EventDenominationTrace) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDenominationTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDenominationTrace.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 *EventDenominationTrace) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDenominationTrace.Merge(m, src) +} +func (m *EventDenominationTrace) XXX_Size() int { + return m.Size() +} +func (m *EventDenominationTrace) XXX_DiscardUnknown() { + xxx_messageInfo_EventDenominationTrace.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDenominationTrace proto.InternalMessageInfo + +func (m *EventDenominationTrace) GetTraceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { + if m != nil { + return m.TraceHash + } + return nil +} + +func (m *EventDenominationTrace) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func init() { + proto.RegisterType((*EventOnRecvPacket)(nil), "ibc.applications.transfer.v1.EventOnRecvPacket") + proto.RegisterType((*EventOnAcknowledgementPacket)(nil), "ibc.applications.transfer.v1.EventOnAcknowledgementPacket") + proto.RegisterType((*EventAcknowledgementSuccess)(nil), "ibc.applications.transfer.v1.EventAcknowledgementSuccess") + proto.RegisterType((*EventAcknowledgementError)(nil), "ibc.applications.transfer.v1.EventAcknowledgementError") + proto.RegisterType((*EventOnTimeoutPacket)(nil), "ibc.applications.transfer.v1.EventOnTimeoutPacket") + proto.RegisterType((*EventTransfer)(nil), "ibc.applications.transfer.v1.EventTransfer") + proto.RegisterType((*EventDenominationTrace)(nil), "ibc.applications.transfer.v1.EventDenominationTrace") +} + +func init() { + proto.RegisterFile("ibc/applications/transfer/v1/event.proto", fileDescriptor_c490d680aa16af7e) +} + +var fileDescriptor_c490d680aa16af7e = []byte{ + // 512 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6f, 0xd3, 0x3e, + 0x14, 0xc7, 0x9b, 0xfd, 0xfa, 0x1b, 0x9b, 0xb7, 0x31, 0x11, 0x55, 0x53, 0x29, 0x53, 0xd6, 0x15, + 0x24, 0x7a, 0x21, 0x56, 0x01, 0x09, 0x4e, 0x48, 0x2b, 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 0xd7, 0xbf, 0x6e, 0x0e, 0x5e, 0x8e, 0x99, 0x4e, 0xf3, + 0x38, 0xa4, 0x22, 0xc3, 0xda, 0x3a, 0x64, 0x8c, 0xeb, 0x7a, 0x38, 0x65, 0xb1, 0xc2, 0xf1, 0xa5, + 0x06, 0x15, 0x9e, 0xc0, 0xc5, 0xd0, 0x04, 0xd1, 0xa6, 0xad, 0x75, 0x42, 0x54, 0x7a, 0xf7, 0x95, + 0x19, 0x7e, 0xbe, 0x9a, 0x07, 0xde, 0xf5, 0x3c, 0xf0, 0x7e, 0xce, 0x03, 0xef, 0xdb, 0x22, 0x68, + 0x5c, 0x2f, 0x82, 0xc6, 0x8f, 0x45, 0xd0, 0xf8, 0xf2, 0xa6, 0x66, 0x48, 0x85, 0xca, 0x84, 0x72, + 0x9f, 0x67, 0x2a, 0x99, 0xe0, 0x0b, 0xfc, 0xf7, 0x87, 0xab, 0x2f, 0x67, 0xa0, 0xe2, 0x75, 0xfb, + 0xbe, 0x5e, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xcd, 0x4b, 0x11, 0xe2, 0x03, 0x00, 0x00, +} + +func (m *EventOnRecvPacket) 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 *EventOnRecvPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOnRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Amount != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x18 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventOnAcknowledgementPacket) 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 *EventOnAcknowledgementPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOnAcknowledgementPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Acknowledgement.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Amount != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x18 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementSuccess) 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 *EventAcknowledgementSuccess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + i -= len(m.Success) + copy(dAtA[i:], m.Success) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementError) 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 *EventAcknowledgementError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventOnTimeoutPacket) 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 *EventOnTimeoutPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOnTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RefundAmount != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.RefundAmount)) + i-- + dAtA[i] = 0x18 + } + if len(m.RefundDenom) > 0 { + i -= len(m.RefundDenom) + copy(dAtA[i:], m.RefundDenom) + i = encodeVarintEvent(dAtA, i, uint64(len(m.RefundDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.RefundReceiver) > 0 { + i -= len(m.RefundReceiver) + copy(dAtA[i:], m.RefundReceiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.RefundReceiver))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDenominationTrace) 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 *EventDenominationTrace) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDenominationTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.TraceHash) > 0 { + i -= len(m.TraceHash) + copy(dAtA[i:], m.TraceHash) + i = encodeVarintEvent(dAtA, i, uint64(len(m.TraceHash))) + 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 *EventOnRecvPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.Amount != 0 { + n += 1 + sovEvent(uint64(m.Amount)) + } + if m.Success { + n += 2 + } + return n +} + +func (m *EventOnAcknowledgementPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.Amount != 0 { + n += 1 + sovEvent(uint64(m.Amount)) + } + l = m.Acknowledgement.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventAcknowledgementSuccess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Success) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventAcknowledgementError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventOnTimeoutPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RefundReceiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.RefundDenom) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.RefundAmount != 0 { + n += 1 + sovEvent(uint64(m.RefundAmount)) + } + return n +} + +func (m *EventTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventDenominationTrace) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TraceHash) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Denom) + 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 *EventOnRecvPacket) 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: EventOnRecvPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOnRecvPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOnAcknowledgementPacket) 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: EventOnAcknowledgementPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOnAcknowledgementPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Acknowledgement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAcknowledgementSuccess) 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: EventAcknowledgementSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Success = append(m.Success[:0], dAtA[iNdEx:postIndex]...) + if m.Success == nil { + m.Success = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAcknowledgementError) 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: EventAcknowledgementError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOnTimeoutPacket) 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: EventOnTimeoutPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOnTimeoutPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RefundReceiver", 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.RefundReceiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RefundDenom", 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.RefundDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RefundAmount", wireType) + } + m.RefundAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RefundAmount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransfer) 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: EventTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDenominationTrace) 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: EventDenominationTrace: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDenominationTrace: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceHash = append(m.TraceHash[:0], dAtA[iNdEx:postIndex]...) + if m.TraceHash == nil { + m.TraceHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (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") +) From 700f5048805f435ba88ac5e84c124a4bdeee46e1 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 28 Oct 2020 14:22:13 +0530 Subject: [PATCH 13/24] x/ibc: migrate EmitEvent to EmitTypedEvents --- proto/ibc/core/channel/v1/event.proto | 171 + proto/ibc/core/client/v1/event.proto | 52 + proto/ibc/core/connection/v1/event.proto | 48 + .../transfer/keeper/msg_server.go | 12 - x/ibc/core/02-client/keeper/client.go | 44 +- x/ibc/core/02-client/keeper/proposal.go | 22 +- x/ibc/core/02-client/types/codec.go | 32 + x/ibc/core/02-client/types/event.pb.go | 1583 ++++++ x/ibc/core/03-connection/types/event.pb.go | 1462 +++++ x/ibc/core/04-channel/handler.go | 150 +- x/ibc/core/04-channel/keeper/packet.go | 130 +- x/ibc/core/04-channel/keeper/timeout.go | 37 +- x/ibc/core/04-channel/types/event.pb.go | 4695 +++++++++++++++++ x/ibc/core/keeper/msg_server.go | 154 +- 14 files changed, 8305 insertions(+), 287 deletions(-) create mode 100644 proto/ibc/core/channel/v1/event.proto create mode 100644 proto/ibc/core/client/v1/event.proto create mode 100644 proto/ibc/core/connection/v1/event.proto create mode 100644 x/ibc/core/02-client/types/event.pb.go create mode 100644 x/ibc/core/03-connection/types/event.pb.go create mode 100644 x/ibc/core/04-channel/types/event.pb.go diff --git a/proto/ibc/core/channel/v1/event.proto b/proto/ibc/core/channel/v1/event.proto new file mode 100644 index 000000000000..8a000a097ead --- /dev/null +++ b/proto/ibc/core/channel/v1/event.proto @@ -0,0 +1,171 @@ +syntax = "proto3"; +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; + +import "ibc/core/channel/v1/channel.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// EventChannelOpenInit is a typed event emitted on channel open init +message EventChannelOpenInit { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelOpenTry is a typed event emitted on channel open try +message EventChannelOpenTry { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelOpenAck is a typed event emitted on channel open acknowledgement +message EventChannelOpenAck { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelCloseInit is a typed event emitted on channel close init +message EventChannelCloseInit { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelOpenConfirm is a typed event emitted on channel open confirm +message EventChannelOpenConfirm { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelCloseConfirm is a typed event emitted on channel close confirm +message EventChannelCloseConfirm { + string port_id = 1; + + string channel_id = 2; + + string counterparty_port_id = 3; + + string counterparty_channel_id = 4; + + string connection_id = 5; +} + +// EventChannelSendPacket is a typed event emitted when packet is sent +message EventChannelSendPacket { + bytes data = 1; + + google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; + + uint64 timeout_timestamp = 3; + + uint64 sequence = 4; + + string src_port = 5; + + string src_channel = 6; + + string dst_port = 7; + + string dst_channel = 8; + + Order channel_ordering = 9; +} + +// EventChannelRecvPacket is a typed event emitted when packet is received in channel +message EventChannelRecvPacket { + bytes data = 1; + + google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; + + uint64 timeout_timestamp = 3; + + uint64 sequence = 4; + + string src_port = 5; + + string src_channel = 6; + + string dst_port = 7; + + string dst_channel = 8; + + Order channel_ordering = 9; +} + +// EventChannelWriteAck is a typed event emitted on write acknowledgement +message EventChannelWriteAck { + bytes acknowledgement = 1; +} + +// EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed +message EventChannelAckPacket { + google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; + + uint64 timeout_timestamp = 2; + + uint64 sequence = 3; + + string src_port = 4; + + string src_channel = 5; + + string dst_port = 6; + + string dst_channel = 7; + + Order channel_ordering = 8; +} + +// EventChannelTimeoutPacket is a typed event emitted when packet is timeout +message EventChannelTimeoutPacket { + google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; + + uint64 timeout_timestamp = 2; + + uint64 sequence = 3; + + string src_port = 4; + + string src_channel = 5; + + string dst_port = 6; + + string dst_channel = 7; + + Order channel_ordering = 8; +} diff --git a/proto/ibc/core/client/v1/event.proto b/proto/ibc/core/client/v1/event.proto new file mode 100644 index 000000000000..9688a0b8346c --- /dev/null +++ b/proto/ibc/core/client/v1/event.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// EventCreateClient is a typed event emitted on creating client +message EventCreateClient { + string client_id = 1; + + string client_type = 2; + + google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; +} + +// EventUpdateClient is a typed event emitted on updating client +message EventUpdateClient { + string client_id = 1; + + string client_type = 2; + + google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; +} + +// EventUpgradeClient is a typed event emitted on upgrading client +message EventUpgradeClient { + string client_id = 1; + + string client_type = 2; + + google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; +} + +// EventUpdateClientProposal is a typed event emitted on updating client proposal +message EventUpdateClientProposal { + string client_id = 1; + + string client_type = 2; + + google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; +} + +// EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted +message EventClientMisbehaviour { + string client_id = 1; + + string client_type = 2; + + google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; +} diff --git a/proto/ibc/core/connection/v1/event.proto b/proto/ibc/core/connection/v1/event.proto new file mode 100644 index 000000000000..3738a22d0b42 --- /dev/null +++ b/proto/ibc/core/connection/v1/event.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; + +// EventConnectionOpenInit is a typed event emitted on connection open init +message EventConnectionOpenInit { + string connection_id = 1; + + string client_id = 2; + + string counterparty_connection_id = 3; + + string counterparty_client_id = 4; +} + +// EventConnectionOpenTry is a typed event emitted on connection open try +message EventConnectionOpenTry { + string connection_id = 1; + + string client_id = 2; + + string counterparty_connection_id = 3; + + string counterparty_client_id = 4; +} + +// EventConnectionOpenAck is a typed event emitted on connection open acknowledgement +message EventConnectionOpenAck { + string connection_id = 1; + + string client_id = 2; + + string counterparty_connection_id = 3; + + string counterparty_client_id = 4; +} + +// EventConnectionOpenConfirm is a typed event emitted on connection open init +message EventConnectionOpenConfirm { + string connection_id = 1; + + string client_id = 2; + + string counterparty_connection_id = 3; + + string counterparty_client_id = 4; +} diff --git a/x/ibc/applications/transfer/keeper/msg_server.go b/x/ibc/applications/transfer/keeper/msg_server.go index b66e6b375af3..1ae750064151 100644 --- a/x/ibc/applications/transfer/keeper/msg_server.go +++ b/x/ibc/applications/transfer/keeper/msg_server.go @@ -36,17 +36,5 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. return nil, err } - // ctx.EventManager().EmitEvents(sdk.Events{ - // sdk.NewEvent( - // types.EventTypeTransfer, - // sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - // sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver), - // ), - // sdk.NewEvent( - // sdk.EventTypeMessage, - // sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - // ), - // }) - return &types.MsgTransferResponse{}, nil } diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index 463df9ef46ff..e299dd5ce570 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -88,15 +88,21 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.H ) }() + anyHeight, err := types.PackHeight(consensusHeight) + if err != nil { + return err + } + // emitting events in the keeper emits for both begin block and handler client updates - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeUpdateClient, - sdk.NewAttribute(types.AttributeKeyClientID, clientID), - sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()), - sdk.NewAttribute(types.AttributeKeyConsensusHeight, consensusHeight.String()), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventUpdateClient{ + ClientId: clientID, + ClientType: clientState.ClientType(), + ConsensusHeight: anyHeight, + }, + ); err != nil { + return err + } return nil } @@ -134,15 +140,21 @@ func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient e ) }() + anyHeight, err := types.PackHeight(upgradedClient.GetLatestHeight()) + if err != nil { + return err + } + // emitting events in the keeper emits for client upgrades - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeUpgradeClient, - sdk.NewAttribute(types.AttributeKeyClientID, clientID), - sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()), - sdk.NewAttribute(types.AttributeKeyConsensusHeight, upgradedClient.GetLatestHeight().String()), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventUpgradeClient{ + ClientId: clientID, + ClientType: clientState.ClientType(), + ConsensusHeight: anyHeight, + }, + ); err != nil { + return err + } return nil } diff --git a/x/ibc/core/02-client/keeper/proposal.go b/x/ibc/core/02-client/keeper/proposal.go index 6b17278e09dd..15d2adfb4885 100644 --- a/x/ibc/core/02-client/keeper/proposal.go +++ b/x/ibc/core/02-client/keeper/proposal.go @@ -49,15 +49,21 @@ func (k Keeper) ClientUpdateProposal(ctx sdk.Context, p *types.ClientUpdatePropo ) }() + anyHeight, err := types.PackHeight(header.GetHeight()) + if err != nil { + return err + } + // emitting events in the keeper for proposal updates to clients - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeUpdateClientProposal, - sdk.NewAttribute(types.AttributeKeyClientID, p.ClientId), - sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()), - sdk.NewAttribute(types.AttributeKeyConsensusHeight, header.GetHeight().String()), - ), - ) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventUpgradeClient{ + ClientId: p.ClientId, + ClientType: clientState.ClientType(), + ConsensusHeight: anyHeight, + }, + ); err != nil { + return err + } return nil } diff --git a/x/ibc/core/02-client/types/codec.go b/x/ibc/core/02-client/types/codec.go index 76402a1116ab..2a4593217145 100644 --- a/x/ibc/core/02-client/types/codec.go +++ b/x/ibc/core/02-client/types/codec.go @@ -180,3 +180,35 @@ func UnpackMisbehaviour(any *codectypes.Any) (exported.Misbehaviour, error) { return misbehaviour, nil } + +// PackHeight constructs a new Any packed with the given height value. It returns +// an error if the height can't be casted to a protobuf message or if the concrete +// implemention is not registered to the protobuf codec. +func PackHeight(height exported.Height) (*codectypes.Any, error) { + msg, ok := height.(proto.Message) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", height) + } + + anyHeight, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) + } + + return anyHeight, nil +} + +// UnpackHeight unpacks an Any into a Height. It returns an error if the +// consensus state can't be unpacked into a Height. +func UnpackHeight(any *codectypes.Any) (exported.Height, error) { + if any == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") + } + + height, ok := any.GetCachedValue().(exported.Height) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into Height %T", any) + } + + return height, nil +} diff --git a/x/ibc/core/02-client/types/event.pb.go b/x/ibc/core/02-client/types/event.pb.go new file mode 100644 index 000000000000..5a4ffecd20c2 --- /dev/null +++ b/x/ibc/core/02-client/types/event.pb.go @@ -0,0 +1,1583 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/core/client/v1/event.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-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 + +// EventCreateClient is a typed event emitted on creating client +type EventCreateClient struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` +} + +func (m *EventCreateClient) Reset() { *m = EventCreateClient{} } +func (m *EventCreateClient) String() string { return proto.CompactTextString(m) } +func (*EventCreateClient) ProtoMessage() {} +func (*EventCreateClient) Descriptor() ([]byte, []int) { + return fileDescriptor_184b5eb6564931c0, []int{0} +} +func (m *EventCreateClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCreateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCreateClient.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 *EventCreateClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCreateClient.Merge(m, src) +} +func (m *EventCreateClient) XXX_Size() int { + return m.Size() +} +func (m *EventCreateClient) XXX_DiscardUnknown() { + xxx_messageInfo_EventCreateClient.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCreateClient proto.InternalMessageInfo + +func (m *EventCreateClient) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventCreateClient) GetClientType() string { + if m != nil { + return m.ClientType + } + return "" +} + +func (m *EventCreateClient) GetConsensusHeight() *types.Any { + if m != nil { + return m.ConsensusHeight + } + return nil +} + +// EventUpdateClient is a typed event emitted on updating client +type EventUpdateClient struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` +} + +func (m *EventUpdateClient) Reset() { *m = EventUpdateClient{} } +func (m *EventUpdateClient) String() string { return proto.CompactTextString(m) } +func (*EventUpdateClient) ProtoMessage() {} +func (*EventUpdateClient) Descriptor() ([]byte, []int) { + return fileDescriptor_184b5eb6564931c0, []int{1} +} +func (m *EventUpdateClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateClient.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 *EventUpdateClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateClient.Merge(m, src) +} +func (m *EventUpdateClient) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateClient) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateClient.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateClient proto.InternalMessageInfo + +func (m *EventUpdateClient) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventUpdateClient) GetClientType() string { + if m != nil { + return m.ClientType + } + return "" +} + +func (m *EventUpdateClient) GetConsensusHeight() *types.Any { + if m != nil { + return m.ConsensusHeight + } + return nil +} + +// EventUpgradeClient is a typed event emitted on upgrading client +type EventUpgradeClient struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` +} + +func (m *EventUpgradeClient) Reset() { *m = EventUpgradeClient{} } +func (m *EventUpgradeClient) String() string { return proto.CompactTextString(m) } +func (*EventUpgradeClient) ProtoMessage() {} +func (*EventUpgradeClient) Descriptor() ([]byte, []int) { + return fileDescriptor_184b5eb6564931c0, []int{2} +} +func (m *EventUpgradeClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpgradeClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpgradeClient.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 *EventUpgradeClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpgradeClient.Merge(m, src) +} +func (m *EventUpgradeClient) XXX_Size() int { + return m.Size() +} +func (m *EventUpgradeClient) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpgradeClient.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpgradeClient proto.InternalMessageInfo + +func (m *EventUpgradeClient) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventUpgradeClient) GetClientType() string { + if m != nil { + return m.ClientType + } + return "" +} + +func (m *EventUpgradeClient) GetConsensusHeight() *types.Any { + if m != nil { + return m.ConsensusHeight + } + return nil +} + +// EventUpdateClientProposal is a typed event emitted on updating client proposal +type EventUpdateClientProposal struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` +} + +func (m *EventUpdateClientProposal) Reset() { *m = EventUpdateClientProposal{} } +func (m *EventUpdateClientProposal) String() string { return proto.CompactTextString(m) } +func (*EventUpdateClientProposal) ProtoMessage() {} +func (*EventUpdateClientProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_184b5eb6564931c0, []int{3} +} +func (m *EventUpdateClientProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateClientProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateClientProposal.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 *EventUpdateClientProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateClientProposal.Merge(m, src) +} +func (m *EventUpdateClientProposal) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateClientProposal) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateClientProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateClientProposal proto.InternalMessageInfo + +func (m *EventUpdateClientProposal) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventUpdateClientProposal) GetClientType() string { + if m != nil { + return m.ClientType + } + return "" +} + +func (m *EventUpdateClientProposal) GetConsensusHeight() *types.Any { + if m != nil { + return m.ConsensusHeight + } + return nil +} + +// EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted +type EventClientMisbehaviour struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` +} + +func (m *EventClientMisbehaviour) Reset() { *m = EventClientMisbehaviour{} } +func (m *EventClientMisbehaviour) String() string { return proto.CompactTextString(m) } +func (*EventClientMisbehaviour) ProtoMessage() {} +func (*EventClientMisbehaviour) Descriptor() ([]byte, []int) { + return fileDescriptor_184b5eb6564931c0, []int{4} +} +func (m *EventClientMisbehaviour) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClientMisbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventClientMisbehaviour.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 *EventClientMisbehaviour) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClientMisbehaviour.Merge(m, src) +} +func (m *EventClientMisbehaviour) XXX_Size() int { + return m.Size() +} +func (m *EventClientMisbehaviour) XXX_DiscardUnknown() { + xxx_messageInfo_EventClientMisbehaviour.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClientMisbehaviour proto.InternalMessageInfo + +func (m *EventClientMisbehaviour) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventClientMisbehaviour) GetClientType() string { + if m != nil { + return m.ClientType + } + return "" +} + +func (m *EventClientMisbehaviour) GetConsensusHeight() *types.Any { + if m != nil { + return m.ConsensusHeight + } + return nil +} + +func init() { + proto.RegisterType((*EventCreateClient)(nil), "ibc.core.client.v1.EventCreateClient") + proto.RegisterType((*EventUpdateClient)(nil), "ibc.core.client.v1.EventUpdateClient") + proto.RegisterType((*EventUpgradeClient)(nil), "ibc.core.client.v1.EventUpgradeClient") + proto.RegisterType((*EventUpdateClientProposal)(nil), "ibc.core.client.v1.EventUpdateClientProposal") + proto.RegisterType((*EventClientMisbehaviour)(nil), "ibc.core.client.v1.EventClientMisbehaviour") +} + +func init() { proto.RegisterFile("ibc/core/client/v1/event.proto", fileDescriptor_184b5eb6564931c0) } + +var fileDescriptor_184b5eb6564931c0 = []byte{ + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0x41, 0x4a, 0x03, 0x31, + 0x14, 0x86, 0x1b, 0x85, 0x62, 0xd3, 0x85, 0x3a, 0x08, 0xb6, 0x15, 0x62, 0x71, 0xd5, 0x4d, 0x13, + 0x5b, 0x17, 0xae, 0x6d, 0x11, 0x14, 0x11, 0xb4, 0xe8, 0xc6, 0x4d, 0x99, 0xc9, 0xc4, 0x99, 0x60, + 0x3b, 0x6f, 0x98, 0x64, 0x06, 0xe7, 0x16, 0x9e, 0x40, 0x37, 0xe2, 0x09, 0x3c, 0x84, 0xb8, 0xea, + 0xd2, 0xa5, 0xb4, 0x17, 0x91, 0x26, 0x63, 0x5d, 0x78, 0x81, 0x59, 0x85, 0xf7, 0xfe, 0x97, 0xff, + 0x7d, 0x84, 0xfc, 0x98, 0x48, 0x8f, 0x33, 0x0e, 0x89, 0x60, 0x7c, 0x22, 0x45, 0xa4, 0x59, 0xd6, + 0x63, 0x22, 0x13, 0x91, 0xa6, 0x71, 0x02, 0x1a, 0x1c, 0x47, 0x7a, 0x9c, 0x2e, 0x75, 0x6a, 0x75, + 0x9a, 0xf5, 0x5a, 0xcd, 0x00, 0x20, 0x98, 0x08, 0x66, 0x26, 0xbc, 0xf4, 0x9e, 0xb9, 0x51,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0xb4, 0x88, 0x59, 0x71, 0x74, 0x95, 0xff, 0xc0, 0x1e, 0xd9, 0x2a, 0xd6, + 0x87, 0xfd, 0x6e, 0x91, 0xec, 0x25, 0xb0, 0xf2, 0xaa, 0x66, 0xfb, 0xd1, 0x4f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x61, 0x32, 0xd9, 0x02, 0xf9, 0x03, 0x00, 0x00, +} + +func (m *EventCreateClient) 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 *EventCreateClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ClientType) > 0 { + i -= len(m.ClientType) + copy(dAtA[i:], m.ClientType) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateClient) 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 *EventUpdateClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ClientType) > 0 { + i -= len(m.ClientType) + copy(dAtA[i:], m.ClientType) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpgradeClient) 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 *EventUpgradeClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpgradeClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ClientType) > 0 { + i -= len(m.ClientType) + copy(dAtA[i:], m.ClientType) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateClientProposal) 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 *EventUpdateClientProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateClientProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ClientType) > 0 { + i -= len(m.ClientType) + copy(dAtA[i:], m.ClientType) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventClientMisbehaviour) 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 *EventClientMisbehaviour) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClientMisbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ClientType) > 0 { + i -= len(m.ClientType) + copy(dAtA[i:], m.ClientType) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + 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 *EventCreateClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientType) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventUpdateClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientType) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventUpgradeClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientType) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventUpdateClientProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientType) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventClientMisbehaviour) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientType) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + 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 *EventCreateClient) 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: EventCreateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCreateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientType", 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.ClientType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types.Any{} + } + if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdateClient) 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: EventUpdateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientType", 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.ClientType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types.Any{} + } + if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpgradeClient) 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: EventUpgradeClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpgradeClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientType", 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.ClientType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types.Any{} + } + if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdateClientProposal) 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: EventUpdateClientProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateClientProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientType", 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.ClientType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types.Any{} + } + if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventClientMisbehaviour) 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: EventClientMisbehaviour: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClientMisbehaviour: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientType", 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.ClientType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types.Any{} + } + if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (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/ibc/core/03-connection/types/event.pb.go b/x/ibc/core/03-connection/types/event.pb.go new file mode 100644 index 000000000000..92022a7b48bb --- /dev/null +++ b/x/ibc/core/03-connection/types/event.pb.go @@ -0,0 +1,1462 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/core/connection/v1/event.proto + +package types + +import ( + fmt "fmt" + 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 + +// EventConnectionOpenInit is a typed event emitted on connection open init +type EventConnectionOpenInit struct { + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` +} + +func (m *EventConnectionOpenInit) Reset() { *m = EventConnectionOpenInit{} } +func (m *EventConnectionOpenInit) String() string { return proto.CompactTextString(m) } +func (*EventConnectionOpenInit) ProtoMessage() {} +func (*EventConnectionOpenInit) Descriptor() ([]byte, []int) { + return fileDescriptor_2c70aa78066bdd17, []int{0} +} +func (m *EventConnectionOpenInit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConnectionOpenInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConnectionOpenInit.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 *EventConnectionOpenInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConnectionOpenInit.Merge(m, src) +} +func (m *EventConnectionOpenInit) XXX_Size() int { + return m.Size() +} +func (m *EventConnectionOpenInit) XXX_DiscardUnknown() { + xxx_messageInfo_EventConnectionOpenInit.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConnectionOpenInit proto.InternalMessageInfo + +func (m *EventConnectionOpenInit) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +func (m *EventConnectionOpenInit) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventConnectionOpenInit) GetCounterpartyConnectionId() string { + if m != nil { + return m.CounterpartyConnectionId + } + return "" +} + +func (m *EventConnectionOpenInit) GetCounterpartyClientId() string { + if m != nil { + return m.CounterpartyClientId + } + return "" +} + +// EventConnectionOpenTry is a typed event emitted on connection open try +type EventConnectionOpenTry struct { + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` +} + +func (m *EventConnectionOpenTry) Reset() { *m = EventConnectionOpenTry{} } +func (m *EventConnectionOpenTry) String() string { return proto.CompactTextString(m) } +func (*EventConnectionOpenTry) ProtoMessage() {} +func (*EventConnectionOpenTry) Descriptor() ([]byte, []int) { + return fileDescriptor_2c70aa78066bdd17, []int{1} +} +func (m *EventConnectionOpenTry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConnectionOpenTry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConnectionOpenTry.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 *EventConnectionOpenTry) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConnectionOpenTry.Merge(m, src) +} +func (m *EventConnectionOpenTry) XXX_Size() int { + return m.Size() +} +func (m *EventConnectionOpenTry) XXX_DiscardUnknown() { + xxx_messageInfo_EventConnectionOpenTry.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConnectionOpenTry proto.InternalMessageInfo + +func (m *EventConnectionOpenTry) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +func (m *EventConnectionOpenTry) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventConnectionOpenTry) GetCounterpartyConnectionId() string { + if m != nil { + return m.CounterpartyConnectionId + } + return "" +} + +func (m *EventConnectionOpenTry) GetCounterpartyClientId() string { + if m != nil { + return m.CounterpartyClientId + } + return "" +} + +// EventConnectionOpenAck is a typed event emitted on connection open acknowledgement +type EventConnectionOpenAck struct { + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` +} + +func (m *EventConnectionOpenAck) Reset() { *m = EventConnectionOpenAck{} } +func (m *EventConnectionOpenAck) String() string { return proto.CompactTextString(m) } +func (*EventConnectionOpenAck) ProtoMessage() {} +func (*EventConnectionOpenAck) Descriptor() ([]byte, []int) { + return fileDescriptor_2c70aa78066bdd17, []int{2} +} +func (m *EventConnectionOpenAck) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConnectionOpenAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConnectionOpenAck.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 *EventConnectionOpenAck) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConnectionOpenAck.Merge(m, src) +} +func (m *EventConnectionOpenAck) XXX_Size() int { + return m.Size() +} +func (m *EventConnectionOpenAck) XXX_DiscardUnknown() { + xxx_messageInfo_EventConnectionOpenAck.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConnectionOpenAck proto.InternalMessageInfo + +func (m *EventConnectionOpenAck) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +func (m *EventConnectionOpenAck) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventConnectionOpenAck) GetCounterpartyConnectionId() string { + if m != nil { + return m.CounterpartyConnectionId + } + return "" +} + +func (m *EventConnectionOpenAck) GetCounterpartyClientId() string { + if m != nil { + return m.CounterpartyClientId + } + return "" +} + +// EventConnectionOpenConfirm is a typed event emitted on connection open init +type EventConnectionOpenConfirm struct { + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` +} + +func (m *EventConnectionOpenConfirm) Reset() { *m = EventConnectionOpenConfirm{} } +func (m *EventConnectionOpenConfirm) String() string { return proto.CompactTextString(m) } +func (*EventConnectionOpenConfirm) ProtoMessage() {} +func (*EventConnectionOpenConfirm) Descriptor() ([]byte, []int) { + return fileDescriptor_2c70aa78066bdd17, []int{3} +} +func (m *EventConnectionOpenConfirm) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConnectionOpenConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConnectionOpenConfirm.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 *EventConnectionOpenConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConnectionOpenConfirm.Merge(m, src) +} +func (m *EventConnectionOpenConfirm) XXX_Size() int { + return m.Size() +} +func (m *EventConnectionOpenConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_EventConnectionOpenConfirm.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConnectionOpenConfirm proto.InternalMessageInfo + +func (m *EventConnectionOpenConfirm) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +func (m *EventConnectionOpenConfirm) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *EventConnectionOpenConfirm) GetCounterpartyConnectionId() string { + if m != nil { + return m.CounterpartyConnectionId + } + return "" +} + +func (m *EventConnectionOpenConfirm) GetCounterpartyClientId() string { + if m != nil { + return m.CounterpartyClientId + } + return "" +} + +func init() { + proto.RegisterType((*EventConnectionOpenInit)(nil), "ibc.core.connection.v1.EventConnectionOpenInit") + proto.RegisterType((*EventConnectionOpenTry)(nil), "ibc.core.connection.v1.EventConnectionOpenTry") + proto.RegisterType((*EventConnectionOpenAck)(nil), "ibc.core.connection.v1.EventConnectionOpenAck") + proto.RegisterType((*EventConnectionOpenConfirm)(nil), "ibc.core.connection.v1.EventConnectionOpenConfirm") +} + +func init() { + proto.RegisterFile("ibc/core/connection/v1/event.proto", fileDescriptor_2c70aa78066bdd17) +} + +var fileDescriptor_2c70aa78066bdd17 = []byte{ + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x4c, 0x4a, 0xd6, + 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcb, 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, + 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0xcb, 0x4c, 0x4a, 0xd6, 0x03, 0xa9, 0xd1, 0x43, 0xa8, 0xd1, 0x2b, 0x33, 0x54, 0x3a, 0xcf, 0xc8, + 0x25, 0xee, 0x0a, 0x52, 0xe7, 0x0c, 0x17, 0xf6, 0x2f, 0x48, 0xcd, 0xf3, 0xcc, 0xcb, 0x2c, 0x11, + 0x52, 0xe6, 0xe2, 0x45, 0x28, 0x8e, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, + 0x41, 0x08, 0x7a, 0xa6, 0x08, 0x49, 0x73, 0x71, 0x26, 0xe7, 0x64, 0xa6, 0xe6, 0x95, 0x80, 0x14, + 0x30, 0x81, 0x15, 0x70, 0x40, 0x04, 0x3c, 0x53, 0x84, 0x6c, 0xb8, 0xa4, 0x92, 0xf3, 0x4b, 0xf3, + 0x4a, 0x52, 0x8b, 0x0a, 0x12, 0x8b, 0x4a, 0x2a, 0xe3, 0x51, 0x8d, 0x63, 0x06, 0xab, 0x96, 0x40, + 0x56, 0xe1, 0x8c, 0x6c, 0xb4, 0x09, 0x97, 0x18, 0xaa, 0x6e, 0xb8, 0x3d, 0x2c, 0x60, 0x9d, 0x22, + 0x28, 0x3a, 0xa1, 0x76, 0x2a, 0x9d, 0x63, 0xe4, 0x12, 0xc3, 0xe2, 0xa3, 0x90, 0xa2, 0xca, 0xe1, + 0xe5, 0x21, 0xc7, 0xe4, 0xec, 0x21, 0xea, 0xa1, 0x4b, 0x8c, 0x5c, 0x52, 0x58, 0x3c, 0xe4, 0x9c, + 0x9f, 0x97, 0x96, 0x59, 0x94, 0x3b, 0x34, 0x3d, 0xe5, 0x14, 0x7a, 0xe2, 0x91, 0x1c, 0xe3, 0x85, + 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, + 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xd6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, + 0xfa, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x42, 0x1f, + 0x9e, 0x7b, 0x0d, 0x8c, 0x75, 0x91, 0x32, 0x70, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, + 0xfb, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x0b, 0xa7, 0x82, 0xe4, 0x03, 0x00, 0x00, +} + +func (m *EventConnectionOpenInit) 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 *EventConnectionOpenInit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConnectionOpenInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyClientId) > 0 { + i -= len(m.CounterpartyClientId) + copy(dAtA[i:], m.CounterpartyClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyConnectionId) > 0 { + i -= len(m.CounterpartyConnectionId) + copy(dAtA[i:], m.CounterpartyConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConnectionOpenTry) 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 *EventConnectionOpenTry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyClientId) > 0 { + i -= len(m.CounterpartyClientId) + copy(dAtA[i:], m.CounterpartyClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyConnectionId) > 0 { + i -= len(m.CounterpartyConnectionId) + copy(dAtA[i:], m.CounterpartyConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConnectionOpenAck) 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 *EventConnectionOpenAck) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyClientId) > 0 { + i -= len(m.CounterpartyClientId) + copy(dAtA[i:], m.CounterpartyClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyConnectionId) > 0 { + i -= len(m.CounterpartyConnectionId) + copy(dAtA[i:], m.CounterpartyConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConnectionOpenConfirm) 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 *EventConnectionOpenConfirm) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConnectionOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyClientId) > 0 { + i -= len(m.CounterpartyClientId) + copy(dAtA[i:], m.CounterpartyClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyConnectionId) > 0 { + i -= len(m.CounterpartyConnectionId) + copy(dAtA[i:], m.CounterpartyConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + 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 *EventConnectionOpenInit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventConnectionOpenTry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventConnectionOpenAck) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventConnectionOpenConfirm) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyClientId) + 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 *EventConnectionOpenInit) 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: EventConnectionOpenInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConnectionOpenInit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyConnectionId", 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.CounterpartyConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyClientId", 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.CounterpartyClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConnectionOpenTry) 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: EventConnectionOpenTry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConnectionOpenTry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyConnectionId", 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.CounterpartyConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyClientId", 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.CounterpartyClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConnectionOpenAck) 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: EventConnectionOpenAck: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConnectionOpenAck: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyConnectionId", 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.CounterpartyConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyClientId", 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.CounterpartyClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConnectionOpenConfirm) 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: EventConnectionOpenConfirm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConnectionOpenConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyConnectionId", 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.CounterpartyConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyClientId", 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.CounterpartyClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (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/ibc/core/04-channel/handler.go b/x/ibc/core/04-channel/handler.go index 2bf542cfdf95..2c28c93c88ec 100644 --- a/x/ibc/core/04-channel/handler.go +++ b/x/ibc/core/04-channel/handler.go @@ -18,20 +18,17 @@ func HandleMsgChannelOpenInit(ctx sdk.Context, k keeper.Keeper, portCap *capabil return nil, nil, sdkerrors.Wrap(err, "channel handshake open init failed") } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelOpenInit, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.ChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, msg.Channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, msg.Channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, msg.Channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelOpenInit{ + PortId: msg.PortId, + ChannelId: msg.ChannelId, + CounterpartyPortId: msg.Channel.Counterparty.PortId, + CounterpartyChannelId: msg.Channel.Counterparty.ChannelId, + ConnectionId: msg.Channel.ConnectionHops[0], + }, + ); err != nil { + return nil, nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -47,20 +44,17 @@ func HandleMsgChannelOpenTry(ctx sdk.Context, k keeper.Keeper, portCap *capabili return nil, nil, sdkerrors.Wrap(err, "channel handshake open try failed") } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelOpenTry, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.DesiredChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, msg.Channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, msg.Channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, msg.Channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelOpenTry{ + PortId: msg.PortId, + ChannelId: msg.DesiredChannelId, + CounterpartyPortId: msg.Channel.Counterparty.PortId, + CounterpartyChannelId: msg.Channel.Counterparty.ChannelId, + ConnectionId: msg.Channel.ConnectionHops[0], + }, + ); err != nil { + return nil, nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -78,20 +72,17 @@ func HandleMsgChannelOpenAck(ctx sdk.Context, k keeper.Keeper, channelCap *capab channel, _ := k.GetChannel(ctx, msg.PortId, msg.ChannelId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelOpenAck, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.ChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelOpenAck{ + PortId: msg.PortId, + ChannelId: msg.ChannelId, + CounterpartyPortId: channel.Counterparty.PortId, + CounterpartyChannelId: channel.Counterparty.ChannelId, + ConnectionId: channel.ConnectionHops[0], + }, + ); err != nil { + return nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -107,20 +98,17 @@ func HandleMsgChannelOpenConfirm(ctx sdk.Context, k keeper.Keeper, channelCap *c channel, _ := k.GetChannel(ctx, msg.PortId, msg.ChannelId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelOpenConfirm, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.ChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelOpenConfirm{ + PortId: msg.PortId, + ChannelId: msg.ChannelId, + CounterpartyPortId: channel.Counterparty.PortId, + CounterpartyChannelId: channel.Counterparty.ChannelId, + ConnectionId: channel.ConnectionHops[0], + }, + ); err != nil { + return nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -136,20 +124,17 @@ func HandleMsgChannelCloseInit(ctx sdk.Context, k keeper.Keeper, channelCap *cap channel, _ := k.GetChannel(ctx, msg.PortId, msg.ChannelId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelCloseInit, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.ChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelCloseInit{ + PortId: msg.PortId, + ChannelId: msg.ChannelId, + CounterpartyPortId: channel.Counterparty.PortId, + CounterpartyChannelId: channel.Counterparty.ChannelId, + ConnectionId: channel.ConnectionHops[0], + }, + ); err != nil { + return nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -165,20 +150,17 @@ func HandleMsgChannelCloseConfirm(ctx sdk.Context, k keeper.Keeper, channelCap * channel, _ := k.GetChannel(ctx, msg.PortId, msg.ChannelId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeChannelCloseConfirm, - sdk.NewAttribute(types.AttributeKeyPortID, msg.PortId), - sdk.NewAttribute(types.AttributeKeyChannelID, msg.ChannelId), - sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelCloseConfirm{ + PortId: msg.PortId, + ChannelId: msg.ChannelId, + CounterpartyPortId: channel.Counterparty.PortId, + CounterpartyChannelId: channel.Counterparty.ChannelId, + ConnectionId: channel.ConnectionHops[0], + }, + ); err != nil { + return nil, err + } return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 2f662c8021ec..7b4bae514316 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -108,26 +108,28 @@ func (k Keeper) SendPacket( k.SetNextSequenceSend(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), nextSequenceSend) k.SetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), types.CommitPacket(packet)) + anyTimeoutHeight, err := clienttypes.PackHeight(timeoutHeight) + if err != nil { + return nil + } + // Emit Event with Packet data along with other packet information for relayer to pick up // and relay to other chain - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeSendPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, timeoutHeight.String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelSendPacket{ + Data: packet.GetData(), + TimeoutHeight: anyTimeoutHeight, + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + }, + ); err != nil { + return err + } k.Logger(ctx).Info("packet sent", "packet", fmt.Sprintf("%v", packet)) return nil @@ -306,25 +308,27 @@ func (k Keeper) WriteReceipt( // log that a packet has been received & executed k.Logger(ctx).Info("packet received", "packet", fmt.Sprintf("%v", packet)) + anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) + if err != nil { + return nil + } + // emit an event that the relayer can query for - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeRecvPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelRecvPacket{ + Data: packet.GetData(), + TimeoutHeight: anyTimeoutHeight, + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + }, + ); err != nil { + return err + } return nil } @@ -364,17 +368,13 @@ func (k Keeper) WriteAcknowledgement( // log that a packet has been acknowledged k.Logger(ctx).Info("packet acknowledged", "packet", fmt.Sprintf("%v", packet)) - // emit an event that the relayer can query for - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeRecvPacket, - sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelWriteAck{ + Acknowledgement: acknowledgement, + }, + ); err != nil { + return err + } return nil } @@ -520,24 +520,26 @@ func (k Keeper) AcknowledgementExecuted( // log that a packet has been acknowledged k.Logger(ctx).Info("packet acknowledged", "packet", fmt.Sprintf("%v", packet)) + anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) + if err != nil { + return nil + } + // emit an event marking that we have processed the acknowledgement - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeAcknowledgePacket, - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelAckPacket{ + TimeoutHeight: anyTimeoutHeight, + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + }, + ); err != nil { + return err + } return nil } diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index 490eb83c8fa4..6778642c3428 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -7,6 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" @@ -148,24 +149,26 @@ func (k Keeper) TimeoutExecuted( k.Logger(ctx).Info("packet timed-out", "packet", fmt.Sprintf("%v", packet)) + anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) + if err != nil { + return nil + } + // emit an event marking that we have processed the timeout - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeTimeoutPacket, - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &types.EventChannelTimeoutPacket{ + TimeoutHeight: anyTimeoutHeight, + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + }, + ); err != nil { + return err + } return nil } diff --git a/x/ibc/core/04-channel/types/event.pb.go b/x/ibc/core/04-channel/types/event.pb.go new file mode 100644 index 000000000000..ae4644736668 --- /dev/null +++ b/x/ibc/core/04-channel/types/event.pb.go @@ -0,0 +1,4695 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/core/channel/v1/event.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-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 + +// EventChannelOpenInit is a typed event emitted on channel open init +type EventChannelOpenInit struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelOpenInit) Reset() { *m = EventChannelOpenInit{} } +func (m *EventChannelOpenInit) String() string { return proto.CompactTextString(m) } +func (*EventChannelOpenInit) ProtoMessage() {} +func (*EventChannelOpenInit) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{0} +} +func (m *EventChannelOpenInit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelOpenInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelOpenInit.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 *EventChannelOpenInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelOpenInit.Merge(m, src) +} +func (m *EventChannelOpenInit) XXX_Size() int { + return m.Size() +} +func (m *EventChannelOpenInit) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelOpenInit.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelOpenInit proto.InternalMessageInfo + +func (m *EventChannelOpenInit) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelOpenInit) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelOpenInit) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelOpenInit) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelOpenInit) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelOpenTry is a typed event emitted on channel open try +type EventChannelOpenTry struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelOpenTry) Reset() { *m = EventChannelOpenTry{} } +func (m *EventChannelOpenTry) String() string { return proto.CompactTextString(m) } +func (*EventChannelOpenTry) ProtoMessage() {} +func (*EventChannelOpenTry) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{1} +} +func (m *EventChannelOpenTry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelOpenTry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelOpenTry.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 *EventChannelOpenTry) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelOpenTry.Merge(m, src) +} +func (m *EventChannelOpenTry) XXX_Size() int { + return m.Size() +} +func (m *EventChannelOpenTry) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelOpenTry.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelOpenTry proto.InternalMessageInfo + +func (m *EventChannelOpenTry) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelOpenTry) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelOpenTry) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelOpenTry) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelOpenTry) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelOpenAck is a typed event emitted on channel open acknowledgement +type EventChannelOpenAck struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelOpenAck) Reset() { *m = EventChannelOpenAck{} } +func (m *EventChannelOpenAck) String() string { return proto.CompactTextString(m) } +func (*EventChannelOpenAck) ProtoMessage() {} +func (*EventChannelOpenAck) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{2} +} +func (m *EventChannelOpenAck) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelOpenAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelOpenAck.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 *EventChannelOpenAck) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelOpenAck.Merge(m, src) +} +func (m *EventChannelOpenAck) XXX_Size() int { + return m.Size() +} +func (m *EventChannelOpenAck) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelOpenAck.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelOpenAck proto.InternalMessageInfo + +func (m *EventChannelOpenAck) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelOpenAck) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelOpenAck) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelOpenAck) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelOpenAck) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelCloseInit is a typed event emitted on channel close init +type EventChannelCloseInit struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelCloseInit) Reset() { *m = EventChannelCloseInit{} } +func (m *EventChannelCloseInit) String() string { return proto.CompactTextString(m) } +func (*EventChannelCloseInit) ProtoMessage() {} +func (*EventChannelCloseInit) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{3} +} +func (m *EventChannelCloseInit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelCloseInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelCloseInit.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 *EventChannelCloseInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelCloseInit.Merge(m, src) +} +func (m *EventChannelCloseInit) XXX_Size() int { + return m.Size() +} +func (m *EventChannelCloseInit) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelCloseInit.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelCloseInit proto.InternalMessageInfo + +func (m *EventChannelCloseInit) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelCloseInit) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelCloseInit) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelCloseInit) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelCloseInit) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelOpenConfirm is a typed event emitted on channel open confirm +type EventChannelOpenConfirm struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelOpenConfirm) Reset() { *m = EventChannelOpenConfirm{} } +func (m *EventChannelOpenConfirm) String() string { return proto.CompactTextString(m) } +func (*EventChannelOpenConfirm) ProtoMessage() {} +func (*EventChannelOpenConfirm) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{4} +} +func (m *EventChannelOpenConfirm) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelOpenConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelOpenConfirm.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 *EventChannelOpenConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelOpenConfirm.Merge(m, src) +} +func (m *EventChannelOpenConfirm) XXX_Size() int { + return m.Size() +} +func (m *EventChannelOpenConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelOpenConfirm.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelOpenConfirm proto.InternalMessageInfo + +func (m *EventChannelOpenConfirm) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelOpenConfirm) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelOpenConfirm) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelOpenConfirm) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelOpenConfirm) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelCloseConfirm is a typed event emitted on channel close confirm +type EventChannelCloseConfirm struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *EventChannelCloseConfirm) Reset() { *m = EventChannelCloseConfirm{} } +func (m *EventChannelCloseConfirm) String() string { return proto.CompactTextString(m) } +func (*EventChannelCloseConfirm) ProtoMessage() {} +func (*EventChannelCloseConfirm) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{5} +} +func (m *EventChannelCloseConfirm) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelCloseConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelCloseConfirm.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 *EventChannelCloseConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelCloseConfirm.Merge(m, src) +} +func (m *EventChannelCloseConfirm) XXX_Size() int { + return m.Size() +} +func (m *EventChannelCloseConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelCloseConfirm.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelCloseConfirm proto.InternalMessageInfo + +func (m *EventChannelCloseConfirm) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *EventChannelCloseConfirm) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *EventChannelCloseConfirm) GetCounterpartyPortId() string { + if m != nil { + return m.CounterpartyPortId + } + return "" +} + +func (m *EventChannelCloseConfirm) GetCounterpartyChannelId() string { + if m != nil { + return m.CounterpartyChannelId + } + return "" +} + +func (m *EventChannelCloseConfirm) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +// EventChannelSendPacket is a typed event emitted when packet is sent +type EventChannelSendPacket struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight *types.Any `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` +} + +func (m *EventChannelSendPacket) Reset() { *m = EventChannelSendPacket{} } +func (m *EventChannelSendPacket) String() string { return proto.CompactTextString(m) } +func (*EventChannelSendPacket) ProtoMessage() {} +func (*EventChannelSendPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{6} +} +func (m *EventChannelSendPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelSendPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelSendPacket.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 *EventChannelSendPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelSendPacket.Merge(m, src) +} +func (m *EventChannelSendPacket) XXX_Size() int { + return m.Size() +} +func (m *EventChannelSendPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelSendPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelSendPacket proto.InternalMessageInfo + +func (m *EventChannelSendPacket) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *EventChannelSendPacket) GetTimeoutHeight() *types.Any { + if m != nil { + return m.TimeoutHeight + } + return nil +} + +func (m *EventChannelSendPacket) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *EventChannelSendPacket) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *EventChannelSendPacket) GetSrcPort() string { + if m != nil { + return m.SrcPort + } + return "" +} + +func (m *EventChannelSendPacket) GetSrcChannel() string { + if m != nil { + return m.SrcChannel + } + return "" +} + +func (m *EventChannelSendPacket) GetDstPort() string { + if m != nil { + return m.DstPort + } + return "" +} + +func (m *EventChannelSendPacket) GetDstChannel() string { + if m != nil { + return m.DstChannel + } + return "" +} + +func (m *EventChannelSendPacket) GetChannelOrdering() Order { + if m != nil { + return m.ChannelOrdering + } + return NONE +} + +// EventChannelRecvPacket is a typed event emitted when packet is received in channel +type EventChannelRecvPacket struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight *types.Any `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` +} + +func (m *EventChannelRecvPacket) Reset() { *m = EventChannelRecvPacket{} } +func (m *EventChannelRecvPacket) String() string { return proto.CompactTextString(m) } +func (*EventChannelRecvPacket) ProtoMessage() {} +func (*EventChannelRecvPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{7} +} +func (m *EventChannelRecvPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelRecvPacket.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 *EventChannelRecvPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelRecvPacket.Merge(m, src) +} +func (m *EventChannelRecvPacket) XXX_Size() int { + return m.Size() +} +func (m *EventChannelRecvPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelRecvPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelRecvPacket proto.InternalMessageInfo + +func (m *EventChannelRecvPacket) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *EventChannelRecvPacket) GetTimeoutHeight() *types.Any { + if m != nil { + return m.TimeoutHeight + } + return nil +} + +func (m *EventChannelRecvPacket) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *EventChannelRecvPacket) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *EventChannelRecvPacket) GetSrcPort() string { + if m != nil { + return m.SrcPort + } + return "" +} + +func (m *EventChannelRecvPacket) GetSrcChannel() string { + if m != nil { + return m.SrcChannel + } + return "" +} + +func (m *EventChannelRecvPacket) GetDstPort() string { + if m != nil { + return m.DstPort + } + return "" +} + +func (m *EventChannelRecvPacket) GetDstChannel() string { + if m != nil { + return m.DstChannel + } + return "" +} + +func (m *EventChannelRecvPacket) GetChannelOrdering() Order { + if m != nil { + return m.ChannelOrdering + } + return NONE +} + +// EventChannelWriteAck is a typed event emitted on write acknowledgement +type EventChannelWriteAck struct { + Acknowledgement []byte `protobuf:"bytes,1,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` +} + +func (m *EventChannelWriteAck) Reset() { *m = EventChannelWriteAck{} } +func (m *EventChannelWriteAck) String() string { return proto.CompactTextString(m) } +func (*EventChannelWriteAck) ProtoMessage() {} +func (*EventChannelWriteAck) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{8} +} +func (m *EventChannelWriteAck) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelWriteAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelWriteAck.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 *EventChannelWriteAck) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelWriteAck.Merge(m, src) +} +func (m *EventChannelWriteAck) XXX_Size() int { + return m.Size() +} +func (m *EventChannelWriteAck) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelWriteAck.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelWriteAck proto.InternalMessageInfo + +func (m *EventChannelWriteAck) GetAcknowledgement() []byte { + if m != nil { + return m.Acknowledgement + } + return nil +} + +// EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed +type EventChannelAckPacket struct { + TimeoutHeight *types.Any `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` +} + +func (m *EventChannelAckPacket) Reset() { *m = EventChannelAckPacket{} } +func (m *EventChannelAckPacket) String() string { return proto.CompactTextString(m) } +func (*EventChannelAckPacket) ProtoMessage() {} +func (*EventChannelAckPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{9} +} +func (m *EventChannelAckPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelAckPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelAckPacket.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 *EventChannelAckPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelAckPacket.Merge(m, src) +} +func (m *EventChannelAckPacket) XXX_Size() int { + return m.Size() +} +func (m *EventChannelAckPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelAckPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelAckPacket proto.InternalMessageInfo + +func (m *EventChannelAckPacket) GetTimeoutHeight() *types.Any { + if m != nil { + return m.TimeoutHeight + } + return nil +} + +func (m *EventChannelAckPacket) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *EventChannelAckPacket) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *EventChannelAckPacket) GetSrcPort() string { + if m != nil { + return m.SrcPort + } + return "" +} + +func (m *EventChannelAckPacket) GetSrcChannel() string { + if m != nil { + return m.SrcChannel + } + return "" +} + +func (m *EventChannelAckPacket) GetDstPort() string { + if m != nil { + return m.DstPort + } + return "" +} + +func (m *EventChannelAckPacket) GetDstChannel() string { + if m != nil { + return m.DstChannel + } + return "" +} + +func (m *EventChannelAckPacket) GetChannelOrdering() Order { + if m != nil { + return m.ChannelOrdering + } + return NONE +} + +// EventChannelTimeoutPacket is a typed event emitted when packet is timeout +type EventChannelTimeoutPacket struct { + TimeoutHeight *types.Any `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` +} + +func (m *EventChannelTimeoutPacket) Reset() { *m = EventChannelTimeoutPacket{} } +func (m *EventChannelTimeoutPacket) String() string { return proto.CompactTextString(m) } +func (*EventChannelTimeoutPacket) ProtoMessage() {} +func (*EventChannelTimeoutPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{10} +} +func (m *EventChannelTimeoutPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventChannelTimeoutPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventChannelTimeoutPacket.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 *EventChannelTimeoutPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelTimeoutPacket.Merge(m, src) +} +func (m *EventChannelTimeoutPacket) XXX_Size() int { + return m.Size() +} +func (m *EventChannelTimeoutPacket) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelTimeoutPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventChannelTimeoutPacket proto.InternalMessageInfo + +func (m *EventChannelTimeoutPacket) GetTimeoutHeight() *types.Any { + if m != nil { + return m.TimeoutHeight + } + return nil +} + +func (m *EventChannelTimeoutPacket) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *EventChannelTimeoutPacket) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *EventChannelTimeoutPacket) GetSrcPort() string { + if m != nil { + return m.SrcPort + } + return "" +} + +func (m *EventChannelTimeoutPacket) GetSrcChannel() string { + if m != nil { + return m.SrcChannel + } + return "" +} + +func (m *EventChannelTimeoutPacket) GetDstPort() string { + if m != nil { + return m.DstPort + } + return "" +} + +func (m *EventChannelTimeoutPacket) GetDstChannel() string { + if m != nil { + return m.DstChannel + } + return "" +} + +func (m *EventChannelTimeoutPacket) GetChannelOrdering() Order { + if m != nil { + return m.ChannelOrdering + } + return NONE +} + +func init() { + proto.RegisterType((*EventChannelOpenInit)(nil), "ibc.core.channel.v1.EventChannelOpenInit") + proto.RegisterType((*EventChannelOpenTry)(nil), "ibc.core.channel.v1.EventChannelOpenTry") + proto.RegisterType((*EventChannelOpenAck)(nil), "ibc.core.channel.v1.EventChannelOpenAck") + proto.RegisterType((*EventChannelCloseInit)(nil), "ibc.core.channel.v1.EventChannelCloseInit") + proto.RegisterType((*EventChannelOpenConfirm)(nil), "ibc.core.channel.v1.EventChannelOpenConfirm") + proto.RegisterType((*EventChannelCloseConfirm)(nil), "ibc.core.channel.v1.EventChannelCloseConfirm") + proto.RegisterType((*EventChannelSendPacket)(nil), "ibc.core.channel.v1.EventChannelSendPacket") + proto.RegisterType((*EventChannelRecvPacket)(nil), "ibc.core.channel.v1.EventChannelRecvPacket") + proto.RegisterType((*EventChannelWriteAck)(nil), "ibc.core.channel.v1.EventChannelWriteAck") + proto.RegisterType((*EventChannelAckPacket)(nil), "ibc.core.channel.v1.EventChannelAckPacket") + proto.RegisterType((*EventChannelTimeoutPacket)(nil), "ibc.core.channel.v1.EventChannelTimeoutPacket") +} + +func init() { proto.RegisterFile("ibc/core/channel/v1/event.proto", fileDescriptor_a989ebecceb60589) } + +var fileDescriptor_a989ebecceb60589 = []byte{ + // 656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0x66, 0x4a, 0x69, 0xcb, 0xcb, 0xdf, 0xdf, 0x00, 0x3f, 0x4a, 0x13, 0x0b, 0xe2, 0x85, 0xc4, + 0xb0, 0x0b, 0x68, 0x8c, 0x47, 0xa1, 0x21, 0xda, 0x13, 0x64, 0x25, 0x31, 0xf1, 0xd2, 0x6c, 0x67, + 0x86, 0x76, 0xd3, 0x76, 0xa6, 0xce, 0x4c, 0xab, 0xfd, 0x16, 0x7e, 0x18, 0x3f, 0x84, 0xf1, 0xc4, + 0xd1, 0x83, 0x1a, 0x84, 0x8b, 0x07, 0xbf, 0x82, 0x89, 0x99, 0xd9, 0x59, 0x2c, 0x94, 0x34, 0x98, + 0xa8, 0x87, 0x86, 0xd3, 0xf6, 0x7d, 0x9f, 0xf7, 0x79, 0x37, 0xcf, 0xf3, 0x34, 0xb3,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x08, 0x0f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x29, 0xea, 0x46, 0x4d, 0x0c, 0x00, 0x00, +} + +func (m *EventChannelOpenInit) 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 *EventChannelOpenInit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelOpenInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelOpenTry) 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 *EventChannelOpenTry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelOpenAck) 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 *EventChannelOpenAck) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelCloseInit) 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 *EventChannelCloseInit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelCloseInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelOpenConfirm) 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 *EventChannelOpenConfirm) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelCloseConfirm) 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 *EventChannelCloseConfirm) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelCloseConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.CounterpartyChannelId) > 0 { + i -= len(m.CounterpartyChannelId) + copy(dAtA[i:], m.CounterpartyChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i-- + dAtA[i] = 0x22 + } + if len(m.CounterpartyPortId) > 0 { + i -= len(m.CounterpartyPortId) + copy(dAtA[i:], m.CounterpartyPortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelSendPacket) 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 *EventChannelSendPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelSendPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChannelOrdering != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i-- + dAtA[i] = 0x48 + } + if len(m.DstChannel) > 0 { + i -= len(m.DstChannel) + copy(dAtA[i:], m.DstChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i-- + dAtA[i] = 0x42 + } + if len(m.DstPort) > 0 { + i -= len(m.DstPort) + copy(dAtA[i:], m.DstPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i-- + dAtA[i] = 0x3a + } + if len(m.SrcChannel) > 0 { + i -= len(m.SrcChannel) + copy(dAtA[i:], m.SrcChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i-- + dAtA[i] = 0x32 + } + if len(m.SrcPort) > 0 { + i -= len(m.SrcPort) + copy(dAtA[i:], m.SrcPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i-- + dAtA[i] = 0x2a + } + if m.Sequence != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x20 + } + if m.TimeoutTimestamp != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i-- + dAtA[i] = 0x18 + } + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelRecvPacket) 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 *EventChannelRecvPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChannelOrdering != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i-- + dAtA[i] = 0x48 + } + if len(m.DstChannel) > 0 { + i -= len(m.DstChannel) + copy(dAtA[i:], m.DstChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i-- + dAtA[i] = 0x42 + } + if len(m.DstPort) > 0 { + i -= len(m.DstPort) + copy(dAtA[i:], m.DstPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i-- + dAtA[i] = 0x3a + } + if len(m.SrcChannel) > 0 { + i -= len(m.SrcChannel) + copy(dAtA[i:], m.SrcChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i-- + dAtA[i] = 0x32 + } + if len(m.SrcPort) > 0 { + i -= len(m.SrcPort) + copy(dAtA[i:], m.SrcPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i-- + dAtA[i] = 0x2a + } + if m.Sequence != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x20 + } + if m.TimeoutTimestamp != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i-- + dAtA[i] = 0x18 + } + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelWriteAck) 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 *EventChannelWriteAck) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelWriteAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Acknowledgement) > 0 { + i -= len(m.Acknowledgement) + copy(dAtA[i:], m.Acknowledgement) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Acknowledgement))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelAckPacket) 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 *EventChannelAckPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChannelOrdering != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i-- + dAtA[i] = 0x40 + } + if len(m.DstChannel) > 0 { + i -= len(m.DstChannel) + copy(dAtA[i:], m.DstChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i-- + dAtA[i] = 0x3a + } + if len(m.DstPort) > 0 { + i -= len(m.DstPort) + copy(dAtA[i:], m.DstPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i-- + dAtA[i] = 0x32 + } + if len(m.SrcChannel) > 0 { + i -= len(m.SrcChannel) + copy(dAtA[i:], m.SrcChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i-- + dAtA[i] = 0x2a + } + if len(m.SrcPort) > 0 { + i -= len(m.SrcPort) + copy(dAtA[i:], m.SrcPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i-- + dAtA[i] = 0x22 + } + if m.Sequence != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + if m.TimeoutTimestamp != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i-- + dAtA[i] = 0x10 + } + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventChannelTimeoutPacket) 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 *EventChannelTimeoutPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChannelOrdering != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i-- + dAtA[i] = 0x40 + } + if len(m.DstChannel) > 0 { + i -= len(m.DstChannel) + copy(dAtA[i:], m.DstChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i-- + dAtA[i] = 0x3a + } + if len(m.DstPort) > 0 { + i -= len(m.DstPort) + copy(dAtA[i:], m.DstPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i-- + dAtA[i] = 0x32 + } + if len(m.SrcChannel) > 0 { + i -= len(m.SrcChannel) + copy(dAtA[i:], m.SrcChannel) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i-- + dAtA[i] = 0x2a + } + if len(m.SrcPort) > 0 { + i -= len(m.SrcPort) + copy(dAtA[i:], m.SrcPort) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i-- + dAtA[i] = 0x22 + } + if m.Sequence != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + if m.TimeoutTimestamp != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i-- + dAtA[i] = 0x10 + } + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + 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 *EventChannelOpenInit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelOpenTry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelOpenAck) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelCloseInit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelOpenConfirm) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelCloseConfirm) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyPortId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CounterpartyChannelId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelSendPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutTimestamp != 0 { + n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + } + if m.Sequence != 0 { + n += 1 + sovEvent(uint64(m.Sequence)) + } + l = len(m.SrcPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SrcChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ChannelOrdering != 0 { + n += 1 + sovEvent(uint64(m.ChannelOrdering)) + } + return n +} + +func (m *EventChannelRecvPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutTimestamp != 0 { + n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + } + if m.Sequence != 0 { + n += 1 + sovEvent(uint64(m.Sequence)) + } + l = len(m.SrcPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SrcChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ChannelOrdering != 0 { + n += 1 + sovEvent(uint64(m.ChannelOrdering)) + } + return n +} + +func (m *EventChannelWriteAck) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Acknowledgement) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventChannelAckPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutTimestamp != 0 { + n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + } + if m.Sequence != 0 { + n += 1 + sovEvent(uint64(m.Sequence)) + } + l = len(m.SrcPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SrcChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ChannelOrdering != 0 { + n += 1 + sovEvent(uint64(m.ChannelOrdering)) + } + return n +} + +func (m *EventChannelTimeoutPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.TimeoutTimestamp != 0 { + n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + } + if m.Sequence != 0 { + n += 1 + sovEvent(uint64(m.Sequence)) + } + l = len(m.SrcPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SrcChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstPort) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DstChannel) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ChannelOrdering != 0 { + n += 1 + sovEvent(uint64(m.ChannelOrdering)) + } + 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 *EventChannelOpenInit) 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: EventChannelOpenInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelOpenInit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelOpenTry) 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: EventChannelOpenTry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelOpenTry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelOpenAck) 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: EventChannelOpenAck: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelOpenAck: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelCloseInit) 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: EventChannelCloseInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelCloseInit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelOpenConfirm) 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: EventChannelOpenConfirm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelOpenConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelCloseConfirm) 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: EventChannelCloseConfirm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelCloseConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPortId", 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.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelSendPacket) 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: EventChannelSendPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelSendPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types.Any{} + } + if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", 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.SrcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", 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.SrcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstPort", 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.DstPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", 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.DstChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) + } + m.ChannelOrdering = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChannelOrdering |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelRecvPacket) 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: EventChannelRecvPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelRecvPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types.Any{} + } + if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", 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.SrcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", 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.SrcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstPort", 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.DstPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", 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.DstChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) + } + m.ChannelOrdering = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChannelOrdering |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelWriteAck) 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: EventChannelWriteAck: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelWriteAck: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Acknowledgement = append(m.Acknowledgement[:0], dAtA[iNdEx:postIndex]...) + if m.Acknowledgement == nil { + m.Acknowledgement = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelAckPacket) 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: EventChannelAckPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelAckPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types.Any{} + } + if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", 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.SrcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", 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.SrcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstPort", 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.DstPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", 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.DstChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) + } + m.ChannelOrdering = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChannelOrdering |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventChannelTimeoutPacket) 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: EventChannelTimeoutPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventChannelTimeoutPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types.Any{} + } + if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", 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.SrcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", 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.SrcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstPort", 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.DstPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", 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.DstChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) + } + m.ChannelOrdering = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChannelOrdering |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (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/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index 15af7348462e..8d03d1bbca32 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -36,18 +36,20 @@ func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateCl return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - clienttypes.EventTypeCreateClient, - sdk.NewAttribute(clienttypes.AttributeKeyClientID, msg.ClientId), - sdk.NewAttribute(clienttypes.AttributeKeyClientType, clientState.ClientType()), - sdk.NewAttribute(clienttypes.AttributeKeyConsensusHeight, clientState.GetLatestHeight().String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - }) + anyHeight, err := clienttypes.PackHeight(clientState.GetLatestHeight()) + if err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent( + &clienttypes.EventCreateClient{ + ClientId: msg.ClientId, + ClientType: clientState.ClientType(), + ConsensusHeight: anyHeight, + }, + ); err != nil { + return nil, err + } return &clienttypes.MsgCreateClientResponse{}, nil } @@ -65,13 +67,6 @@ func (k Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateCl return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - ) - return &clienttypes.MsgUpdateClientResponse{}, nil } @@ -92,13 +87,6 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - ) - return &clienttypes.MsgUpgradeClientResponse{}, nil } @@ -115,14 +103,20 @@ func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSu return nil, sdkerrors.Wrap(err, "failed to process misbehaviour for IBC client") } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - clienttypes.EventTypeSubmitMisbehaviour, - sdk.NewAttribute(clienttypes.AttributeKeyClientID, msg.ClientId), - sdk.NewAttribute(clienttypes.AttributeKeyClientType, misbehaviour.ClientType()), - sdk.NewAttribute(clienttypes.AttributeKeyConsensusHeight, misbehaviour.GetHeight().String()), - ), - ) + anyHeight, err := clienttypes.PackHeight(misbehaviour.GetHeight()) + if err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent( + &clienttypes.EventClientMisbehaviour{ + ClientId: msg.ClientId, + ClientType: misbehaviour.ClientType(), + ConsensusHeight: anyHeight, + }, + ); err != nil { + return nil, err + } return &clienttypes.MsgSubmitMisbehaviourResponse{}, nil } @@ -137,19 +131,16 @@ func (k Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.M return nil, sdkerrors.Wrap(err, "connection handshake open init failed") } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - connectiontypes.EventTypeConnectionOpenInit, - sdk.NewAttribute(connectiontypes.AttributeKeyConnectionID, msg.ConnectionId), - sdk.NewAttribute(connectiontypes.AttributeKeyClientID, msg.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyClientID, msg.Counterparty.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyConnectionID, msg.Counterparty.ConnectionId), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &connectiontypes.EventConnectionOpenInit{ + ConnectionId: msg.ConnectionId, + ClientId: msg.ClientId, + CounterpartyClientId: msg.Counterparty.ClientId, + CounterpartyConnectionId: msg.Counterparty.ConnectionId, + }, + ); err != nil { + return nil, err + } return &connectiontypes.MsgConnectionOpenInitResponse{}, nil } @@ -171,19 +162,16 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms return nil, sdkerrors.Wrap(err, "connection handshake open try failed") } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - connectiontypes.EventTypeConnectionOpenTry, - sdk.NewAttribute(connectiontypes.AttributeKeyConnectionID, msg.DesiredConnectionId), - sdk.NewAttribute(connectiontypes.AttributeKeyClientID, msg.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyClientID, msg.Counterparty.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyConnectionID, msg.Counterparty.ConnectionId), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &connectiontypes.EventConnectionOpenTry{ + ConnectionId: msg.DesiredConnectionId, + ClientId: msg.ClientId, + CounterpartyClientId: msg.Counterparty.ClientId, + CounterpartyConnectionId: msg.Counterparty.ConnectionId, + }, + ); err != nil { + return nil, err + } return &connectiontypes.MsgConnectionOpenTryResponse{}, nil } @@ -206,19 +194,16 @@ func (k Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.Ms connectionEnd, _ := k.ConnectionKeeper.GetConnection(ctx, msg.ConnectionId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - connectiontypes.EventTypeConnectionOpenAck, - sdk.NewAttribute(connectiontypes.AttributeKeyConnectionID, msg.ConnectionId), - sdk.NewAttribute(connectiontypes.AttributeKeyClientID, connectionEnd.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionId), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &connectiontypes.EventConnectionOpenAck{ + ConnectionId: msg.ConnectionId, + ClientId: connectionEnd.ClientId, + CounterpartyClientId: connectionEnd.Counterparty.ClientId, + CounterpartyConnectionId: connectionEnd.Counterparty.ConnectionId, + }, + ); err != nil { + return nil, err + } return &connectiontypes.MsgConnectionOpenAckResponse{}, nil } @@ -235,19 +220,16 @@ func (k Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontype connectionEnd, _ := k.ConnectionKeeper.GetConnection(ctx, msg.ConnectionId) - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - connectiontypes.EventTypeConnectionOpenConfirm, - sdk.NewAttribute(connectiontypes.AttributeKeyConnectionID, msg.ConnectionId), - sdk.NewAttribute(connectiontypes.AttributeKeyClientID, connectionEnd.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientId), - sdk.NewAttribute(connectiontypes.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionId), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - }) + if err := ctx.EventManager().EmitTypedEvent( + &connectiontypes.EventConnectionOpenConfirm{ + ConnectionId: msg.ConnectionId, + ClientId: connectionEnd.ClientId, + CounterpartyClientId: connectionEnd.Counterparty.ClientId, + CounterpartyConnectionId: connectionEnd.Counterparty.ConnectionId, + }, + ); err != nil { + return nil, err + } return &connectiontypes.MsgConnectionOpenConfirmResponse{}, nil } From 8d7747e66d90621c9b168b1109da87929bc5f247 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Fri, 30 Oct 2020 14:50:17 +0530 Subject: [PATCH 14/24] Add TestPackHeight --- x/ibc/core/02-client/types/codec_test.go | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index 9ea6642629db..bf22497a3e20 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -208,3 +208,50 @@ func (suite *TypesTestSuite) TestPackMisbehaviour() { } } } + +func (suite *TypesTestSuite) TestPackHeight() { + testCases := []struct { + name string + height exported.Height + expPass bool + }{ + { + "solo machine height", + ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).GetHeight(), + true, + }, + { + "tendermint height", + suite.chainA.LastHeader.GetHeight(), + true, + }, + { + "nil", + nil, + false, + }, + } + + testCasesAny := []caseAny{} + + for _, tc := range testCases { + clientAny, err := types.PackHeight(tc.height) + if tc.expPass { + suite.Require().NoError(err, tc.name) + } else { + suite.Require().Error(err, tc.name) + } + + testCasesAny = append(testCasesAny, caseAny{tc.name, clientAny, tc.expPass}) + } + + for i, tc := range testCasesAny { + cs, err := types.UnpackHeight(tc.any) + if tc.expPass { + suite.Require().NoError(err, tc.name) + suite.Require().Equal(testCases[i].height, cs, tc.name) + } else { + suite.Require().Error(err, tc.name) + } + } +} From d998bd90fd9c1c3ea56df426daddbb22e0382746 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 3 Nov 2020 14:15:49 +0530 Subject: [PATCH 15/24] Use *Height instead of Height --- proto/ibc/applications/transfer/v1/tx.proto | 2 +- proto/ibc/core/channel/v1/channel.proto | 2 +- proto/ibc/core/channel/v1/query.proto | 22 +- proto/ibc/core/channel/v1/tx.proto | 16 +- proto/ibc/core/client/v1/client.proto | 2 +- proto/ibc/core/client/v1/query.proto | 4 +- proto/ibc/core/connection/v1/query.proto | 10 +- proto/ibc/core/connection/v1/tx.proto | 10 +- .../lightclients/localhost/v1/localhost.proto | 2 +- .../tendermint/v1/tendermint.proto | 6 +- x/ibc/applications/transfer/keeper/relay.go | 2 +- x/ibc/applications/transfer/types/msgs.go | 2 +- x/ibc/applications/transfer/types/tx.pb.go | 93 +-- x/ibc/core/02-client/abci_test.go | 2 +- x/ibc/core/02-client/client/cli/query.go | 2 +- x/ibc/core/02-client/keeper/client_test.go | 4 +- x/ibc/core/02-client/keeper/keeper.go | 2 +- x/ibc/core/02-client/keeper/keeper_test.go | 10 +- x/ibc/core/02-client/types/client.go | 2 +- x/ibc/core/02-client/types/client.pb.go | 135 ++--- x/ibc/core/02-client/types/client_test.go | 2 +- x/ibc/core/02-client/types/genesis_test.go | 4 +- x/ibc/core/02-client/types/height.go | 46 +- x/ibc/core/02-client/types/height_test.go | 6 +- x/ibc/core/02-client/types/msgs.go | 4 +- x/ibc/core/02-client/types/query.go | 4 +- x/ibc/core/02-client/types/query.pb.go | 156 ++--- .../core/03-connection/client/utils/utils.go | 2 +- x/ibc/core/03-connection/types/msgs.go | 6 +- x/ibc/core/03-connection/types/query.go | 8 +- x/ibc/core/03-connection/types/query.pb.go | 279 +++++---- x/ibc/core/03-connection/types/tx.pb.go | 294 +++++----- x/ibc/core/04-channel/client/utils/utils.go | 18 +- x/ibc/core/04-channel/keeper/packet_test.go | 2 +- x/ibc/core/04-channel/types/channel.pb.go | 147 ++--- x/ibc/core/04-channel/types/msgs.go | 16 +- x/ibc/core/04-channel/types/packet.go | 2 +- x/ibc/core/04-channel/types/query.go | 12 +- x/ibc/core/04-channel/types/query.pb.go | 534 ++++++++++-------- x/ibc/core/04-channel/types/tx.pb.go | 444 ++++++++------- x/ibc/core/client/query.go | 8 +- x/ibc/core/genesis_test.go | 4 +- x/ibc/core/keeper/msg_server_test.go | 4 +- .../07-tendermint/client/cli/tx.go | 2 +- .../07-tendermint/types/client_state.go | 2 +- .../07-tendermint/types/header_test.go | 2 +- .../07-tendermint/types/misbehaviour.go | 2 +- .../types/misbehaviour_handle.go | 2 +- .../types/misbehaviour_handle_test.go | 6 +- .../types/proposal_handle_test.go | 2 +- .../07-tendermint/types/store_test.go | 2 +- .../07-tendermint/types/tendermint.pb.go | 233 ++++---- .../07-tendermint/types/update.go | 2 +- .../07-tendermint/types/update_test.go | 2 +- .../07-tendermint/types/upgrade_test.go | 2 +- .../09-localhost/types/client_state.go | 2 +- .../09-localhost/types/localhost.pb.go | 51 +- x/ibc/testing/chain.go | 16 +- 58 files changed, 1462 insertions(+), 1198 deletions(-) diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index eb2e12e5df16..a199729ec11b 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -33,7 +33,7 @@ message MsgTransfer { // Timeout height relative to the current block height. // The timeout is disabled when set to 0. ibc.core.client.v1.Height timeout_height = 6 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"timeout_height\""]; // Timeout timestamp (in nanoseconds) relative to the current block timestamp. // The timeout is disabled when set to 0. uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 376ce9764e63..dd2d4fc8595d 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -109,7 +109,7 @@ message Packet { bytes data = 6; // block height after which the packet times out ibc.core.client.v1.Height timeout_height = 7 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"timeout_height\""]; // block timestamp (in nanoseconds) after which the packet times out uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; } diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 16faf462d560..5f33b6c6b36a 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -95,7 +95,7 @@ message QueryChannelResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -111,7 +111,7 @@ message QueryChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 3; } // QueryConnectionChannelsRequest is the request type for the @@ -131,7 +131,7 @@ message QueryConnectionChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 3; } // QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -151,7 +151,7 @@ message QueryChannelClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryChannelConsensusStateRequest is the request type for the @@ -177,7 +177,7 @@ message QueryChannelConsensusStateResponse { // merkle proof of existence bytes proof = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 4; } // QueryPacketCommitmentRequest is the request type for the @@ -200,7 +200,7 @@ message QueryPacketCommitmentResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryPacketCommitmentsRequest is the request type for the @@ -221,7 +221,7 @@ message QueryPacketCommitmentsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 3; } // QueryPacketAcknowledgementRequest is the request type for the @@ -244,7 +244,7 @@ message QueryPacketAcknowledgementResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryUnreceivedPacketsRequest is the request type for the @@ -264,7 +264,7 @@ message QueryUnreceivedPacketsResponse { // list of unreceived packet sequences repeated uint64 sequences = 1; // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 2; } // QueryUnrelayedAcksRequest is the request type for the @@ -284,7 +284,7 @@ message QueryUnrelayedAcksResponse { // list of unrelayed acknowledgement sequences repeated uint64 sequences = 1; // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 2; } // QueryNextSequenceReceiveRequest is the request type for the @@ -304,5 +304,5 @@ message QueryNextSequenceReceiveResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 0426c741b9a2..b94cfca1b7cc 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -68,7 +68,7 @@ message MsgChannelOpenTry { string counterparty_version = 5 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_init = 6 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 8; } @@ -87,7 +87,7 @@ message MsgChannelOpenAck { string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 7; } @@ -104,7 +104,7 @@ message MsgChannelOpenConfirm { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 5; } @@ -135,7 +135,7 @@ message MsgChannelCloseConfirm { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 5; } @@ -150,7 +150,7 @@ message MsgRecvPacket { Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof = 2; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 4; } @@ -165,7 +165,7 @@ message MsgTimeout { Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof = 2; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; string signer = 5; } @@ -182,7 +182,7 @@ message MsgTimeoutOnClose { bytes proof = 2; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; string signer = 6; } @@ -199,7 +199,7 @@ message MsgAcknowledgement { bytes acknowledgement = 2; bytes proof = 3; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 5; } diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 118318c246c8..5e81ead6fd78 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -103,7 +103,7 @@ message IdentifiedClientState { // ConsensusStateWithHeight defines a consensus state with an additional height field. message ConsensusStateWithHeight { // consensus state height - Height height = 1 [(gogoproto.nullable) = false]; + Height height = 1; // consensus state google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""]; } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index a40fed843e5b..a2f32595bc50 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -51,7 +51,7 @@ message QueryClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -93,7 +93,7 @@ message QueryConsensusStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index c2666ee28a03..ed1ceef054d4 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -58,7 +58,7 @@ message QueryConnectionResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -75,7 +75,7 @@ message QueryConnectionsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 3; } // QueryClientConnectionsRequest is the request type for the @@ -93,7 +93,7 @@ message QueryClientConnectionsResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryConnectionClientStateRequest is the request type for the @@ -111,7 +111,7 @@ message QueryConnectionClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3; } // QueryConnectionConsensusStateRequest is the request type for the @@ -133,5 +133,5 @@ message QueryConnectionConsensusStateResponse { // merkle proof of existence bytes proof = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 4; } diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 8de521886bd4..311d291198f0 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -52,7 +52,7 @@ message MsgConnectionOpenTry { Counterparty counterparty = 5 [(gogoproto.nullable) = false]; repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; @@ -61,7 +61,7 @@ message MsgConnectionOpenTry { // proof of client consensus state bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.core.client.v1.Height consensus_height = 11 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"consensus_height\""]; string signer = 12; } @@ -79,7 +79,7 @@ message MsgConnectionOpenAck { Version version = 3; google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; ibc.core.client.v1.Height proof_height = 5 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; // proof of the initialization the connection on Chain B: `UNITIALIZED -> // TRYOPEN` bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; @@ -88,7 +88,7 @@ message MsgConnectionOpenAck { // proof of client consensus state bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.core.client.v1.Height consensus_height = 9 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"consensus_height\""]; string signer = 10; } @@ -105,7 +105,7 @@ message MsgConnectionOpenConfirm { // proof for the change of the connection state on Chain A: `INIT -> OPEN` bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + [(gogoproto.moretags) = "yaml:\"proof_height\""]; string signer = 4; } diff --git a/proto/ibc/lightclients/localhost/v1/localhost.proto b/proto/ibc/lightclients/localhost/v1/localhost.proto index d48a1c0076be..d6fe1c63c77f 100644 --- a/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -13,5 +13,5 @@ message ClientState { // self chain ID string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""]; // self latest block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height height = 2; } diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index c592a9b5daea..86a84389e365 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -35,10 +35,10 @@ message ClientState { [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; // Block height when the client was frozen due to a misbehaviour ibc.core.client.v1.Height frozen_height = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; + [(gogoproto.moretags) = "yaml:\"frozen_height\""]; // Latest height the client was updated to ibc.core.client.v1.Height latest_height = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; + [(gogoproto.moretags) = "yaml:\"latest_height\""]; // Consensus params of the chain .tendermint.abci.ConsensusParams consensus_params = 8 [(gogoproto.moretags) = "yaml:\"consensus_params\""]; @@ -102,7 +102,7 @@ message Header { .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; ibc.core.client.v1.Height trusted_height = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; + [(gogoproto.moretags) = "yaml:\"trusted_height\""]; .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; } diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index bdef277dd6f1..5da52368a525 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -53,7 +53,7 @@ func (k Keeper) SendTransfer( token sdk.Coin, sender sdk.AccAddress, receiver string, - timeoutHeight clienttypes.Height, + timeoutHeight *clienttypes.Height, timeoutTimestamp uint64, ) error { diff --git a/x/ibc/applications/transfer/types/msgs.go b/x/ibc/applications/transfer/types/msgs.go index 25ff69e71547..d0b32bca125f 100644 --- a/x/ibc/applications/transfer/types/msgs.go +++ b/x/ibc/applications/transfer/types/msgs.go @@ -17,7 +17,7 @@ const ( func NewMsgTransfer( sourcePort, sourceChannel string, token sdk.Coin, sender sdk.AccAddress, receiver string, - timeoutHeight clienttypes.Height, timeoutTimestamp uint64, + timeoutHeight *clienttypes.Height, timeoutTimestamp uint64, ) *MsgTransfer { return &MsgTransfer{ SourcePort: sourcePort, diff --git a/x/ibc/applications/transfer/types/tx.pb.go b/x/ibc/applications/transfer/types/tx.pb.go index dd46dbe2610e..62ae89605489 100644 --- a/x/ibc/applications/transfer/types/tx.pb.go +++ b/x/ibc/applications/transfer/types/tx.pb.go @@ -46,7 +46,7 @@ type MsgTransfer struct { Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` // Timeout height relative to the current block height. // The timeout is disabled when set to 0. - TimeoutHeight types1.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutHeight *types1.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty" yaml:"timeout_height"` // Timeout timestamp (in nanoseconds) relative to the current block timestamp. // The timeout is disabled when set to 0. TimeoutTimestamp uint64 `protobuf:"varint,7,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` @@ -132,38 +132,38 @@ func init() { } var fileDescriptor_7401ed9bed2f8e09 = []byte{ - // 488 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0x13, 0xd6, 0x95, 0xe2, 0x6a, 0x13, 0x18, 0x36, 0x65, 0xd5, 0x48, 0xaa, 0x48, 0x48, - 0xe5, 0x80, 0xad, 0x0c, 0x21, 0xa4, 0x1d, 0x10, 0xca, 0x2e, 0x70, 0x98, 0x84, 0xa2, 0x1d, 0x10, - 0x97, 0x91, 0x78, 0x26, 0xb1, 0xd6, 0xd8, 0x91, 0xed, 0x46, 0xdb, 0x37, 0xe0, 0xc8, 0x47, 0xd8, - 0x99, 0x4f, 0xb2, 0xe3, 0x8e, 0x9c, 0x2a, 0xd4, 0x5e, 0x38, 0xf7, 0x13, 0xa0, 0xc4, 0x6e, 0x69, - 0x0f, 0x20, 0x4e, 0xf1, 0x7b, 0xff, 0xdf, 0xf3, 0x5f, 0xcf, 0xef, 0x05, 0x3c, 0x63, 0x19, 0xc1, - 0x69, 0x55, 0x8d, 0x19, 0x49, 0x35, 0x13, 0x5c, 0x61, 0x2d, 0x53, 0xae, 0xbe, 0x50, 0x89, 0xeb, - 0x08, 0xeb, 0x2b, 0x54, 0x49, 0xa1, 0x05, 0x3c, 0x64, 0x19, 0x41, 0xeb, 0x18, 0x5a, 0x62, 0xa8, - 0x8e, 0x06, 0x4f, 0x72, 0x91, 0x8b, 0x16, 0xc4, 0xcd, 0xc9, 0xd4, 0x0c, 0x7c, 0x22, 0x54, 0x29, - 0x14, 0xce, 0x52, 0x45, 0x71, 0x1d, 0x65, 0x54, 0xa7, 0x11, 0x26, 0x82, 0x71, 0xab, 0x07, 0x8d, - 0x35, 0x11, 0x92, 0x62, 0x32, 0x66, 0x94, 0xeb, 0xc6, 0xd0, 0x9c, 0x0c, 0x10, 0x7e, 0xdf, 0x02, - 0xfd, 0x53, 0x95, 0x9f, 0x59, 0x27, 0xf8, 0x1a, 0xf4, 0x95, 0x98, 0x48, 0x42, 0xcf, 0x2b, 0x21, - 0xb5, 0xe7, 0x0e, 0xdd, 0xd1, 0x83, 0x78, 0x7f, 0x31, 0x0d, 0xe0, 0x75, 0x5a, 0x8e, 0x8f, 0xc3, - 0x35, 0x31, 0x4c, 0x80, 0x89, 0x3e, 0x08, 0xa9, 0xe1, 0x5b, 0xb0, 0x6b, 0x35, 0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x01, 0x7a, 0xab, 0x31, 0x3e, 0x47, 0xff, 0x5a, 0x26, 0xb4, 0x76, 0xcb, 0x20, - 0xfa, 0x6f, 0x74, 0x69, 0x18, 0x7f, 0xbc, 0x9d, 0xf9, 0xee, 0xdd, 0xcc, 0x77, 0x7f, 0xce, 0x7c, - 0xf7, 0xdb, 0xdc, 0x77, 0xee, 0xe6, 0xbe, 0xf3, 0x63, 0xee, 0x3b, 0x9f, 0xde, 0xe4, 0x4c, 0x17, - 0x93, 0x0c, 0x11, 0x51, 0x62, 0xbb, 0x9a, 0xe6, 0xf3, 0x42, 0x5d, 0x5c, 0xe2, 0x2b, 0xfc, 0xf7, - 0x3f, 0x41, 0x5f, 0x57, 0x54, 0x65, 0xdd, 0x76, 0x2b, 0x5f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, - 0x26, 0x76, 0x5b, 0xfa, 0x33, 0x03, 0x00, 0x00, + // 484 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6b, 0xdb, 0x30, + 0x14, 0xc7, 0xed, 0x25, 0xcd, 0x32, 0x85, 0x96, 0x4d, 0x5b, 0x8b, 0x1b, 0x8a, 0x1d, 0x0c, 0x83, + 0xec, 0x30, 0x09, 0x77, 0x8c, 0x41, 0x0f, 0x63, 0xa4, 0x97, 0xed, 0x50, 0x18, 0xa6, 0x87, 0x31, + 0x06, 0xc5, 0x56, 0x35, 0x5b, 0x34, 0x96, 0x8c, 0xa4, 0x98, 0xf6, 0x1b, 0xec, 0xb8, 0x8f, 0xd0, + 0xd3, 0x3e, 0x4b, 0x8f, 0x3d, 0xee, 0x14, 0x46, 0x72, 0xd9, 0x39, 0x9f, 0x60, 0xd8, 0x52, 0x82, + 0x73, 0xd8, 0xd8, 0xc9, 0x7a, 0xef, 0xff, 0x7b, 0xfa, 0xf3, 0xf4, 0x9e, 0xc1, 0x73, 0x96, 0x12, + 0x9c, 0x94, 0xe5, 0x94, 0x91, 0x44, 0x33, 0xc1, 0x15, 0xd6, 0x32, 0xe1, 0xea, 0x2b, 0x95, 0xb8, + 0x8a, 0xb0, 0xbe, 0x46, 0xa5, 0x14, 0x5a, 0xc0, 0x23, 0x96, 0x12, 0xd4, 0xc6, 0xd0, 0x1a, 0x43, + 0x55, 0x34, 0x7c, 0x96, 0x89, 0x4c, 0x34, 0x20, 0xae, 0x4f, 0xa6, 0x66, 0xe8, 0x13, 0xa1, 0x0a, + 0xa1, 0x70, 0x9a, 0x28, 0x8a, 0xab, 0x28, 0xa5, 0x3a, 0x89, 0x30, 0x11, 0x8c, 0x5b, 0x3d, 0xa8, + 0xad, 0x89, 0x90, 0x14, 0x93, 0x29, 0xa3, 0x5c, 0xd7, 0x86, 0xe6, 0x64, 0x80, 0xf0, 0x47, 0x07, + 0x0c, 0xce, 0x54, 0x76, 0x6e, 0x9d, 0xe0, 0x1b, 0x30, 0x50, 0x62, 0x26, 0x09, 0xbd, 0x28, 0x85, + 0xd4, 0x9e, 0x3b, 0x72, 0xc7, 0x8f, 0x26, 0x07, 0xab, 0x79, 0x00, 0x6f, 0x92, 0x62, 0x7a, 0x12, + 0xb6, 0xc4, 0x30, 0x06, 0x26, 0xfa, 0x28, 0xa4, 0x86, 0xef, 0xc0, 0x9e, 0xd5, 0x48, 0x9e, 0x70, + 0x4e, 0xa7, 0xde, 0x83, 0xa6, 0xf6, 0x70, 0x35, 0x0f, 0xf6, 0xb7, 0x6a, 0xad, 0x1e, 0xc6, 0xbb, + 0x26, 0x71, 0x6a, 0x62, 0xf8, 0x1a, 0xec, 0x68, 0x71, 0x45, 0xb9, 0xd7, 0x19, 0xb9, 0xe3, 0xc1, + 0xf1, 0x21, 0x32, 0xbd, 0xa1, 0xba, 0x37, 0x64, 0x7b, 0x43, 0xa7, 0x82, 0xf1, 0x49, 0xf7, 0x6e, + 0x1e, 0x38, 0xb1, 0xa1, 0xe1, 0x01, 0xe8, 0x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, 0x7d, 0x53, + 0x52, 0x95, 0xf6, 0x9a, 0x8d, 0x7c, 0xf5, 0x27, 0x00, 0x00, 0xff, 0xff, 0x80, 0x36, 0xfd, 0x4e, + 0x2f, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -273,16 +273,18 @@ func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - i-- - dAtA[i] = 0x32 if len(m.Receiver) > 0 { i -= len(m.Receiver) copy(dAtA[i:], m.Receiver) @@ -382,8 +384,10 @@ func (m *MsgTransfer) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.TimeoutHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } if m.TimeoutTimestamp != 0 { n += 1 + sovTx(uint64(m.TimeoutTimestamp)) } @@ -624,6 +628,9 @@ func (m *MsgTransfer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types1.Height{} + } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/02-client/abci_test.go b/x/ibc/core/02-client/abci_test.go index fe9016750f99..83b58daa34e4 100644 --- a/x/ibc/core/02-client/abci_test.go +++ b/x/ibc/core/02-client/abci_test.go @@ -55,6 +55,6 @@ func (suite *ClientTestSuite) TestBeginBlocker() { localHostClient = suite.chainA.GetClientState(exported.Localhost) suite.Require().Equal(prevHeight.Increment(), localHostClient.GetLatestHeight()) - prevHeight = localHostClient.GetLatestHeight().(types.Height) + prevHeight = localHostClient.GetLatestHeight().(*types.Height) } } diff --git a/x/ibc/core/02-client/client/cli/query.go b/x/ibc/core/02-client/client/cli/query.go index 9d4ad4c19d3b..93a02c52ddd2 100644 --- a/x/ibc/core/02-client/client/cli/query.go +++ b/x/ibc/core/02-client/client/cli/query.go @@ -159,7 +159,7 @@ If the '--latest' flag is included, the query returns the latest consensus state queryLatestHeight, _ := cmd.Flags().GetBool(flagLatestHeight) - var height types.Height + var height *types.Height if !queryLatestHeight { if len(args) != 2 { diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index 31cf5d80fe4d..b5834511c56c 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -58,7 +58,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { // Must create header creation functions since suite.header gets recreated on each test case createFutureUpdateFn := func(s *KeeperTestSuite) *ibctmtypes.Header { heightPlus3 := clienttypes.NewHeight(suite.header.GetHeight().GetVersionNumber(), suite.header.GetHeight().GetVersionHeight()+3) - height := suite.header.GetHeight().(clienttypes.Height) + height := suite.header.GetHeight().(*clienttypes.Height) return suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus3.VersionHeight), height, suite.header.Header.Time.Add(time.Hour), suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) @@ -231,7 +231,7 @@ func (suite *KeeperTestSuite) TestUpdateClientLocalhost() { clientState, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(ctx, exported.Localhost) suite.Require().True(found) - suite.Require().Equal(localhostClient.GetLatestHeight().(types.Height).Increment(), clientState.GetLatestHeight()) + suite.Require().Equal(localhostClient.GetLatestHeight().(*types.Height).Increment(), clientState.GetLatestHeight()) } func (suite *KeeperTestSuite) TestUpgradeClient() { diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 68220db8af59..b86d17140608 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -176,7 +176,7 @@ func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, max // and returns the expected consensus state at that height. // For now, can only retrieve self consensus states for the current version func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, bool) { - selfHeight, ok := height.(types.Height) + selfHeight, ok := height.(*types.Height) if !ok { return nil, false } diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 11db64a4d6ec..fbad969cd4cb 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -296,7 +296,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() { suite.ctx = suite.ctx.WithBlockHeight(10) cases := []struct { name string - height types.Height + height *types.Height expPass bool }{ {"zero height", types.ZeroHeight(), false}, @@ -333,7 +333,7 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) // mock update functionality - clientState.LatestHeight = header.GetHeight().(types.Height) + clientState.LatestHeight = header.GetHeight().(*types.Height) suite.keeper.SetClientConsensusState(suite.ctx, testClientID, header.GetHeight(), nextState) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) @@ -384,11 +384,11 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { expConsensusStates := types.ClientsConsensusStates{ types.NewClientConsensusStates(clientA, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight0.(types.Height), expConsensus[0]), - types.NewConsensusStateWithHeight(expConsensusHeight1.(types.Height), expConsensus[1]), + types.NewConsensusStateWithHeight(expConsensusHeight0.(*types.Height), expConsensus[0]), + types.NewConsensusStateWithHeight(expConsensusHeight1.(*types.Height), expConsensus[1]), }), types.NewClientConsensusStates(clientA2, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight2.(types.Height), expConsensus2[0]), + types.NewConsensusStateWithHeight(expConsensusHeight2.(*types.Height), expConsensus2[0]), }), }.Sort() diff --git a/x/ibc/core/02-client/types/client.go b/x/ibc/core/02-client/types/client.go index 99fe98e19efb..f90b94dff536 100644 --- a/x/ibc/core/02-client/types/client.go +++ b/x/ibc/core/02-client/types/client.go @@ -38,7 +38,7 @@ func (ics IdentifiedClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacke } // NewConsensusStateWithHeight creates a new ConsensusStateWithHeight instance -func NewConsensusStateWithHeight(height Height, consensusState exported.ConsensusState) ConsensusStateWithHeight { +func NewConsensusStateWithHeight(height *Height, consensusState exported.ConsensusState) ConsensusStateWithHeight { msg, ok := consensusState.(proto.Message) if !ok { panic(fmt.Errorf("cannot proto marshal %T", consensusState)) diff --git a/x/ibc/core/02-client/types/client.pb.go b/x/ibc/core/02-client/types/client.pb.go index aa9bd5c3d3b3..cf8bee8d51fe 100644 --- a/x/ibc/core/02-client/types/client.pb.go +++ b/x/ibc/core/02-client/types/client.pb.go @@ -452,7 +452,7 @@ func (m *IdentifiedClientState) GetClientState() *types.Any { // ConsensusStateWithHeight defines a consensus state with an additional height field. type ConsensusStateWithHeight struct { // consensus state height - Height Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` + Height *Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` // consensus state ConsensusState *types.Any `protobuf:"bytes,2,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml"consensus_state"` } @@ -490,11 +490,11 @@ func (m *ConsensusStateWithHeight) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusStateWithHeight proto.InternalMessageInfo -func (m *ConsensusStateWithHeight) GetHeight() Height { +func (m *ConsensusStateWithHeight) GetHeight() *Height { if m != nil { return m.Height } - return Height{} + return nil } func (m *ConsensusStateWithHeight) GetConsensusState() *types.Any { @@ -674,59 +674,59 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x3f, 0x6f, 0x1a, 0x49, - 0x14, 0x67, 0x01, 0x23, 0x7b, 0x00, 0xdb, 0xda, 0x03, 0x1b, 0xaf, 0x74, 0x2c, 0x9a, 0xbb, 0xc2, - 0xa7, 0xb3, 0x77, 0x0f, 0xae, 0x38, 0xcb, 0xd2, 0x49, 0x77, 0xd0, 0x9c, 0x0b, 0x4e, 0xbe, 0xb5, - 0x4e, 0xf9, 0xa3, 0x48, 0x64, 0xff, 0x8c, 0x97, 0x51, 0x60, 0x07, 0xed, 0x2c, 0xc8, 0x7c, 0x83, - 0x94, 0x91, 0x12, 0x45, 0x29, 0x52, 0x58, 0x29, 0x52, 0xa6, 0xcb, 0x37, 0x48, 0xe1, 0x22, 0x85, - 0xcb, 0x54, 0x28, 0xb2, 0x9b, 0xd4, 0x7c, 0x82, 0x68, 0x77, 0xc6, 0xab, 0x5d, 0x0c, 0x98, 0x38, - 0x8d, 0x2b, 0xf6, 0xbd, 0xf9, 0xcd, 0xef, 0xbd, 0xf7, 0x9b, 0x37, 0x6f, 0x00, 0x32, 0x36, 0x4c, - 0xd5, 0x24, 0x2e, 0x52, 0xcd, 0x0e, 0x46, 0x8e, 0xa7, 0x0e, 0xaa, 0xfc, 0x4b, 0xe9, 0xb9, 0xc4, - 0x23, 0xa2, 0x88, 0x0d, 0x53, 0xf1, 0x01, 0x0a, 0x77, 0x0f, 0xaa, 0x52, 0xc1, 0x26, 0x36, 0x09, - 0x96, 0x55, 0xff, 0x8b, 0x21, 0xa5, 0x2d, 0x9b, 0x10, 0xbb, 0x83, 0xd4, 0xc0, 0x32, 0xfa, 0xc7, - 0xaa, 0xee, 0x0c, 0xd9, 0x12, 0x7c, 0x9e, 0x04, 0x6b, 0x4d, 0x6a, 0x37, 0x5c, 0xa4, 0x7b, 0xa8, - 0x11, 0xf0, 0x88, 0x55, 0xb0, 0xc2, 0x18, 0x5b, 0xd8, 0x2a, 0x09, 0x15, 0x61, 0x7b, 0xa5, 0x5e, - 0x18, 0x8f, 0xe4, 0xf5, 0xa1, 0xde, 0xed, 0xec, 0xc3, 0x70, 0x09, 0x6a, 0xcb, 0xec, 0xfb, 0xc0, - 0x12, 0x0f, 0x41, 0x8e, 0xfb, 0xa9, 0xa7, 0x7b, 0xa8, 0x94, 0xac, 0x08, 0xdb, 0xd9, 0x5a, 0x41, - 0x61, 0x81, 0x95, 0xab, 0xc0, 0xca, 0xdf, 0xce, 0xb0, 0xbe, 0x39, 0x1e, 0xc9, 0x3f, 0xc4, 0xb8, - 0x82, 0x3d, 0x50, 0xcb, 0x32, 0xf3, 0xc8, 0xb7, 0xc4, 0x07, 0x60, 0xcd, 0x24, 0x0e, 0x45, 0x0e, - 0xed, 0x53, 0x4e, 0x9a, 0x9a, 0x43, 0x2a, 0x8d, 0x47, 0xf2, 0x06, 0x27, 0x8d, 0x6f, 0x83, 0xda, - 0x6a, 0xe8, 0x61, 0xd4, 0x1b, 0x20, 0x43, 0xb1, 0xed, 0x20, 0xb7, 0x94, 0xf6, 0x8b, 0xd3, 0xb8, - 0xb5, 0xbf, 0xfc, 0xf4, 0x54, 0x4e, 0x7c, 0x39, 0x95, 0x13, 0x70, 0x0b, 0x6c, 0x4e, 0x88, 0xa2, - 0x21, 0xda, 0xf3, 0x59, 0xe0, 0x0b, 0x21, 0x10, 0xec, 0xff, 0x9e, 0xf5, 0x5d, 0x82, 0xed, 0x80, + // 824 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0xda, 0x48, + 0x14, 0xc7, 0x40, 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xb6, 0xf8, 0x18, 0xe4, 0x62, 0x6f, - 0xf0, 0x4f, 0xd3, 0x0e, 0x72, 0xe2, 0x4d, 0x92, 0x7e, 0x5d, 0x00, 0x74, 0x75, 0xa3, 0xfd, 0x08, - 0xb1, 0x47, 0x6b, 0x56, 0x84, 0x28, 0x68, 0x66, 0x84, 0x69, 0x0f, 0x8d, 0x68, 0x82, 0x7c, 0xfc, - 0x91, 0xf9, 0x79, 0xe6, 0xee, 0x08, 0x4a, 0xda, 0x59, 0x04, 0x15, 0x06, 0x71, 0x81, 0x38, 0x65, - 0xbc, 0xfe, 0x32, 0x83, 0xe3, 0x3a, 0x54, 0xaa, 0x2e, 0x0c, 0xbd, 0x8a, 0x59, 0xff, 0xef, 0xec, - 0xa2, 0x2c, 0x9c, 0x5f, 0x94, 0x85, 0xcf, 0x17, 0x65, 0xe1, 0xd9, 0x65, 0x39, 0x71, 0x7e, 0x59, - 0x4e, 0x7c, 0xba, 0x2c, 0x27, 0x1e, 0xfe, 0x61, 0x63, 0xaf, 0xdd, 0x37, 0x14, 0x93, 0x74, 0x55, - 0x93, 0xd0, 0x2e, 0xa1, 0xfc, 0x67, 0x97, 0x5a, 0x4f, 0xd4, 0x13, 0x35, 0xfc, 0x0f, 0xf7, 0x5b, - 0x6d, 0x97, 0xff, 0x8d, 0xf3, 0x86, 0x3d, 0x44, 0x8d, 0x4c, 0xd0, 0xac, 0xbf, 0x7f, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0x06, 0xa7, 0xa2, 0x16, 0xe6, 0x09, 0x00, 0x00, + 0xa8, 0xe6, 0x50, 0x02, 0xa5, 0x49, 0x35, 0x43, 0xa9, 0xdf, 0x09, 0xa0, 0xd8, 0xa4, 0xf6, 0x61, + 0xdf, 0xe8, 0x62, 0xaf, 0x89, 0xa9, 0x81, 0xda, 0xfa, 0x00, 0x93, 0xbe, 0x7b, 0x13, 0xbd, 0xff, + 0x06, 0xb9, 0x6e, 0x84, 0x62, 0x6e, 0xa3, 0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a, 0xef, 0xe0, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1318,16 +1318,18 @@ func (m *ConsensusStateWithHeight) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x12 } - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintClient(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -1630,8 +1632,10 @@ func (m *ConsensusStateWithHeight) Size() (n int) { } var l int _ = l - l = m.Height.Size() - n += 1 + l + sovClient(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovClient(uint64(l)) + } if m.ConsensusState != nil { l = m.ConsensusState.Size() n += 1 + l + sovClient(uint64(l)) @@ -2813,6 +2817,9 @@ func (m *ConsensusStateWithHeight) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/02-client/types/client_test.go b/x/ibc/core/02-client/types/client_test.go index 3028980b89d1..9e5bdc70c3ba 100644 --- a/x/ibc/core/02-client/types/client_test.go +++ b/x/ibc/core/02-client/types/client_test.go @@ -27,7 +27,7 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { consensusState, ok := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(ok) - cswh = types.NewConsensusStateWithHeight(clientState.GetLatestHeight().(types.Height), consensusState) + cswh = types.NewConsensusStateWithHeight(clientState.GetLatestHeight().(*types.Height), consensusState) }, }, } diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 1de91033549f..7adb7ceb2fc3 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -81,7 +81,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(types.Height), + header.GetHeight().(*types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), @@ -109,7 +109,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(types.Height), + header.GetHeight().(*types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), diff --git a/x/ibc/core/02-client/types/height.go b/x/ibc/core/02-client/types/height.go index 72af4d56b258..d0fb07cead03 100644 --- a/x/ibc/core/02-client/types/height.go +++ b/x/ibc/core/02-client/types/height.go @@ -19,25 +19,25 @@ var _ exported.Height = (*Height)(nil) var IsVersionFormat = regexp.MustCompile(`^.+[^-]-{1}[1-9][0-9]*$`).MatchString // ZeroHeight is a helper function which returns an uninitialized height. -func ZeroHeight() Height { - return Height{} +func ZeroHeight() *Height { + return &Height{} } // NewHeight is a constructor for the IBC height type -func NewHeight(versionNumber, versionHeight uint64) Height { - return Height{ +func NewHeight(versionNumber, versionHeight uint64) *Height { + return &Height{ VersionNumber: versionNumber, VersionHeight: versionHeight, } } // GetVersionNumber returns the version-number of the height -func (h Height) GetVersionNumber() uint64 { +func (h *Height) GetVersionNumber() uint64 { return h.VersionNumber } // GetVersionHeight returns the version-height of the height -func (h Height) GetVersionHeight() uint64 { +func (h *Height) GetVersionHeight() uint64 { return h.VersionHeight } @@ -49,8 +49,8 @@ func (h Height) GetVersionHeight() uint64 { // // It first compares based on version numbers, whichever has the higher version number is the higher height // If version number is the same, then the version height is compared -func (h Height) Compare(other exported.Height) int64 { - height, ok := other.(Height) +func (h *Height) Compare(other exported.Height) int64 { + height, ok := other.(*Height) if !ok { panic(fmt.Sprintf("cannot compare against invalid height type: %T. expected height type: %T", other, h)) } @@ -69,29 +69,29 @@ func (h Height) Compare(other exported.Height) int64 { } // LT Helper comparison function returns true if h < other -func (h Height) LT(other exported.Height) bool { +func (h *Height) LT(other exported.Height) bool { return h.Compare(other) == -1 } // LTE Helper comparison function returns true if h <= other -func (h Height) LTE(other exported.Height) bool { +func (h *Height) LTE(other exported.Height) bool { cmp := h.Compare(other) return cmp <= 0 } // GT Helper comparison function returns true if h > other -func (h Height) GT(other exported.Height) bool { +func (h *Height) GT(other exported.Height) bool { return h.Compare(other) == 1 } // GTE Helper comparison function returns true if h >= other -func (h Height) GTE(other exported.Height) bool { +func (h *Height) GTE(other exported.Height) bool { cmp := h.Compare(other) return cmp >= 0 } // EQ Helper comparison function returns true if h == other -func (h Height) EQ(other exported.Height) bool { +func (h *Height) EQ(other exported.Height) bool { return h.Compare(other) == 0 } @@ -102,27 +102,27 @@ func (h Height) String() string { // Decrement will return a new height with the VersionHeight decremented // If the VersionHeight is already at lowest value (1), then false success flag is returend -func (h Height) Decrement() (decremented exported.Height, success bool) { +func (h *Height) Decrement() (decremented exported.Height, success bool) { if h.VersionHeight == 0 { - return Height{}, false + return &Height{}, false } return NewHeight(h.VersionNumber, h.VersionHeight-1), true } // Increment will return a height with the same version number but an // incremented version height -func (h Height) Increment() Height { +func (h *Height) Increment() *Height { return NewHeight(h.VersionNumber, h.VersionHeight+1) } // IsZero returns true if height version and version-height are both 0 -func (h Height) IsZero() bool { +func (h *Height) IsZero() bool { return h.VersionNumber == 0 && h.VersionHeight == 0 } // MustParseHeight will attempt to parse a string representation of a height and panic if // parsing fails. -func MustParseHeight(heightStr string) Height { +func MustParseHeight(heightStr string) *Height { height, err := ParseHeight(heightStr) if err != nil { panic(err) @@ -133,18 +133,18 @@ func MustParseHeight(heightStr string) Height { // ParseHeight is a utility function that takes a string representation of the height // and returns a Height struct -func ParseHeight(heightStr string) (Height, error) { +func ParseHeight(heightStr string) (*Height, error) { splitStr := strings.Split(heightStr, "-") if len(splitStr) != 2 { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr) + return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr) } versionNumber, err := strconv.ParseUint(splitStr[0], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err) + return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err) } versionHeight, err := strconv.ParseUint(splitStr[1], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err) + return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err) } return NewHeight(versionNumber, versionHeight), nil } @@ -184,7 +184,7 @@ func ParseChainID(chainID string) uint64 { // GetSelfHeight is a utility function that returns self height given context // Version number is retrieved from ctx.ChainID() -func GetSelfHeight(ctx sdk.Context) Height { +func GetSelfHeight(ctx sdk.Context) *Height { version := ParseChainID(ctx.ChainID()) return NewHeight(version, uint64(ctx.BlockHeight())) } diff --git a/x/ibc/core/02-client/types/height_test.go b/x/ibc/core/02-client/types/height_test.go index 33d33fd714f7..fb29ba814261 100644 --- a/x/ibc/core/02-client/types/height_test.go +++ b/x/ibc/core/02-client/types/height_test.go @@ -9,14 +9,14 @@ import ( ) func TestZeroHeight(t *testing.T) { - require.Equal(t, types.Height{}, types.ZeroHeight()) + require.Equal(t, &types.Height{}, types.ZeroHeight()) } func TestCompareHeights(t *testing.T) { testCases := []struct { name string - height1 types.Height - height2 types.Height + height1 *types.Height + height2 *types.Height compareSign int64 }{ {"version number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1}, diff --git a/x/ibc/core/02-client/types/msgs.go b/x/ibc/core/02-client/types/msgs.go index 7d3e4af219bf..87abdbf4aa7b 100644 --- a/x/ibc/core/02-client/types/msgs.go +++ b/x/ibc/core/02-client/types/msgs.go @@ -186,7 +186,7 @@ func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, upgr return nil, err } - height, ok := upgradeHeight.(Height) + height, ok := upgradeHeight.(*Height) if !ok { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected: %T, got: %T", &Height{}, upgradeHeight) } @@ -195,7 +195,7 @@ func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, upgr ClientId: clientID, ClientState: anyClient, ProofUpgrade: proofUpgrade, - UpgradeHeight: &height, + UpgradeHeight: height, Signer: signer.String(), }, nil } diff --git a/x/ibc/core/02-client/types/query.go b/x/ibc/core/02-client/types/query.go index 3f898dadb4b0..8f531827451b 100644 --- a/x/ibc/core/02-client/types/query.go +++ b/x/ibc/core/02-client/types/query.go @@ -6,7 +6,7 @@ import ( // NewQueryClientStateResponse creates a new QueryClientStateResponse instance. func NewQueryClientStateResponse( - clientStateAny *codectypes.Any, proof []byte, height Height, + clientStateAny *codectypes.Any, proof []byte, height *Height, ) *QueryClientStateResponse { return &QueryClientStateResponse{ ClientState: clientStateAny, @@ -17,7 +17,7 @@ func NewQueryClientStateResponse( // NewQueryConsensusStateResponse creates a new QueryConsensusStateResponse instance. func NewQueryConsensusStateResponse( - consensusStateAny *codectypes.Any, proof []byte, height Height, + consensusStateAny *codectypes.Any, proof []byte, height *Height, ) *QueryConsensusStateResponse { return &QueryConsensusStateResponse{ ConsensusState: consensusStateAny, diff --git a/x/ibc/core/02-client/types/query.pb.go b/x/ibc/core/02-client/types/query.pb.go index fb91ead13c0c..d8fcdd99b8d3 100644 --- a/x/ibc/core/02-client/types/query.pb.go +++ b/x/ibc/core/02-client/types/query.pb.go @@ -87,7 +87,7 @@ type QueryClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryClientStateResponse) Reset() { *m = QueryClientStateResponse{} } @@ -137,11 +137,11 @@ func (m *QueryClientStateResponse) GetProof() []byte { return nil } -func (m *QueryClientStateResponse) GetProofHeight() Height { +func (m *QueryClientStateResponse) GetProofHeight() *Height { if m != nil { return m.ProofHeight } - return Height{} + return nil } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -331,7 +331,7 @@ type QueryConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryConsensusStateResponse) Reset() { *m = QueryConsensusStateResponse{} } @@ -381,11 +381,11 @@ func (m *QueryConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConsensusStateResponse) GetProofHeight() Height { +func (m *QueryConsensusStateResponse) GetProofHeight() *Height { if m != nil { return m.ProofHeight } - return Height{} + return nil } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates @@ -514,54 +514,54 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 747 bytes of a gzipped FileDescriptorProto + // 748 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x4f, 0x13, 0x41, 0x14, 0xef, 0xf0, 0xc7, 0xc0, 0xb4, 0x80, 0x99, 0x90, 0x58, 0x16, 0x52, 0x6a, 0x89, 0x5a, 0x94, - 0xce, 0xd0, 0x1a, 0xc5, 0x8b, 0x07, 0x21, 0x41, 0xb9, 0x10, 0x59, 0x0f, 0x26, 0x26, 0x86, 0xec, + 0xce, 0xd0, 0x1a, 0xc5, 0x0b, 0x07, 0x31, 0x41, 0xb9, 0x10, 0x59, 0x0f, 0x26, 0x26, 0x86, 0xec, 0x6e, 0x87, 0xed, 0x44, 0xd8, 0x29, 0x9d, 0x69, 0x23, 0x21, 0x5c, 0xf8, 0x04, 0x26, 0x26, 0x5e, - 0xfd, 0x02, 0x86, 0x93, 0x89, 0xdf, 0xc0, 0x70, 0x24, 0x7a, 0xf1, 0x60, 0x8c, 0x01, 0x3f, 0x88, - 0xe9, 0xcc, 0x2c, 0xdd, 0x85, 0x25, 0xac, 0x46, 0x4f, 0x3b, 0xf3, 0xfe, 0xfe, 0xde, 0xef, 0xbd, - 0x79, 0x59, 0x58, 0x60, 0xae, 0x47, 0x3c, 0xde, 0xa2, 0xc4, 0xdb, 0x64, 0x34, 0x90, 0xa4, 0x53, - 0x25, 0xdb, 0x6d, 0xda, 0xda, 0xc1, 0xcd, 0x16, 0x97, 0x1c, 0x21, 0xe6, 0x7a, 0xb8, 0xab, 0xc7, - 0x5a, 0x8f, 0x3b, 0x55, 0xeb, 0xb6, 0xc7, 0xc5, 0x16, 0x17, 0xc4, 0x75, 0x04, 0xd5, 0xc6, 0xa4, - 0x53, 0x75, 0xa9, 0x74, 0xaa, 0xa4, 0xe9, 0xf8, 0x2c, 0x70, 0x24, 0xe3, 0x81, 0xf6, 0xb7, 0xa6, - 0x13, 0xe2, 0x9b, 0x48, 0xda, 0x60, 0xc2, 0xe7, 0xdc, 0xdf, 0xa4, 0x44, 0xdd, 0xdc, 0xf6, 0x06, - 0x71, 0x02, 0x93, 0xdb, 0x9a, 0x32, 0x2a, 0xa7, 0xc9, 0x88, 0x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0xcd, 0x26, 0xd5, 0xb1, 0x52, 0xa7, 0x81, 0x64, 0x1b, 0x8c, 0xd6, 0xa3, 0xfc, 0xe6, - 0x22, 0x5c, 0x09, 0xf4, 0x38, 0x86, 0xba, 0x4f, 0xa1, 0xbe, 0x75, 0x29, 0x6a, 0x0d, 0x26, 0x06, - 0xfb, 0x03, 0x80, 0x96, 0x86, 0xdd, 0x55, 0x05, 0xa2, 0x2d, 0x52, 0xcf, 0x01, 0xba, 0x01, 0x47, - 0x3b, 0xb4, 0x25, 0x18, 0x0f, 0xd6, 0x83, 0xf6, 0x96, 0x4b, 0x5b, 0x0a, 0xc8, 0x80, 0x3d, 0x62, - 0xa4, 0xab, 0x4a, 0x18, 0x35, 0x8b, 0x34, 0xb1, 0x67, 0xa6, 0x9b, 0x84, 0x66, 0xe0, 0xc8, 0x66, - 0xb7, 0x36, 0x19, 0x5a, 0x0d, 0x14, 0x41, 0x79, 0xc8, 0xce, 0x69, 0xa1, 0xe9, 0xe4, 0x27, 0x00, - 0x27, 0x13, 0xe1, 0x1a, 0x9e, 0x1f, 0xc2, 0x31, 0x2f, 0xd4, 0xa4, 0x18, 0xc0, 0x51, 0x2f, 0x16, - 0xe6, 0x7f, 0xce, 0xe0, 0x7e, 0x32, 0x72, 0x91, 0x8a, 0xe9, 0xe5, 0x84, 0x76, 0xff, 0xcd, 0x90, - 0x7e, 0x06, 0x70, 0x2a, 0x19, 0x84, 0xe1, 0xef, 0x25, 0xbc, 0x7a, 0x86, 0xbf, 0x70, 0x54, 0xe7, - 0x92, 0xca, 0x8d, 0x87, 0x79, 0xce, 0x64, 0x23, 0x46, 0xc0, 0x58, 0x9c, 0xde, 0x7f, 0x37, 0xb6, - 0xb5, 0x2f, 0x83, 0x70, 0x50, 0x15, 0x82, 0xde, 0x03, 0x98, 0x8d, 0xbc, 0x13, 0x74, 0x27, 0x09, - 0xe7, 0x05, 0x6b, 0xce, 0x9a, 0x4b, 0x67, 0xac, 0x01, 0x94, 0xee, 0xed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5, 0x80, 0x0c, 0xd8, 0x23, 0x46, 0xba, 0xaa, 0x84, 0x51, 0xb3, + 0x48, 0xfb, 0x7a, 0x66, 0xba, 0x49, 0x68, 0x06, 0x8e, 0x6c, 0x76, 0x6b, 0x93, 0xa1, 0xd5, 0x40, + 0x11, 0x94, 0x87, 0xec, 0x9c, 0x16, 0x9a, 0x4e, 0x7e, 0x04, 0x70, 0x32, 0x11, 0xae, 0xe1, 0x79, + 0x11, 0x8e, 0x79, 0xa1, 0x26, 0xc5, 0xe8, 0x8d, 0x7a, 0xb1, 0x30, 0xff, 0x67, 0xfa, 0xf6, 0x93, + 0x31, 0x8b, 0x54, 0x1c, 0x2f, 0x27, 0x34, 0xfa, 0x6f, 0xc6, 0xf3, 0x33, 0x80, 0x53, 0xc9, 0x20, + 0x0c, 0x73, 0xcf, 0xe1, 0xe5, 0x53, 0xcc, 0x85, 0x43, 0x3a, 0x97, 0x54, 0x68, 0x3c, 0xcc, 0x53, + 0x26, 0x1b, 0xba, 0xda, 0xa5, 0x81, 0x83, 0x1f, 0xd3, 0x19, 0x7b, 0x2c, 0x4e, 0xec, 0xbf, 0x1b, + 0xd8, 0xda, 0x97, 0x41, 0x38, 0xa8, 0x0a, 0x41, 0x6f, 0x01, 0xcc, 0x46, 0x5e, 0x08, 0xba, 0x95, + 0x84, 0xf3, 0x9c, 0xd5, 0x66, 0xcd, 0xa5, 0x33, 0xd6, 0x00, 0x4a, 0x77, 0xf6, 0xbf, 0xfe, 0x7a, + 0xdd, 0x47, 0x50, 0x85, 0xa8, 0xe5, 0x1c, 0xee, 0x65, 0xbd, 0xc1, 0x63, 0x0f, 0x9b, 0xec, 0x9e, + 0xf4, 0x72, 0x0f, 0xbd, 0x01, 0x30, 0x17, 0x5d, 0x07, 0x28, 0x55, 0xd6, 0x70, 0x30, 0xac, 0x4a, + 0x4a, 0x6b, 0x03, 0x72, 0x56, 0x81, 0x9c, 0x41, 0x57, 0x2f, 0x04, 0x89, 0xbe, 0x03, 0x38, 0x1a, + 0xef, 0x20, 0xc2, 0xe7, 0x27, 0x4b, 0xda, 0x0c, 0x16, 0x49, 0x6d, 0x6f, 0xe0, 0x31, 0x05, 0xcf, + 0x43, 0x4e, 0x22, 0xbc, 0x53, 0xa3, 0x17, 0xa5, 0x91, 0x98, 0x3d, 0x41, 0x76, 0xe3, 0xdb, 0x66, + 0x8f, 0xe8, 0xf7, 0xd8, 0x93, 0xeb, 0xfb, 0x1e, 0xfa, 0x00, 0xe0, 0xd8, 0xa9, 0x39, 0x47, 0x69, + 0xf1, 0x9e, 0xb0, 0x3f, 0x9f, 0xde, 0xc1, 0x54, 0x78, 0x4f, 0x55, 0x58, 0x43, 0xf3, 0x7f, 0x5a, + 0xe1, 0xd2, 0xda, 0xc1, 0x51, 0x01, 0x1c, 0x1e, 0x15, 0xc0, 0xcf, 0xa3, 0x02, 0x78, 0x75, 0x5c, + 0xc8, 0x1c, 0x1e, 0x17, 0x32, 0xdf, 0x8e, 0x0b, 0x99, 0x67, 0x0b, 0x3e, 0x93, 0x8d, 0xb6, 0x8b, + 0x3d, 0xbe, 0x45, 0xcc, 0x4f, 0x84, 0xfe, 0x54, 0x44, 0xfd, 0x05, 0x79, 0x49, 0x4e, 0x7e, 0x16, + 0xe6, 0x6b, 0x15, 0x93, 0x51, 0xee, 0x34, 0xa9, 0x70, 0x2f, 0xa9, 0x45, 0x77, 0xfb, 0x77, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x25, 0x11, 0x84, 0xb7, 0xaf, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -814,16 +814,18 @@ func (m *QueryClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1000,16 +1002,18 @@ func (m *QueryConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1161,8 +1165,10 @@ func (m *QueryClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1234,8 +1240,10 @@ func (m *QueryConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1494,6 +1502,9 @@ func (m *QueryClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2005,6 +2016,9 @@ func (m *QueryConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/03-connection/client/utils/utils.go b/x/ibc/core/03-connection/client/utils/utils.go index 955ecfe6baef..6b8c854baffb 100644 --- a/x/ibc/core/03-connection/client/utils/utils.go +++ b/x/ibc/core/03-connection/client/utils/utils.go @@ -138,7 +138,7 @@ func QueryConnectionClientState( // prove is true, it performs an ABCI store query in order to retrieve the // merkle proof. Otherwise, it uses the gRPC query client. func QueryConnectionConsensusState( - clientCtx client.Context, connectionID string, height clienttypes.Height, prove bool, + clientCtx client.Context, connectionID string, height *clienttypes.Height, prove bool, ) (*types.QueryConnectionConsensusStateResponse, error) { queryClient := types.NewQueryClient(clientCtx) diff --git a/x/ibc/core/03-connection/types/msgs.go b/x/ibc/core/03-connection/types/msgs.go index 6df9512e158f..fe2a7c90cf9b 100644 --- a/x/ibc/core/03-connection/types/msgs.go +++ b/x/ibc/core/03-connection/types/msgs.go @@ -83,7 +83,7 @@ func NewMsgConnectionOpenTry( counterpartyClientID string, counterpartyClient exported.ClientState, counterpartyPrefix commitmenttypes.MerklePrefix, counterpartyVersions []*Version, proofInit, proofClient, proofConsensus []byte, - proofHeight, consensusHeight clienttypes.Height, signer sdk.AccAddress, + proofHeight, consensusHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgConnectionOpenTry { counterparty := NewCounterparty(counterpartyClientID, counterpartyConnectionID, counterpartyPrefix) csAny, _ := clienttypes.PackClientState(counterpartyClient) @@ -196,7 +196,7 @@ var _ sdk.Msg = &MsgConnectionOpenAck{} func NewMsgConnectionOpenAck( connectionID, counterpartyConnectionID string, counterpartyClient exported.ClientState, proofTry, proofClient, proofConsensus []byte, - proofHeight, consensusHeight clienttypes.Height, + proofHeight, consensusHeight *clienttypes.Height, version *Version, signer sdk.AccAddress, ) *MsgConnectionOpenAck { @@ -292,7 +292,7 @@ var _ sdk.Msg = &MsgConnectionOpenConfirm{} // NewMsgConnectionOpenConfirm creates a new MsgConnectionOpenConfirm instance //nolint:interfacer func NewMsgConnectionOpenConfirm( - connectionID string, proofAck []byte, proofHeight clienttypes.Height, + connectionID string, proofAck []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgConnectionOpenConfirm { return &MsgConnectionOpenConfirm{ diff --git a/x/ibc/core/03-connection/types/query.go b/x/ibc/core/03-connection/types/query.go index 09058e6e8e81..ce2ce02dceb8 100644 --- a/x/ibc/core/03-connection/types/query.go +++ b/x/ibc/core/03-connection/types/query.go @@ -8,7 +8,7 @@ import ( // NewQueryConnectionResponse creates a new QueryConnectionResponse instance func NewQueryConnectionResponse( - connection ConnectionEnd, proof []byte, height clienttypes.Height, + connection ConnectionEnd, proof []byte, height *clienttypes.Height, ) *QueryConnectionResponse { return &QueryConnectionResponse{ Connection: &connection, @@ -19,7 +19,7 @@ func NewQueryConnectionResponse( // NewQueryClientConnectionsResponse creates a new ConnectionPaths instance func NewQueryClientConnectionsResponse( - connectionPaths []string, proof []byte, height clienttypes.Height, + connectionPaths []string, proof []byte, height *clienttypes.Height, ) *QueryClientConnectionsResponse { return &QueryClientConnectionsResponse{ ConnectionPaths: connectionPaths, @@ -36,7 +36,7 @@ func NewQueryClientConnectionsRequest(clientID string) *QueryClientConnectionsRe } // NewQueryConnectionClientStateResponse creates a newQueryConnectionClientStateResponse instance -func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryConnectionClientStateResponse { +func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height *clienttypes.Height) *QueryConnectionClientStateResponse { return &QueryConnectionClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, @@ -45,7 +45,7 @@ func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.Ide } // NewQueryConnectionConsensusStateResponse creates a newQueryConnectionConsensusStateResponse instance -func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryConnectionConsensusStateResponse { +func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height *clienttypes.Height) *QueryConnectionConsensusStateResponse { return &QueryConnectionConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, diff --git a/x/ibc/core/03-connection/types/query.pb.go b/x/ibc/core/03-connection/types/query.pb.go index 3007ac05bc88..f3921bfddc75 100644 --- a/x/ibc/core/03-connection/types/query.pb.go +++ b/x/ibc/core/03-connection/types/query.pb.go @@ -88,7 +88,7 @@ type QueryConnectionResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryConnectionResponse) Reset() { *m = QueryConnectionResponse{} } @@ -138,11 +138,11 @@ func (m *QueryConnectionResponse) GetProof() []byte { return nil } -func (m *QueryConnectionResponse) GetProofHeight() types.Height { +func (m *QueryConnectionResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -199,7 +199,7 @@ type QueryConnectionsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryConnectionsResponse) Reset() { *m = QueryConnectionsResponse{} } @@ -249,11 +249,11 @@ func (m *QueryConnectionsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryConnectionsResponse) GetHeight() types.Height { +func (m *QueryConnectionsResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryClientConnectionsRequest is the request type for the @@ -311,7 +311,7 @@ type QueryClientConnectionsResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was generated - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryClientConnectionsResponse) Reset() { *m = QueryClientConnectionsResponse{} } @@ -361,11 +361,11 @@ func (m *QueryClientConnectionsResponse) GetProof() []byte { return nil } -func (m *QueryClientConnectionsResponse) GetProofHeight() types.Height { +func (m *QueryClientConnectionsResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryConnectionClientStateRequest is the request type for the @@ -423,7 +423,7 @@ type QueryConnectionClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryConnectionClientStateResponse) Reset() { *m = QueryConnectionClientStateResponse{} } @@ -473,11 +473,11 @@ func (m *QueryConnectionClientStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height { +func (m *QueryConnectionClientStateResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryConnectionConsensusStateRequest is the request type for the @@ -553,7 +553,7 @@ type QueryConnectionConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryConnectionConsensusStateResponse) Reset() { *m = QueryConnectionConsensusStateResponse{} } @@ -610,11 +610,11 @@ func (m *QueryConnectionConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionConsensusStateResponse) GetProofHeight() types.Height { +func (m *QueryConnectionConsensusStateResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } func init() { @@ -635,63 +635,63 @@ func init() { } var fileDescriptor_cd8d529f8c7cd06b = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xc1, 0x4f, 0x2b, 0x45, - 0x18, 0xef, 0x14, 0xde, 0xcb, 0x63, 0xca, 0x7b, 0xea, 0xa4, 0x0f, 0xea, 0xaa, 0x05, 0x17, 0x2b, - 0xa0, 0x32, 0x43, 0x21, 0x10, 0x04, 0x6a, 0xb4, 0x04, 0x85, 0x0b, 0xc1, 0x35, 0x5e, 0xbc, 0x90, - 0xdd, 0xed, 0xb0, 0xdd, 0x48, 0x77, 0x4a, 0x77, 0xdb, 0xd8, 0x60, 0x2f, 0x9e, 0x3d, 0x98, 0x18, - 0x8f, 0x5e, 0x3d, 0x78, 0xf5, 0xe8, 0xcd, 0x13, 0x47, 0x12, 0x2f, 0x9c, 0x88, 0x29, 0x5e, 0xbd, - 0xf8, 0x17, 0x98, 0x9d, 0x99, 0xb2, 0xb3, 0x74, 0x0b, 0xa5, 0x91, 0x53, 0x77, 0xbf, 0xf9, 0xbe, - 0x99, 0xdf, 0xef, 0xf7, 0x7d, 0xf3, 0xdb, 0x42, 0xdd, 0xb5, 0x6c, 0x62, 0xb3, 0x06, 0x25, 0x36, - 0xf3, 0x3c, 0x6a, 0x07, 0x2e, 0xf3, 0x48, 0xab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 0xe4, 0x3f, 0x5f, 0xf1, 0xb3, 0xe4, 0x57, 0xbe, 0x26, 0xdf, 0x90, 0x9b, 0x3f, 0xb0, 0xcb, - 0xab, 0x4b, 0x0a, 0xea, 0xa0, 0x5d, 0xa7, 0xbe, 0xf5, 0x94, 0x7b, 0xdf, 0xea, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x3b, 0x66, 0x6e, 0x99, 0x86, 0x0b, 0x00, 0x00, + // 886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0x33, 0x45, + 0x18, 0x66, 0xca, 0x8f, 0xc0, 0x14, 0x50, 0x27, 0x05, 0xea, 0xaa, 0x05, 0x17, 0x2b, 0xa0, 0x32, + 0x43, 0x4b, 0x20, 0x0a, 0xd4, 0x28, 0x06, 0x85, 0x0b, 0xc1, 0x35, 0x5e, 0xbc, 0x90, 0xdd, 0xed, + 0xb0, 0xdd, 0x48, 0x77, 0x4a, 0x77, 0xdb, 0xd8, 0x60, 0x2f, 0x9e, 0x3d, 0x98, 0x18, 0x8f, 0x26, + 0x9e, 0xbd, 0x1a, 0xff, 0x01, 0x4f, 0x1e, 0x49, 0xbc, 0x70, 0x30, 0x5f, 0xbe, 0xc0, 0x97, 0x7c, + 0xf7, 0xef, 0x2f, 0xf8, 0xb2, 0x33, 0x53, 0x76, 0x96, 0x6e, 0xa1, 0x34, 0x1f, 0xa7, 0xee, 0xce, + 0xbc, 0xef, 0xbc, 0xcf, 0xf3, 0xbc, 0xef, 0x3c, 0x5b, 0xa8, 0xbb, 0x96, 0x4d, 0x6c, 0x56, 0xa7, + 0xc4, 0x66, 0x9e, 0x47, 0xed, 0xc0, 0x65, 0x1e, 0x69, 0x16, 0xc8, 0x59, 0x83, 0xd6, 0x5b, 0xb8, + 0x56, 0x67, 0x01, 0x43, 0xb3, 0xae, 0x65, 0xe3, 0x30, 0x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ad, 0x1a, 0xf5, 0xad, 0x31, 0xee, 0x7a, 0xeb, 0x2f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x64, 0x4a, + 0xa1, 0xe9, 0x68, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -984,16 +984,18 @@ func (m *QueryConnectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1071,16 +1073,18 @@ func (m *QueryConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1160,16 +1164,18 @@ func (m *QueryClientConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1239,16 +1245,18 @@ func (m *QueryConnectionClientStateResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1331,16 +1339,18 @@ func (m *QueryConnectionConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1408,8 +1418,10 @@ func (m *QueryConnectionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1442,8 +1454,10 @@ func (m *QueryConnectionsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1476,8 +1490,10 @@ func (m *QueryClientConnectionsResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1508,8 +1524,10 @@ func (m *QueryConnectionClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1550,8 +1568,10 @@ func (m *QueryConnectionConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1774,6 +1794,9 @@ func (m *QueryConnectionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2019,6 +2042,9 @@ func (m *QueryConnectionsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2256,6 +2282,9 @@ func (m *QueryClientConnectionsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2497,6 +2526,9 @@ func (m *QueryConnectionClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2808,6 +2840,9 @@ func (m *QueryConnectionConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/03-connection/types/tx.pb.go b/x/ibc/core/03-connection/types/tx.pb.go index be78639db0a5..d2d99070c7df 100644 --- a/x/ibc/core/03-connection/types/tx.pb.go +++ b/x/ibc/core/03-connection/types/tx.pb.go @@ -113,22 +113,22 @@ var xxx_messageInfo_MsgConnectionOpenInitResponse proto.InternalMessageInfo // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // connection on Chain B. type MsgConnectionOpenTry struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - DesiredConnectionId string `protobuf:"bytes,2,opt,name=desired_connection_id,json=desiredConnectionId,proto3" json:"desired_connection_id,omitempty" yaml:"desired_connection_id"` - CounterpartyChosenConnectionId string `protobuf:"bytes,3,opt,name=counterparty_chosen_connection_id,json=counterpartyChosenConnectionId,proto3" json:"counterparty_chosen_connection_id,omitempty" yaml:"counterparty_chosen_connection_id"` - ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"` - CounterpartyVersions []*Version `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` - ProofHeight types1.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + DesiredConnectionId string `protobuf:"bytes,2,opt,name=desired_connection_id,json=desiredConnectionId,proto3" json:"desired_connection_id,omitempty" yaml:"desired_connection_id"` + CounterpartyChosenConnectionId string `protobuf:"bytes,3,opt,name=counterparty_chosen_connection_id,json=counterpartyChosenConnectionId,proto3" json:"counterparty_chosen_connection_id,omitempty" yaml:"counterparty_chosen_connection_id"` + ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"` + CounterpartyVersions []*Version `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` + ProofHeight *types1.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` ProofInit []byte `protobuf:"bytes,8,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` // proof of client state included in message ProofClient []byte `protobuf:"bytes,9,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,10,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight types1.Height `protobuf:"bytes,11,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` - Signer string `protobuf:"bytes,12,opt,name=signer,proto3" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,10,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight *types1.Height `protobuf:"bytes,11,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty" yaml:"consensus_height"` + Signer string `protobuf:"bytes,12,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenTry) Reset() { *m = MsgConnectionOpenTry{} } @@ -204,20 +204,20 @@ var xxx_messageInfo_MsgConnectionOpenTryResponse proto.InternalMessageInfo // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. type MsgConnectionOpenAck struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - CounterpartyConnectionId string `protobuf:"bytes,2,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` - Version *Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - ProofHeight types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + CounterpartyConnectionId string `protobuf:"bytes,2,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + Version *Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + ProofHeight *types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` // proof of the initialization the connection on Chain B: `UNITIALIZED -> // TRYOPEN` ProofTry []byte `protobuf:"bytes,6,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` // proof of client state included in message ProofClient []byte `protobuf:"bytes,7,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,8,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight types1.Height `protobuf:"bytes,9,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` - Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,8,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight *types1.Height `protobuf:"bytes,9,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty" yaml:"consensus_height"` + Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenAck) Reset() { *m = MsgConnectionOpenAck{} } @@ -295,9 +295,9 @@ var xxx_messageInfo_MsgConnectionOpenAckResponse proto.InternalMessageInfo type MsgConnectionOpenConfirm struct { ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` // proof for the change of the connection state on Chain A: `INIT -> OPEN` - ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight *types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenConfirm) Reset() { *m = MsgConnectionOpenConfirm{} } @@ -384,65 +384,64 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x3f, 0x93, 0xdb, 0x44, - 0x14, 0xb7, 0xce, 0xf7, 0xc7, 0xde, 0x33, 0x24, 0x51, 0xec, 0x3b, 0x21, 0x82, 0xe4, 0xec, 0xc0, - 0x70, 0x45, 0x4e, 0x8a, 0x93, 0x30, 0x03, 0xc7, 0x50, 0xd8, 0x6e, 0xb8, 0x22, 0xc0, 0x88, 0x83, - 0x22, 0x8d, 0xc7, 0x96, 0xd7, 0xb2, 0xc6, 0xe7, 0x5d, 0x8f, 0x56, 0x76, 0x22, 0x5a, 0x1a, 0x86, - 0x8a, 0x8f, 0x90, 0x4f, 0xc1, 0x67, 0x48, 0x47, 0x4a, 0x2a, 0x0d, 0xdc, 0x35, 0xd4, 0xea, 0xe8, - 0x18, 0xad, 0xfe, 0x78, 0x65, 0xcb, 0x73, 0x36, 0xe7, 0x54, 0xd2, 0xdb, 0xf7, 0x7b, 0xef, 0xed, - 0xfe, 0xf6, 0xfd, 0xde, 0x2c, 0x50, 0xed, 0x9e, 0xa9, 0x9b, 0xc4, 0x41, 0xba, 0x49, 0x30, 0x46, - 0xa6, 0x6b, 0x13, 0xac, 0xcf, 0x1a, 0xba, 0xfb, 0x4a, 0x9b, 0x38, 0xc4, 0x25, 0xe2, 0x91, 0xdd, - 0x33, 0xb5, 0x10, 0xa0, 0xcd, 0x01, 0xda, 0xac, 0x21, 0x57, 0x2d, 0x62, 0x11, 0x06, 0xd1, 0xc3, - 0xbf, 0x08, 0x2d, 0x7f, 0x60, 0x11, 0x62, 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39, - 0xa5, 0xfd, 0x91, 0xfe, 0x4a, 0x4f, 0x9f, 0xf7, 0x8f, 0x9f, 0x9e, 0x72, 0x2f, 0x7c, 0xd7, 0x9b, - 0x20, 0xda, 0xdb, 0x67, 0x13, 0xf7, 0xe9, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0xcf, 0x23, - 0x2c, 0x90, 0x0c, 0x00, 0x00, + // 912 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x8f, 0x37, 0xfb, 0x27, 0x99, 0x04, 0xda, 0xba, 0xc9, 0xd6, 0x98, 0x62, 0xa7, 0x23, 0x10, + 0x39, 0x74, 0xed, 0xa6, 0x2d, 0x12, 0x2c, 0xe2, 0x90, 0xe4, 0xc2, 0x1e, 0x0a, 0xc8, 0x2c, 0x3d, + 0x70, 0x89, 0x12, 0x67, 0xd6, 0xb1, 0xb2, 0x99, 0x89, 0x3c, 0x4e, 0x5a, 0x73, 0x45, 0x42, 0x1c, + 0xf9, 0x08, 0xfd, 0x14, 0x7c, 0x05, 0x7a, 0xec, 0x11, 0x2e, 0x16, 0xda, 0xbd, 0x70, 0xf6, 0x8d, + 0x1b, 0xf2, 0xf8, 0x4f, 0xc6, 0x89, 0xa3, 0x26, 0x6c, 0x7a, 0xb2, 0xdf, 0xbc, 0xdf, 0xef, 0xbd, + 0x99, 0x37, 0xbf, 0xf7, 0x34, 0x40, 0xb5, 0x07, 0xa6, 0x6e, 0x12, 0x07, 0xe9, 0x26, 0xc1, 0x18, + 0x99, 0xae, 0x4d, 0xb0, 0x3e, 0x6f, 0xe9, 0xee, 0x4b, 0x6d, 0xea, 0x10, 0x97, 0x88, 0xc7, 0xf6, + 0xc0, 0xd4, 0x42, 0x80, 0xb6, 0x00, 0x68, 0xf3, 0x96, 0x5c, 0xb3, 0x88, 0x45, 0x18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 0xe8, 0x84, 0xd0, 0xf8, 0x73, 0x42, 0x87, 0x63, 0xfd, 0xa5, + 0x9e, 0x3e, 0xe5, 0x1f, 0x3d, 0x39, 0xe1, 0x5e, 0xf3, 0xae, 0x37, 0x45, 0x74, 0x70, 0xc8, 0xa6, + 0xec, 0x93, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x41, 0x2c, 0x86, 0x7c, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -757,16 +756,18 @@ func (m *MsgConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 } - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a } - i-- - dAtA[i] = 0x5a if len(m.ProofConsensus) > 0 { i -= len(m.ProofConsensus) copy(dAtA[i:], m.ProofConsensus) @@ -788,16 +789,18 @@ func (m *MsgConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - i-- - dAtA[i] = 0x3a if len(m.CounterpartyVersions) > 0 { for iNdEx := len(m.CounterpartyVersions) - 1; iNdEx >= 0; iNdEx-- { { @@ -908,16 +911,18 @@ func (m *MsgConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x52 } - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ConsensusHeight != nil { + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a } - i-- - dAtA[i] = 0x4a if len(m.ProofConsensus) > 0 { i -= len(m.ProofConsensus) copy(dAtA[i:], m.ProofConsensus) @@ -939,16 +944,18 @@ func (m *MsgConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - i-- - dAtA[i] = 0x2a if m.ClientState != nil { { size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) @@ -1040,16 +1047,18 @@ func (m *MsgConnectionOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x22 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.ProofAck) > 0 { i -= len(m.ProofAck) copy(dAtA[i:], m.ProofAck) @@ -1167,8 +1176,10 @@ func (m *MsgConnectionOpenTry) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.ProofInit) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1181,8 +1192,10 @@ func (m *MsgConnectionOpenTry) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ConsensusHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1221,8 +1234,10 @@ func (m *MsgConnectionOpenAck) Size() (n int) { l = m.ClientState.Size() n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.ProofTry) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1235,8 +1250,10 @@ func (m *MsgConnectionOpenAck) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ConsensusHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ConsensusHeight != nil { + l = m.ConsensusHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1267,8 +1284,10 @@ func (m *MsgConnectionOpenConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1819,6 +1838,9 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types1.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1954,6 +1976,9 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types1.Height{} + } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2261,6 +2286,9 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types1.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2396,6 +2424,9 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ConsensusHeight == nil { + m.ConsensusHeight = &types1.Height{} + } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2633,6 +2664,9 @@ func (m *MsgConnectionOpenConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types1.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index 4aa1363d3107..b0c86f848853 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -135,7 +135,7 @@ func QueryChannelClientState( // prove is true, it performs an ABCI store query in order to retrieve the // merkle proof. Otherwise, it uses the gRPC query client. func QueryChannelConsensusState( - clientCtx client.Context, portID, channelID string, height clienttypes.Height, prove bool, + clientCtx client.Context, portID, channelID string, height *clienttypes.Height, prove bool, ) (*types.QueryChannelConsensusStateResponse, error) { queryClient := types.NewQueryClient(clientCtx) @@ -167,29 +167,29 @@ func QueryChannelConsensusState( // latest ConsensusState given the source port ID and source channel ID. func QueryLatestConsensusState( clientCtx client.Context, portID, channelID string, -) (exported.ConsensusState, clienttypes.Height, clienttypes.Height, error) { +) (exported.ConsensusState, *clienttypes.Height, *clienttypes.Height, error) { clientRes, err := QueryChannelClientState(clientCtx, portID, channelID, false) if err != nil { - return nil, clienttypes.Height{}, clienttypes.Height{}, err + return nil, &clienttypes.Height{}, &clienttypes.Height{}, err } clientState, err := clienttypes.UnpackClientState(clientRes.IdentifiedClientState.ClientState) if err != nil { - return nil, clienttypes.Height{}, clienttypes.Height{}, err + return nil, &clienttypes.Height{}, &clienttypes.Height{}, err } - clientHeight, ok := clientState.GetLatestHeight().(clienttypes.Height) + clientHeight, ok := clientState.GetLatestHeight().(*clienttypes.Height) if !ok { - return nil, clienttypes.Height{}, clienttypes.Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected type: %T, got: %T", - clienttypes.Height{}, clientHeight) + return nil, &clienttypes.Height{}, &clienttypes.Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected type: %T, got: %T", + &clienttypes.Height{}, clientHeight) } res, err := QueryChannelConsensusState(clientCtx, portID, channelID, clientHeight, false) if err != nil { - return nil, clienttypes.Height{}, clienttypes.Height{}, err + return nil, &clienttypes.Height{}, &clienttypes.Height{}, err } consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState) if err != nil { - return nil, clienttypes.Height{}, clienttypes.Height{}, err + return nil, &clienttypes.Height{}, &clienttypes.Height{}, err } return consensusState, clientHeight, res.ProofHeight, nil diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index e2cc85459f19..f83b08a38c9e 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -114,7 +114,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use client state latest height for timeout clientState := suite.chainA.GetClientState(clientA) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clientState.GetLatestHeight().(clienttypes.Height), disabledTimeoutTimestamp) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clientState.GetLatestHeight().(*clienttypes.Height), disabledTimeoutTimestamp) channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"timeout timestamp passed", func() { diff --git a/x/ibc/core/04-channel/types/channel.pb.go b/x/ibc/core/04-channel/types/channel.pb.go index 19ca87cdbc40..54ef537aa9db 100644 --- a/x/ibc/core/04-channel/types/channel.pb.go +++ b/x/ibc/core/04-channel/types/channel.pb.go @@ -261,7 +261,7 @@ type Packet struct { // actual opaque bytes transferred directly to the application module Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // block height after which the packet times out - TimeoutHeight types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutHeight *types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty" yaml:"timeout_height"` // block timestamp (in nanoseconds) after which the packet times out TimeoutTimestamp uint64 `protobuf:"varint,8,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` } @@ -453,65 +453,65 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 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, 0xb8, 0xba, 0x33, 0x9b, 0x57, - 0xd2, 0x22, 0x5c, 0x67, 0x32, 0x32, 0xc1, 0x33, 0x19, 0x73, 0x1f, 0x72, 0x9c, 0x69, 0xbc, 0xec, - 0x74, 0x5b, 0xcd, 0xa2, 0xac, 0xc2, 0x6c, 0x5e, 0x49, 0xf1, 0x48, 0x95, 0x5f, 0xff, 0x56, 0x8e, - 0x3d, 0xba, 0x82, 0x24, 0xfb, 0x66, 0xa2, 0xcf, 0xa1, 0xd4, 0x31, 0x9b, 0x2d, 0xb3, 0xdf, 0xee, - 0xb4, 0x5b, 0x77, 0xfc, 0xb2, 0x92, 0x21, 0x8e, 0x74, 0xd8, 0xe5, 0xaa, 0xb3, 0x36, 0x7b, 0xb6, - 0x9a, 0x45, 0x49, 0xcd, 0xcf, 0xe6, 0x95, 0xec, 0x0a, 0x08, 0x0d, 0x73, 0x4d, 0xa4, 0x10, 0x86, - 0x45, 0xc8, 0x1b, 0xd7, 0xcd, 0x37, 0x37, 0x65, 0xe9, 0xed, 0x4d, 0x59, 0xfa, 0xfb, 0xa6, 0x2c, - 0xfd, 0x72, 0x5b, 0x8e, 0xbd, 0xbd, 0x2d, 0xc7, 0xfe, 0xba, 0x2d, 0xc7, 0x5e, 0x7d, 0x33, 0x70, - 0xe9, 0x70, 0x7a, 0x5e, 0xb5, 0xc9, 0xb8, 0x66, 0x93, 0x60, 0x4c, 0x02, 0xf1, 0x78, 0x1c, 0x38, - 0x17, 0xb5, 0x9f, 0x6b, 0xab, 0x7f, 0xf3, 0x93, 0x67, 0x8f, 0xa3, 0x9f, 0x3d, 0xbd, 0x9e, 0xe0, - 0xe0, 0x3c, 0xc5, 0x7e, 0xce, 0x5f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xef, 0x9f, 0xe3, - 0x0d, 0x08, 0x00, 0x00, + // 913 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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 0xbb, 0xce, 0x49, 0xab, 0x5d, 0xdc, 0xd2, 0x77, 0x66, 0xf3, 0x4a, 0x5a, 0xa6, 0xb7, + 0x95, 0x9c, 0xdc, 0x16, 0x95, 0x9c, 0x79, 0x00, 0x39, 0xc1, 0x34, 0x5e, 0x76, 0xba, 0xad, 0x66, + 0x51, 0xd5, 0x61, 0x36, 0xaf, 0xa4, 0x44, 0xa6, 0xab, 0xaf, 0x7f, 0x2d, 0x27, 0x1e, 0x5d, 0x42, + 0x92, 0x7f, 0x2f, 0xd1, 0x67, 0x50, 0xea, 0xe0, 0x66, 0x0b, 0xf7, 0xdb, 0x9d, 0x76, 0xeb, 0x8e, + 0x5f, 0xde, 0x32, 0xc2, 0x91, 0x09, 0xbb, 0x42, 0x75, 0xda, 0xe6, 0xcf, 0x56, 0xb3, 0xa8, 0xe8, + 0xf9, 0xd9, 0xbc, 0x92, 0x5d, 0x01, 0x91, 0x61, 0xa1, 0x89, 0x15, 0xd2, 0xb0, 0x4c, 0xc5, 0xe0, + 0x3a, 0x7e, 0x73, 0x5d, 0x56, 0xde, 0x5e, 0x97, 0x95, 0xbf, 0xae, 0xcb, 0xca, 0xcf, 0x37, 0xe5, + 0xc4, 0xdb, 0x9b, 0x72, 0xe2, 0xcf, 0x9b, 0x72, 0xe2, 0xd5, 0xd7, 0x03, 0x8f, 0x0d, 0xa7, 0x67, + 0x55, 0x87, 0x8e, 0x6b, 0x0e, 0x0d, 0xc7, 0x34, 0x94, 0x8f, 0xc7, 0xa1, 0x7b, 0x5e, 0xfb, 0xa9, + 0xb6, 0xfa, 0x2f, 0x3f, 0x79, 0xf6, 0x38, 0xfe, 0xd1, 0xb3, 0xab, 0x09, 0x09, 0xcf, 0x52, 0xfc, + 0xc7, 0xfc, 0xc5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x57, 0x64, 0x02, 0x24, 0x09, 0x08, 0x00, + 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -708,16 +708,18 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.TimeoutHeight != nil { + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintChannel(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - i-- - dAtA[i] = 0x3a if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) @@ -995,8 +997,10 @@ func (m *Packet) Size() (n int) { if l > 0 { n += 1 + l + sovChannel(uint64(l)) } - l = m.TimeoutHeight.Size() - n += 1 + l + sovChannel(uint64(l)) + if m.TimeoutHeight != nil { + l = m.TimeoutHeight.Size() + n += 1 + l + sovChannel(uint64(l)) + } if m.TimeoutTimestamp != 0 { n += 1 + sovChannel(uint64(m.TimeoutTimestamp)) } @@ -1864,6 +1868,9 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.TimeoutHeight == nil { + m.TimeoutHeight = &types.Height{} + } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index ebd9730e0112..0454177b4e40 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -72,7 +72,7 @@ var _ sdk.Msg = &MsgChannelOpenTry{} func NewMsgChannelOpenTry( portID, desiredChannelID, counterpartyChosenChannelID, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID, counterpartyVersion string, - proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, + proofInit []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenTry { counterparty := NewCounterparty(counterpartyPortID, counterpartyChannelID) channel := NewChannel(INIT, channelOrder, counterparty, connectionHops, version) @@ -139,7 +139,7 @@ var _ sdk.Msg = &MsgChannelOpenAck{} // NewMsgChannelOpenAck creates a new MsgChannelOpenAck instance //nolint:interfacer func NewMsgChannelOpenAck( - portID, channelID, counterpartyChannelID string, cpv string, proofTry []byte, proofHeight clienttypes.Height, + portID, channelID, counterpartyChannelID string, cpv string, proofTry []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenAck { return &MsgChannelOpenAck{ @@ -204,7 +204,7 @@ var _ sdk.Msg = &MsgChannelOpenConfirm{} // NewMsgChannelOpenConfirm creates a new MsgChannelOpenConfirm instance //nolint:interfacer func NewMsgChannelOpenConfirm( - portID, channelID string, proofAck []byte, proofHeight clienttypes.Height, + portID, channelID string, proofAck []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenConfirm { return &MsgChannelOpenConfirm{ @@ -315,7 +315,7 @@ var _ sdk.Msg = &MsgChannelCloseConfirm{} // NewMsgChannelCloseConfirm creates a new MsgChannelCloseConfirm instance //nolint:interfacer func NewMsgChannelCloseConfirm( - portID, channelID string, proofInit []byte, proofHeight clienttypes.Height, + portID, channelID string, proofInit []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelCloseConfirm { return &MsgChannelCloseConfirm{ @@ -375,7 +375,7 @@ var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket //nolint:interfacer func NewMsgRecvPacket( - packet Packet, proof []byte, proofHeight clienttypes.Height, + packet Packet, proof []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgRecvPacket { return &MsgRecvPacket{ @@ -439,7 +439,7 @@ var _ sdk.Msg = &MsgTimeout{} //nolint:interfacer func NewMsgTimeout( packet Packet, nextSequenceRecv uint64, proof []byte, - proofHeight clienttypes.Height, signer sdk.AccAddress, + proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeout { return &MsgTimeout{ Packet: packet, @@ -495,7 +495,7 @@ func (msg MsgTimeout) Type() string { func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, proof, proofClose []byte, - proofHeight clienttypes.Height, signer sdk.AccAddress, + proofHeight *clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeoutOnClose { return &MsgTimeoutOnClose{ Packet: packet, @@ -555,7 +555,7 @@ var _ sdk.Msg = &MsgAcknowledgement{} // NewMsgAcknowledgement constructs a new MsgAcknowledgement //nolint:interfacer func NewMsgAcknowledgement( - packet Packet, ack []byte, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { + packet Packet, ack []byte, proof []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { return &MsgAcknowledgement{ Packet: packet, Acknowledgement: ack, diff --git a/x/ibc/core/04-channel/types/packet.go b/x/ibc/core/04-channel/types/packet.go index 46c1a1f06ebb..586ecfef0058 100644 --- a/x/ibc/core/04-channel/types/packet.go +++ b/x/ibc/core/04-channel/types/packet.go @@ -33,7 +33,7 @@ func NewPacket( data []byte, sequence uint64, sourcePort, sourceChannel, destinationPort, destinationChannel string, - timeoutHeight clienttypes.Height, timeoutTimestamp uint64, + timeoutHeight *clienttypes.Height, timeoutTimestamp uint64, ) Packet { return Packet{ Data: data, diff --git a/x/ibc/core/04-channel/types/query.go b/x/ibc/core/04-channel/types/query.go index debe1acb33b3..cf6ccc06c023 100644 --- a/x/ibc/core/04-channel/types/query.go +++ b/x/ibc/core/04-channel/types/query.go @@ -7,7 +7,7 @@ import ( ) // NewQueryChannelResponse creates a new QueryChannelResponse instance -func NewQueryChannelResponse(channel Channel, proof []byte, height clienttypes.Height) *QueryChannelResponse { +func NewQueryChannelResponse(channel Channel, proof []byte, height *clienttypes.Height) *QueryChannelResponse { return &QueryChannelResponse{ Channel: &channel, Proof: proof, @@ -16,7 +16,7 @@ func NewQueryChannelResponse(channel Channel, proof []byte, height clienttypes.H } // NewQueryChannelClientStateResponse creates a newQueryChannelClientStateResponse instance -func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryChannelClientStateResponse { +func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height *clienttypes.Height) *QueryChannelClientStateResponse { return &QueryChannelClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, @@ -25,7 +25,7 @@ func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.Identi } // NewQueryChannelConsensusStateResponse creates a newQueryChannelConsensusStateResponse instance -func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryChannelConsensusStateResponse { +func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height *clienttypes.Height) *QueryChannelConsensusStateResponse { return &QueryChannelConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, @@ -36,7 +36,7 @@ func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *c // NewQueryPacketCommitmentResponse creates a new QueryPacketCommitmentResponse instance func NewQueryPacketCommitmentResponse( - commitment []byte, proof []byte, height clienttypes.Height, + commitment []byte, proof []byte, height *clienttypes.Height, ) *QueryPacketCommitmentResponse { return &QueryPacketCommitmentResponse{ Commitment: commitment, @@ -47,7 +47,7 @@ func NewQueryPacketCommitmentResponse( // NewQueryPacketAcknowledgementResponse creates a new QueryPacketAcknowledgementResponse instance func NewQueryPacketAcknowledgementResponse( - acknowledgement []byte, proof []byte, height clienttypes.Height, + acknowledgement []byte, proof []byte, height *clienttypes.Height, ) *QueryPacketAcknowledgementResponse { return &QueryPacketAcknowledgementResponse{ Acknowledgement: acknowledgement, @@ -58,7 +58,7 @@ func NewQueryPacketAcknowledgementResponse( // NewQueryNextSequenceReceiveResponse creates a new QueryNextSequenceReceiveResponse instance func NewQueryNextSequenceReceiveResponse( - sequence uint64, proof []byte, height clienttypes.Height, + sequence uint64, proof []byte, height *clienttypes.Height, ) *QueryNextSequenceReceiveResponse { return &QueryNextSequenceReceiveResponse{ NextSequenceReceive: sequence, diff --git a/x/ibc/core/04-channel/types/query.pb.go b/x/ibc/core/04-channel/types/query.pb.go index 073e2c5bec13..1d90b5add576 100644 --- a/x/ibc/core/04-channel/types/query.pb.go +++ b/x/ibc/core/04-channel/types/query.pb.go @@ -96,7 +96,7 @@ type QueryChannelResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryChannelResponse) Reset() { *m = QueryChannelResponse{} } @@ -146,11 +146,11 @@ func (m *QueryChannelResponse) GetProof() []byte { return nil } -func (m *QueryChannelResponse) GetProofHeight() types.Height { +func (m *QueryChannelResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -206,7 +206,7 @@ type QueryChannelsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryChannelsResponse) Reset() { *m = QueryChannelsResponse{} } @@ -256,11 +256,11 @@ func (m *QueryChannelsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryChannelsResponse) GetHeight() types.Height { +func (m *QueryChannelsResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryConnectionChannelsRequest is the request type for the @@ -327,7 +327,7 @@ type QueryConnectionChannelsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryConnectionChannelsResponse) Reset() { *m = QueryConnectionChannelsResponse{} } @@ -377,11 +377,11 @@ func (m *QueryConnectionChannelsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryConnectionChannelsResponse) GetHeight() types.Height { +func (m *QueryConnectionChannelsResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -448,7 +448,7 @@ type QueryChannelClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryChannelClientStateResponse) Reset() { *m = QueryChannelClientStateResponse{} } @@ -498,11 +498,11 @@ func (m *QueryChannelClientStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelClientStateResponse) GetProofHeight() types.Height { +func (m *QueryChannelClientStateResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryChannelConsensusStateRequest is the request type for the @@ -589,7 +589,7 @@ type QueryChannelConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryChannelConsensusStateResponse) Reset() { *m = QueryChannelConsensusStateResponse{} } @@ -646,11 +646,11 @@ func (m *QueryChannelConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelConsensusStateResponse) GetProofHeight() types.Height { +func (m *QueryChannelConsensusStateResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryPacketCommitmentRequest is the request type for the @@ -727,7 +727,7 @@ type QueryPacketCommitmentResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryPacketCommitmentResponse) Reset() { *m = QueryPacketCommitmentResponse{} } @@ -777,11 +777,11 @@ func (m *QueryPacketCommitmentResponse) GetProof() []byte { return nil } -func (m *QueryPacketCommitmentResponse) GetProofHeight() types.Height { +func (m *QueryPacketCommitmentResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryPacketCommitmentsRequest is the request type for the @@ -856,7 +856,7 @@ type QueryPacketCommitmentsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryPacketCommitmentsResponse) Reset() { *m = QueryPacketCommitmentsResponse{} } @@ -906,11 +906,11 @@ func (m *QueryPacketCommitmentsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryPacketCommitmentsResponse) GetHeight() types.Height { +func (m *QueryPacketCommitmentsResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryPacketAcknowledgementRequest is the request type for the @@ -987,7 +987,7 @@ type QueryPacketAcknowledgementResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryPacketAcknowledgementResponse) Reset() { *m = QueryPacketAcknowledgementResponse{} } @@ -1037,11 +1037,11 @@ func (m *QueryPacketAcknowledgementResponse) GetProof() []byte { return nil } -func (m *QueryPacketAcknowledgementResponse) GetProofHeight() types.Height { +func (m *QueryPacketAcknowledgementResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } // QueryUnreceivedPacketsRequest is the request type for the @@ -1115,7 +1115,7 @@ type QueryUnreceivedPacketsResponse struct { // list of unreceived packet sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height - Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryUnreceivedPacketsResponse) Reset() { *m = QueryUnreceivedPacketsResponse{} } @@ -1158,11 +1158,11 @@ func (m *QueryUnreceivedPacketsResponse) GetSequences() []uint64 { return nil } -func (m *QueryUnreceivedPacketsResponse) GetHeight() types.Height { +func (m *QueryUnreceivedPacketsResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryUnrelayedAcksRequest is the request type for the @@ -1236,7 +1236,7 @@ type QueryUnrelayedAcksResponse struct { // list of unrelayed acknowledgement sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height - Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryUnrelayedAcksResponse) Reset() { *m = QueryUnrelayedAcksResponse{} } @@ -1279,11 +1279,11 @@ func (m *QueryUnrelayedAcksResponse) GetSequences() []uint64 { return nil } -func (m *QueryUnrelayedAcksResponse) GetHeight() types.Height { +func (m *QueryUnrelayedAcksResponse) GetHeight() *types.Height { if m != nil { return m.Height } - return types.Height{} + return nil } // QueryNextSequenceReceiveRequest is the request type for the @@ -1350,7 +1350,7 @@ type QueryNextSequenceReceiveResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` } func (m *QueryNextSequenceReceiveResponse) Reset() { *m = QueryNextSequenceReceiveResponse{} } @@ -1400,11 +1400,11 @@ func (m *QueryNextSequenceReceiveResponse) GetProof() []byte { return nil } -func (m *QueryNextSequenceReceiveResponse) GetProofHeight() types.Height { +func (m *QueryNextSequenceReceiveResponse) GetProofHeight() *types.Height { if m != nil { return m.ProofHeight } - return types.Height{} + return nil } func init() { @@ -1435,92 +1435,91 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0xdc, 0xc4, - 0x17, 0xcf, 0xec, 0x6e, 0xdb, 0xe4, 0xf5, 0xd7, 0xb7, 0x93, 0x44, 0x4d, 0xdd, 0x74, 0x93, 0x5a, - 0xea, 0x97, 0xb4, 0x52, 0x3d, 0x6c, 0x52, 0x42, 0x84, 0xa0, 0x52, 0x12, 0x89, 0x36, 0x95, 0xda, - 0xa6, 0x8e, 0x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ac, - 0x7e, 0x94, 0x1a, 0x0b, 0x45, 0x6a, 0x3a, 0xc6, 0xb2, 0x41, 0x8b, 0x9e, 0x2e, 0x7e, 0x1e, 0xbe, - 0x11, 0x42, 0x99, 0x62, 0x28, 0xdf, 0xd8, 0x13, 0x25, 0x07, 0x10, 0x84, 0x89, 0x67, 0xe0, 0x68, - 0x87, 0x2a, 0x8a, 0x78, 0xf9, 0x19, 0x82, 0x2c, 0x27, 0x68, 0x99, 0x26, 0xd5, 0xdd, 0x6a, 0xad, - 0x5a, 0x66, 0x01, 0x74, 0xff, 0xa6, 0x18, 0xa5, 0xc0, 0x4a, 0x8b, 0xd6, 0xa9, 0x03, 0x6b, 0xfd, - 0x3b, 0x82, 0xb1, 0x58, 0x28, 0xff, 0x2d, 0xd5, 0x1f, 0x78, 0xa2, 0x73, 0x4c, 0xf3, 0x2c, 0x7a, - 0xc9, 0xd1, 0x1c, 0xda, 0xed, 0xc3, 0xfb, 0x8b, 0x2f, 0x62, 0x44, 0x69, 0x21, 0xa2, 0x06, 0x67, - 0x0d, 0x5f, 0x9f, 0x3c, 0x87, 0x9a, 0xb7, 0xdd, 0x10, 0xf1, 0xa4, 0x5c, 0x8e, 0x22, 0x12, 0x90, - 0x34, 0x50, 0x73, 0xd8, 0x88, 0x5a, 0xee, 0xe5, 0x23, 0xbf, 0x85, 0xe0, 0x62, 0x88, 0xa1, 0xcb, - 0xc9, 0xb4, 0x6b, 0xf6, 0x61, 0xe8, 0x87, 0x2f, 0xc1, 0xa9, 0x3a, 0xad, 0xda, 0x86, 0x65, 0xe6, - 0xcd, 0x5a, 0xb9, 0x40, 0xab, 0x0c, 0x64, 0x46, 0x3d, 0x29, 0x56, 0xef, 0xb0, 0xc5, 0x60, 0x98, - 0xe0, 0x92, 0x09, 0x85, 0x09, 0xac, 0xaf, 0x10, 0xc8, 0x49, 0x58, 0x45, 0x43, 0xde, 0x83, 0xd3, - 0xba, 0x77, 0x27, 0xd4, 0x88, 0x21, 0x85, 0xb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0xb5, 0xab, 0x1e, - 0x12, 0x67, 0xa3, 0x42, 0xed, 0xc2, 0x51, 0xf6, 0x4f, 0x93, 0xa9, 0xbf, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x4c, 0x6c, 0x44, 0xa5, 0x14, 0x18, 0x00, 0x00, + // 1342 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x51, 0x4f, 0xdb, 0x56, + 0x14, 0xee, 0x4d, 0x68, 0x81, 0x03, 0x6d, 0xd7, 0x0b, 0xa8, 0xe0, 0x42, 0xa0, 0x96, 0xba, 0xd1, + 0x4a, 0xf5, 0x5d, 0xa0, 0x63, 0xd5, 0xb4, 0x56, 0x02, 0xa4, 0xb5, 0x54, 0x6a, 0x4b, 0x8d, 0x2a, + 0xb5, 0x7d, 0x58, 0xe6, 0x38, 0x97, 0x60, 0x41, 0xec, 0x34, 0x76, 0x52, 0x18, 0xcb, 0x34, 0x75, + 0xd2, 0xd6, 0xa7, 0x69, 0x52, 0x27, 0xed, 0x71, 0xd2, 0xfa, 0x34, 0xed, 0x47, 0xec, 0x75, 0x6f, + 0x43, 0xea, 0x26, 0x75, 0xda, 0xcb, 0x04, 0x7b, 0xd9, 0x0f, 0xd8, 0xfb, 0xe4, 0x7b, 0xaf, 0x1d, + 0x3b, 0xb1, 0x0d, 0x21, 0x64, 0x95, 0xf6, 0x84, 0x7d, 0x7d, 0xce, 0xb9, 0xdf, 0xf7, 0x9d, 0xe3, + 0xcb, 0xe7, 0xc0, 0xa4, 0x91, 0xd7, 0x89, 0x6e, 0x55, 0x28, 0xd1, 0xd7, 0x34, 0xd3, 0xa4, 0x1b, + 0xa4, 0x96, 0x25, 0x8f, 0xab, 0xb4, 0xb2, 0xa5, 0x94, 0x2b, 0x96, 0x63, 0xe1, 0x21, 0x23, 0xaf, + 0x2b, 0x6e, 0x80, 0x22, 0x02, 0x94, 0x5a, 0x56,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x8a, 0x6b, 0xce, + 0x68, 0x9a, 0x95, 0x94, 0x02, 0x25, 0x79, 0x07, 0x6a, 0x59, 0xe5, 0x26, 0x8b, 0x50, 0x07, 0x58, + 0x3c, 0xbf, 0x91, 0x3f, 0x0c, 0x83, 0xb4, 0x3d, 0xd6, 0x1f, 0x00, 0x34, 0x5a, 0x22, 0x70, 0xbe, + 0xa9, 0xf0, 0xfe, 0x29, 0x6e, 0xff, 0x14, 0x3e, 0x0e, 0xa2, 0x7f, 0xca, 0xb2, 0x56, 0xa4, 0x22, + 0x57, 0x0d, 0x64, 0xca, 0xaf, 0x10, 0x8c, 0x34, 0x6d, 0x20, 0x64, 0x58, 0x80, 0x3e, 0xc1, 0xcc, + 0x1e, 0x45, 0x53, 0x69, 0x56, 0x3f, 0x4a, 0x87, 0xa5, 0x02, 0x35, 0x1d, 0x63, 0xd5, 0xa0, 0x05, + 0x4f, 0x11, 0x3f, 0x0f, 0xdf, 0x08, 0xa1, 0x4c, 0x31, 0x94, 0x6f, 0xed, 0x8b, 0x92, 0x03, 0x08, + 0xc2, 0xc4, 0x33, 0x70, 0xe2, 0xc0, 0xfa, 0x89, 0x48, 0xf9, 0x19, 0x82, 0x0c, 0xa7, 0x66, 0x99, + 0x26, 0xd5, 0xdd, 0x3a, 0xcd, 0x2a, 0x66, 0x00, 0x74, 0xff, 0xa1, 0x18, 0x9f, 0xc0, 0x4a, 0x93, + 0xca, 0xa9, 0x43, 0xab, 0xbc, 0x8b, 0x60, 0x32, 0x16, 0xca, 0xff, 0x45, 0xef, 0x07, 0x9e, 0xdc, + 0x1c, 0xcd, 0x22, 0x8b, 0x5b, 0x71, 0x34, 0x87, 0x76, 0xfa, 0xaa, 0xfe, 0xee, 0xcb, 0x17, 0x51, + 0x5a, 0xc8, 0xa7, 0xc1, 0x59, 0xc3, 0x57, 0x26, 0xc7, 0x41, 0xe6, 0x6c, 0x37, 0x44, 0xbc, 0x1d, + 0x17, 0xa3, 0x28, 0x04, 0xc4, 0x0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36, 0xb3, 0x84, 0x12, 0xcb, 0x4c, 0x88, 0x5b, 0xf8, 0x66, 0x07, 0x42, 0x84, 0x9c, 0xdc, 0x82, + 0xfa, 0xf3, 0x6e, 0x06, 0xed, 0xec, 0x66, 0xd0, 0x9f, 0xbb, 0x19, 0xf4, 0xf5, 0x5e, 0xe6, 0xd8, + 0xce, 0x5e, 0xe6, 0xd8, 0xab, 0xbd, 0xcc, 0xb1, 0x47, 0x57, 0x8b, 0x86, 0xb3, 0x56, 0xcd, 0x2b, + 0xba, 0x55, 0x22, 0xe2, 0x37, 0x74, 0xfe, 0xe7, 0xb2, 0x5d, 0x58, 0x27, 0x9b, 0xc4, 0xff, 0xad, + 0xfc, 0xed, 0x2b, 0x97, 0x3d, 0x24, 0xce, 0x56, 0x99, 0xda, 0xf9, 0x13, 0xec, 0xa7, 0x90, 0xd9, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xec, 0x25, 0x91, 0xd1, 0xd2, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2054,16 +2053,18 @@ func (m *QueryChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2141,16 +2142,18 @@ func (m *QueryChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2242,16 +2245,18 @@ func (m *QueryConnectionChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2338,16 +2343,18 @@ func (m *QueryChannelClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2437,16 +2444,18 @@ func (m *QueryChannelConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2538,16 +2547,18 @@ func (m *QueryPacketCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2634,16 +2645,18 @@ func (m *QueryPacketCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2735,16 +2748,18 @@ func (m *QueryPacketAcknowledgementResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2837,16 +2852,18 @@ func (m *QueryUnreceivedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 if len(m.Sequences) > 0 { dAtA22 := make([]byte, len(m.Sequences)*10) var j21 int @@ -2943,16 +2960,18 @@ func (m *QueryUnrelayedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 if len(m.Sequences) > 0 { dAtA27 := make([]byte, len(m.Sequences)*10) var j26 int @@ -3031,16 +3050,18 @@ func (m *QueryNextSequenceReceiveResponse) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3098,8 +3119,10 @@ func (m *QueryChannelResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3132,8 +3155,10 @@ func (m *QueryChannelsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3170,8 +3195,10 @@ func (m *QueryConnectionChannelsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3206,8 +3233,10 @@ func (m *QueryChannelClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3252,8 +3281,10 @@ func (m *QueryChannelConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3291,8 +3322,10 @@ func (m *QueryPacketCommitmentResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3333,8 +3366,10 @@ func (m *QueryPacketCommitmentsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3372,8 +3407,10 @@ func (m *QueryPacketAcknowledgementResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3414,8 +3451,10 @@ func (m *QueryUnreceivedPacketsResponse) Size() (n int) { } n += 1 + sovQuery(uint64(l)) + l } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3456,8 +3495,10 @@ func (m *QueryUnrelayedAcksResponse) Size() (n int) { } n += 1 + sovQuery(uint64(l)) + l } - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3491,8 +3532,10 @@ func (m *QueryNextSequenceReceiveResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3747,6 +3790,9 @@ func (m *QueryChannelResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3992,6 +4038,9 @@ func (m *QueryChannelsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4269,6 +4318,9 @@ func (m *QueryConnectionChannelsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4542,6 +4594,9 @@ func (m *QueryChannelClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4885,6 +4940,9 @@ func (m *QueryChannelConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5175,6 +5233,9 @@ func (m *QueryPacketCommitmentResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5484,6 +5545,9 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5774,6 +5838,9 @@ func (m *QueryPacketAcknowledgementResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6129,6 +6196,9 @@ func (m *QueryUnreceivedPacketsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6484,6 +6554,9 @@ func (m *QueryUnrelayedAcksResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6740,6 +6813,9 @@ func (m *QueryNextSequenceReceiveResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/types/tx.pb.go b/x/ibc/core/04-channel/types/tx.pb.go index 2ad25780da15..180dfcbcbc2a 100644 --- a/x/ibc/core/04-channel/types/tx.pb.go +++ b/x/ibc/core/04-channel/types/tx.pb.go @@ -111,14 +111,14 @@ var xxx_messageInfo_MsgChannelOpenInitResponse proto.InternalMessageInfo // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // on Chain B. type MsgChannelOpenTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - DesiredChannelId string `protobuf:"bytes,2,opt,name=desired_channel_id,json=desiredChannelId,proto3" json:"desired_channel_id,omitempty" yaml:"desired_channel_id"` - CounterpartyChosenChannelId string `protobuf:"bytes,3,opt,name=counterparty_chosen_channel_id,json=counterpartyChosenChannelId,proto3" json:"counterparty_chosen_channel_id,omitempty" yaml:"counterparty_chosen_channel_id"` - Channel Channel `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel"` - CounterpartyVersion string `protobuf:"bytes,5,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofInit []byte `protobuf:"bytes,6,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight types.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,8,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + DesiredChannelId string `protobuf:"bytes,2,opt,name=desired_channel_id,json=desiredChannelId,proto3" json:"desired_channel_id,omitempty" yaml:"desired_channel_id"` + CounterpartyChosenChannelId string `protobuf:"bytes,3,opt,name=counterparty_chosen_channel_id,json=counterpartyChosenChannelId,proto3" json:"counterparty_chosen_channel_id,omitempty" yaml:"counterparty_chosen_channel_id"` + Channel Channel `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel"` + CounterpartyVersion string `protobuf:"bytes,5,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofInit []byte `protobuf:"bytes,6,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight *types.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,8,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenTry) Reset() { *m = MsgChannelOpenTry{} } @@ -194,13 +194,13 @@ var xxx_messageInfo_MsgChannelOpenTryResponse proto.InternalMessageInfo // MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge // the change of channel state to TRYOPEN on Chain B. type MsgChannelOpenAck struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - CounterpartyChannelId string `protobuf:"bytes,3,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` - CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofTry []byte `protobuf:"bytes,5,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` - ProofHeight types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyChannelId string `protobuf:"bytes,3,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofTry []byte `protobuf:"bytes,5,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` + ProofHeight *types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenAck) Reset() { *m = MsgChannelOpenAck{} } @@ -276,11 +276,11 @@ var xxx_messageInfo_MsgChannelOpenAckResponse proto.InternalMessageInfo // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of channel state to OPEN on Chain A. type MsgChannelOpenConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenConfirm) Reset() { *m = MsgChannelOpenConfirm{} } @@ -434,11 +434,11 @@ var xxx_messageInfo_MsgChannelCloseInitResponse proto.InternalMessageInfo // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // to acknowledge the change of channel state to CLOSED on Chain A. type MsgChannelCloseConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelCloseConfirm) Reset() { *m = MsgChannelCloseConfirm{} } @@ -513,10 +513,10 @@ var xxx_messageInfo_MsgChannelCloseConfirmResponse proto.InternalMessageInfo // MsgRecvPacket receives incoming IBC packet type MsgRecvPacket struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} } @@ -591,11 +591,11 @@ var xxx_messageInfo_MsgRecvPacketResponse proto.InternalMessageInfo // MsgTimeout receives timed-out packet type MsgTimeout struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeout) Reset() { *m = MsgTimeout{} } @@ -670,12 +670,12 @@ var xxx_messageInfo_MsgTimeoutResponse proto.InternalMessageInfo // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. type MsgTimeoutOnClose struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeoutOnClose) Reset() { *m = MsgTimeoutOnClose{} } @@ -750,11 +750,11 @@ var xxx_messageInfo_MsgTimeoutOnCloseResponse proto.InternalMessageInfo // MsgAcknowledgement receives incoming IBC acknowledgement type MsgAcknowledgement struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` - Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgAcknowledgement) Reset() { *m = MsgAcknowledgement{} } @@ -853,77 +853,77 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1110 bytes of a gzipped FileDescriptorProto + // 1112 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x3f, 0x6f, 0xdb, 0x46, - 0x14, 0x17, 0x25, 0x59, 0xb6, 0x9f, 0xdd, 0xc4, 0xa1, 0x64, 0x47, 0xa1, 0x6c, 0xd1, 0x25, 0xd0, + 0x14, 0x17, 0x25, 0x59, 0xb2, 0x9f, 0xdd, 0xc4, 0xa1, 0x64, 0x5b, 0xa1, 0x6c, 0xd1, 0x25, 0xd0, 0x44, 0x4d, 0x11, 0x29, 0x76, 0x02, 0xb4, 0x0d, 0xba, 0x58, 0x5a, 0x6a, 0x04, 0x46, 0x0a, 0xc6, - 0xe8, 0x60, 0x14, 0x10, 0xe4, 0xd3, 0x85, 0x22, 0x24, 0xdd, 0xa9, 0x24, 0xad, 0x58, 0xdf, 0xa0, - 0x4b, 0x81, 0xce, 0x9d, 0x32, 0x16, 0xe8, 0x90, 0x0f, 0xd1, 0x25, 0x63, 0xb6, 0x74, 0x22, 0x0a, - 0x7b, 0xc9, 0xac, 0x4f, 0x50, 0xf0, 0x78, 0x22, 0x29, 0x8a, 0xb4, 0xe9, 0xba, 0x16, 0x90, 0x49, - 0x77, 0xf7, 0x7e, 0xf7, 0xee, 0xbd, 0xdf, 0xfb, 0xdd, 0x1f, 0x0a, 0x36, 0xf5, 0x63, 0x54, 0x43, - 0xd4, 0xc0, 0x35, 0xd4, 0x69, 0x11, 0x82, 0x7b, 0xb5, 0xe1, 0x4e, 0xcd, 0x3a, 0xad, 0x0e, 0x0c, - 0x6a, 0x51, 0x31, 0xaf, 0x1f, 0xa3, 0xaa, 0x63, 0xad, 0x72, 0x6b, 0x75, 0xb8, 0x23, 0x15, 0x34, - 0xaa, 0x51, 0x66, 0xaf, 0x39, 0x2d, 0x17, 0x2a, 0xc9, 0xbe, 0xa3, 0x9e, 0x8e, 0x89, 0xe5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 0xe8, 0xf1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xca, 0xa5, 0xb5, 0xa5, 0x9d, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1454,16 +1454,18 @@ func (m *MsgChannelOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - i-- - dAtA[i] = 0x3a if len(m.ProofInit) > 0 { i -= len(m.ProofInit) copy(dAtA[i:], m.ProofInit) @@ -1562,16 +1564,18 @@ func (m *MsgChannelOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - i-- - dAtA[i] = 0x32 if len(m.ProofTry) > 0 { i -= len(m.ProofTry) copy(dAtA[i:], m.ProofTry) @@ -1660,16 +1664,18 @@ func (m *MsgChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.ProofAck) > 0 { i -= len(m.ProofAck) copy(dAtA[i:], m.ProofAck) @@ -1811,16 +1817,18 @@ func (m *MsgChannelCloseConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x2a } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.ProofInit) > 0 { i -= len(m.ProofInit) copy(dAtA[i:], m.ProofInit) @@ -1895,16 +1903,18 @@ func (m *MsgRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1980,16 +1990,18 @@ func (m *MsgTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2065,16 +2077,18 @@ func (m *MsgTimeoutOnClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.ProofClose) > 0 { i -= len(m.ProofClose) copy(dAtA[i:], m.ProofClose) @@ -2152,16 +2166,18 @@ func (m *MsgAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.ProofHeight != nil { + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2283,8 +2299,10 @@ func (m *MsgChannelOpenTry) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2327,8 +2345,10 @@ func (m *MsgChannelOpenAck) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2363,8 +2383,10 @@ func (m *MsgChannelOpenConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2429,8 +2451,10 @@ func (m *MsgChannelCloseConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2459,8 +2483,10 @@ func (m *MsgRecvPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2489,8 +2515,10 @@ func (m *MsgTimeout) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } if m.NextSequenceRecv != 0 { n += 1 + sovTx(uint64(m.NextSequenceRecv)) } @@ -2526,8 +2554,10 @@ func (m *MsgTimeoutOnClose) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } if m.NextSequenceRecv != 0 { n += 1 + sovTx(uint64(m.NextSequenceRecv)) } @@ -2563,8 +2593,10 @@ func (m *MsgAcknowledgement) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) + if m.ProofHeight != nil { + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -3075,6 +3107,9 @@ func (m *MsgChannelOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3408,6 +3443,9 @@ func (m *MsgChannelOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3677,6 +3715,9 @@ func (m *MsgChannelOpenConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4148,6 +4189,9 @@ func (m *MsgChannelCloseConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4386,6 +4430,9 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4624,6 +4671,9 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4915,6 +4965,9 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5206,6 +5259,9 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.ProofHeight == nil { + m.ProofHeight = &types.Height{} + } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/client/query.go b/x/ibc/core/client/query.go index 273e25583c54..a005e0a5546e 100644 --- a/x/ibc/core/client/query.go +++ b/x/ibc/core/client/query.go @@ -21,7 +21,7 @@ import ( // not supported. Queries with a client context height of 0 will perform a query // at the lastest state available. // Issue: https://github.com/cosmos/cosmos-sdk/issues/6567 -func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, clienttypes.Height, error) { +func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, *clienttypes.Height, error) { height := clientCtx.Height // ABCI queries at heights 1, 2 or less than or equal to 0 are not supported. @@ -29,7 +29,7 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, // Therefore, a query at height 2 would be equivalent to a query at height 3. // A height of 0 will query with the lastest state. if height != 0 && height <= 2 { - return nil, nil, clienttypes.Height{}, fmt.Errorf("proof queries at height <= 2 are not supported") + return nil, nil, &clienttypes.Height{}, fmt.Errorf("proof queries at height <= 2 are not supported") } // Use the IAVL height if a valid tendermint height is passed in. @@ -47,7 +47,7 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, res, err := clientCtx.QueryABCI(req) if err != nil { - return nil, nil, clienttypes.Height{}, err + return nil, nil, &clienttypes.Height{}, err } merkleProof := commitmenttypes.MerkleProof{ @@ -58,7 +58,7 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, proofBz, err := cdc.MarshalBinaryBare(&merkleProof) if err != nil { - return nil, nil, clienttypes.Height{}, err + return nil, nil, &clienttypes.Height{}, err } version := clienttypes.ParseChainID(clientCtx.ChainID) diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 482027fb8800..328e00800f02 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -88,7 +88,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { clientID, []clienttypes.ConsensusStateWithHeight{ clienttypes.NewConsensusStateWithHeight( - header.GetHeight().(clienttypes.Height), + header.GetHeight().(*clienttypes.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.AppHash), header.Header.NextValidatorsHash, ), @@ -222,7 +222,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { clientID, []clienttypes.ConsensusStateWithHeight{ clienttypes.NewConsensusStateWithHeight( - header.GetHeight().(clienttypes.Height), + header.GetHeight().(*clienttypes.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.AppHash), header.Header.NextValidatorsHash, ), diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 0e1f6aab772e..a93958df86b3 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -682,9 +682,9 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { consAny, err := clienttypes.PackConsensusState(consState) suite.Require().NoError(err) - height, _ := upgradeHeight.(clienttypes.Height) + height, _ := upgradeHeight.(*clienttypes.Height) - msg = &clienttypes.MsgUpgradeClient{ClientId: clientA, ClientState: consAny, UpgradeHeight: &height, ProofUpgrade: proofUpgrade, Signer: suite.chainA.SenderAccount.GetAddress().String()} + msg = &clienttypes.MsgUpgradeClient{ClientId: clientA, ClientState: consAny, UpgradeHeight: height, ProofUpgrade: proofUpgrade, Signer: suite.chainA.SenderAccount.GetAddress().String()} }, expPass: false, }, diff --git a/x/ibc/light-clients/07-tendermint/client/cli/tx.go b/x/ibc/light-clients/07-tendermint/client/cli/tx.go index 54c0ac01b03c..fd090d7e9045 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/tx.go +++ b/x/ibc/light-clients/07-tendermint/client/cli/tx.go @@ -146,7 +146,7 @@ func NewCreateClientCmd() *cobra.Command { return err } - height := header.GetHeight().(clienttypes.Height) + height := header.GetHeight().(*clienttypes.Height) clientState := types.NewClientState( header.GetHeader().GetChainID(), trustLevel, trustingPeriod, ubdPeriod, maxClockDrift, diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 25c40eb0b5e9..6761b7bc6cf9 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -29,7 +29,7 @@ const Tendermint string = "Tendermint" func NewClientState( chainID string, trustLevel Fraction, trustingPeriod, ubdPeriod, maxClockDrift time.Duration, - latestHeight clienttypes.Height, consensusParams *abci.ConsensusParams, specs []*ics23.ProofSpec, + latestHeight *clienttypes.Height, consensusParams *abci.ConsensusParams, specs []*ics23.ProofSpec, upgradePath string, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour bool, ) *ClientState { return &ClientState{ diff --git a/x/ibc/light-clients/07-tendermint/types/header_test.go b/x/ibc/light-clients/07-tendermint/types/header_test.go index 235e1f75844a..cdcd6192dea1 100644 --- a/x/ibc/light-clients/07-tendermint/types/header_test.go +++ b/x/ibc/light-clients/07-tendermint/types/header_test.go @@ -49,7 +49,7 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { header.SignedHeader.Commit = nil }, false}, {"trusted height is greater than header height", func() { - header.TrustedHeight = header.GetHeight().(clienttypes.Height).Increment() + header.TrustedHeight = header.GetHeight().(*clienttypes.Height).Increment() }, false}, {"validator set nil", func() { header.ValidatorSet = nil diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index b1277110a287..3675d95f05a4 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -104,7 +104,7 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { ) } // Ensure that Heights are the same - if misbehaviour.Header1.GetHeight() != misbehaviour.Header2.GetHeight() { + if !misbehaviour.Header1.GetHeight().EQ(misbehaviour.Header2.GetHeight()) { return sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "headers in misbehaviour are on different heights (%d ≠ %d)", misbehaviour.Header1.GetHeight(), misbehaviour.Header2.GetHeight()) } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index d37a21402aa9..81d513cdf60d 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -96,7 +96,7 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState( return nil, sdkerrors.Wrap(err, "verifying Header2 in Misbehaviour failed") } - cs.FrozenHeight = tmMisbehaviour.GetHeight().(clienttypes.Height) + cs.FrozenHeight = tmMisbehaviour.GetHeight().(*clienttypes.Height) return &cs, nil } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 21336118603a..18c0a6bdd878 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -45,9 +45,9 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { name string clientState exported.ClientState consensusState1 exported.ConsensusState - height1 clienttypes.Height + height1 *clienttypes.Height consensusState2 exported.ConsensusState - height2 clienttypes.Height + height2 *clienttypes.Height misbehaviour exported.Misbehaviour timestamp time.Time expPass bool @@ -232,7 +232,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { "trusted consensus state does not exist", types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), nil, // consensus state for trusted height - 1 does not exist in store - clienttypes.Height{}, + &clienttypes.Height{}, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ diff --git a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go index 33c10854e70e..132235bdd6c9 100644 --- a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go @@ -293,7 +293,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeader() { "header height is not newer than client state", func() { consensusState, found := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(found) - clientState.LatestHeight = header.GetHeight().(clienttypes.Height) + clientState.LatestHeight = header.GetHeight().(*clienttypes.Height) suite.chainA.App.IBCKeeper.ClientKeeper.SetClientConsensusState(suite.chainA.GetContext(), clientA, clientState.GetLatestHeight(), consensusState) }, false, diff --git a/x/ibc/light-clients/07-tendermint/types/store_test.go b/x/ibc/light-clients/07-tendermint/types/store_test.go index 42bee567c386..858b6c8efca8 100644 --- a/x/ibc/light-clients/07-tendermint/types/store_test.go +++ b/x/ibc/light-clients/07-tendermint/types/store_test.go @@ -25,7 +25,7 @@ func (suite *TendermintTestSuite) TestGetConsensusState() { { "consensus state not found", func() { // use height with no consensus state set - height = height.(clienttypes.Height).Increment() + height = height.(*clienttypes.Height).Increment() }, false, }, { diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index f4b26ae3c03b..b17d780ec118 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -47,9 +47,9 @@ type ClientState struct { // defines how much new (untrusted) header's Time can drift into the future. MaxClockDrift time.Duration `protobuf:"bytes,5,opt,name=max_clock_drift,json=maxClockDrift,proto3,stdduration" json:"max_clock_drift" yaml:"max_clock_drift"` // Block height when the client was frozen due to a misbehaviour - FrozenHeight types.Height `protobuf:"bytes,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height" yaml:"frozen_height"` + FrozenHeight *types.Height `protobuf:"bytes,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty" yaml:"frozen_height"` // Latest height the client was updated to - LatestHeight types.Height `protobuf:"bytes,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height" yaml:"latest_height"` + LatestHeight *types.Height `protobuf:"bytes,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty" yaml:"latest_height"` // Consensus params of the chain ConsensusParams *types1.ConsensusParams `protobuf:"bytes,8,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty" yaml:"consensus_params"` // Proof specifications used in verifying counterparty state @@ -196,7 +196,7 @@ var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo type Header struct { *types3.SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3,embedded=signed_header" json:"signed_header,omitempty" yaml:"signed_header"` ValidatorSet *types3.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` - TrustedHeight types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height" yaml:"trusted_height"` + TrustedHeight *types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height,omitempty" yaml:"trusted_height"` TrustedValidators *types3.ValidatorSet `protobuf:"bytes,4,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` } @@ -240,11 +240,11 @@ func (m *Header) GetValidatorSet() *types3.ValidatorSet { return nil } -func (m *Header) GetTrustedHeight() types.Height { +func (m *Header) GetTrustedHeight() *types.Height { if m != nil { return m.TrustedHeight } - return types.Height{} + return nil } func (m *Header) GetTrustedValidators() *types3.ValidatorSet { @@ -322,77 +322,77 @@ func init() { var fileDescriptor_c6d6cf2b288949be = []byte{ // 1142 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0x6f, 0xda, 0x7e, 0xb7, 0xe9, 0x24, 0xdd, 0xf6, 0xeb, 0x2d, 0xbb, 0x69, 0xb7, 0x1b, 0x47, - 0x06, 0x2d, 0x15, 0xd2, 0xda, 0x24, 0x8b, 0x84, 0x54, 0x71, 0xc1, 0x5b, 0x50, 0x8b, 0x58, 0xa9, - 0x72, 0xf9, 0x21, 0x21, 0x81, 0x99, 0xd8, 0x93, 0x78, 0x54, 0xdb, 0x63, 0x3c, 0x93, 0x90, 0xf2, - 0x17, 0xc0, 0x6d, 0x8f, 0x2b, 0x4e, 0x1c, 0xf8, 0x47, 0xb8, 0xed, 0xb1, 0xe2, 0xc4, 0xc9, 0xa0, - 0xf6, 0x3f, 0xc8, 0x91, 0x13, 0x9a, 0x1f, 0x8e, 0x27, 0xd9, 0x2e, 0xd5, 0x72, 0x49, 0xe6, 0xbd, - 0xf7, 0x79, 0xef, 0xa3, 0x79, 0xf3, 0xe6, 0x33, 0x06, 0x0e, 0xee, 0x07, 0x4e, 0x8c, 0x87, 0x11, - 0x0b, 0x62, 0x8c, 0x52, 0x46, 0x1d, 0x86, 0xd2, 0x10, 0xe5, 0x09, 0x4e, 0x99, 0x33, 0xee, 0x6a, - 0x96, 0x9d, 0xe5, 0x84, 0x11, 0xa3, 0x8d, 0xfb, 0x81, 0xad, 0x27, 0xd8, 0x1a, 0x64, 0xdc, 0xdd, - 0xed, 0x68, 0xf9, 0xec, 0x3c, 0x43, 0xd4, 0x19, 0xc3, 0x18, 0x87, 0x90, 0x91, 0x5c, 0x56, 0xd8, - 0xdd, 0x7b, 0x09, 0x21, 0x7e, 0x55, 0xf4, 0xbe, 0x16, 0x85, 0xfd, 0x00, 0xcf, 0x05, 0xef, 0x04, - 0x24, 0x1d, 0x60, 0xe2, 0x64, 0x39, 0x21, 0x83, 0xd2, 0xd9, 0x1e, 0x12, 0x32, 0x8c, 0x91, 0x23, - 0xac, 0xfe, 0x68, 0xe0, 0x84, 0xa3, 0x1c, 0x32, 0x4c, 0x52, 0x15, 0x37, 0x17, 0xe3, 0x0c, 0x27, - 0x88, 0x32, 0x98, 0x64, 0x25, 0x80, 0xf7, 0x20, 0x20, 0x39, 0x72, 0xe4, 0x96, 0xf8, 0xbe, 0xe5, - 0x4a, 0x01, 0xde, 0xae, 0x00, 0x24, 0x49, 0x30, 0x4b, 0x4a, 0xd0, 0xcc, 0x52, 0xc0, 0xed, 0x21, - 0x19, 0x12, 0xb1, 0x74, 0xf8, 0x4a, 0x7a, 0xad, 0xdf, 0xeb, 0xa0, 0xf1, 0x44, 0xd4, 0x3b, 0x65, - 0x90, 0x21, 0x63, 0x07, 0xd4, 0x83, 0x08, 0xe2, 0xd4, 0xc7, 0x61, 0xab, 0xd6, 0xa9, 0xed, 0xaf, - 0x7b, 0x6b, 0xc2, 0x3e, 0x0e, 0x0d, 0x04, 0x1a, 0x2c, 0x1f, 0x51, 0xe6, 0x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0xd7, 0xdd, - 0x9e, 0x16, 0xe6, 0x96, 0x9a, 0xec, 0x32, 0x64, 0x79, 0x75, 0xb9, 0x3e, 0x0e, 0x0d, 0x5b, 0xd3, - 0xeb, 0x65, 0x91, 0x71, 0x67, 0x5a, 0x98, 0x9b, 0x2a, 0x43, 0x45, 0xac, 0x4a, 0xc4, 0x21, 0xa8, - 0x47, 0x08, 0x86, 0x28, 0xf7, 0xbb, 0x4a, 0x56, 0x1f, 0xde, 0xa4, 0xe0, 0x47, 0x02, 0xef, 0xb6, - 0x2f, 0x0b, 0x73, 0x4d, 0xae, 0xbb, 0x15, 0x45, 0x59, 0xcc, 0xf2, 0xd6, 0xe4, 0xb2, 0xab, 0x51, - 0xf4, 0x94, 0xa0, 0xfe, 0x07, 0x8a, 0xde, 0x4b, 0x14, 0xbd, 0x19, 0x45, 0xef, 0xa0, 0xce, 0xfb, - 0xf7, 0x9c, 0xf7, 0xf0, 0xe7, 0x15, 0x70, 0x4b, 0x66, 0x18, 0x10, 0x6c, 0x50, 0x3c, 0x4c, 0x51, - 0xe8, 0x4b, 0x98, 0x1a, 0xb3, 0xb6, 0xce, 0x25, 0x1f, 0xec, 0x53, 0x01, 0x53, 0xa4, 0x7b, 0x17, - 0x85, 0x59, 0xab, 0x34, 0x6a, 0xae, 0x84, 0xe5, 0x35, 0xa9, 0x86, 0xe5, 0x12, 0x38, 0x9b, 0x0b, - 0x9f, 0xa2, 0x72, 0x14, 0xaf, 0xa1, 0x98, 0x1d, 0xf8, 0x29, 0x62, 0x6e, 0xab, 0x2a, 0x3f, 0x97, - 0x6e, 0x79, 0xcd, 0xb1, 0x86, 0x33, 0xbe, 0x05, 0xf2, 0x91, 0x12, 0xfc, 0x42, 0x62, 0x57, 0x6e, - 0x94, 0xd8, 0x07, 0x4a, 0x62, 0xdf, 0xd0, 0x9e, 0xbe, 0x59, 0xbe, 0xe5, 0x6d, 0x28, 0x87, 0x12, - 0xd9, 0x18, 0x18, 0x25, 0xa2, 0x1a,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, 0xc7, 0x1a, 0xce, 0xf8, 0x1a, 0xc8, 0xc7, 0x49, 0xf0, 0x0b, 0x79, 0x5d, 0xb9, + 0x51, 0x5e, 0x77, 0xa6, 0x85, 0xf9, 0x9a, 0xf6, 0xdc, 0xcd, 0x72, 0x2d, 0x6f, 0x43, 0x39, 0x94, + 0xc0, 0xc6, 0xc0, 0x28, 0x11, 0xd5, 0x70, 0xab, 0x13, 0xba, 0x69, 0x07, 0xaf, 0x4f, 0x0b, 0x73, + 0x67, 0x9e, 0xa5, 0xaa, 0x61, 0x79, 0xff, 0x57, 0xce, 0x6a, 0xcc, 0xad, 0x8f, 0x41, 0xbd, 0x7c, + 0xf2, 0x8d, 0x3d, 0xb0, 0x9e, 0x8e, 0x12, 0x94, 0xf3, 0x88, 0x38, 0x95, 0x15, 0xaf, 0x72, 0x18, + 0x1d, 0xd0, 0x08, 0x51, 0x4a, 0x12, 0x9c, 0x8a, 0xf8, 0xb2, 0x88, 0xeb, 0x2e, 0xf7, 0xdb, 0xe7, + 0x97, 0xed, 0xda, 0xc5, 0x65, 0xbb, 0xf6, 0xd7, 0x65, 0xbb, 0xf6, 0xf4, 0xaa, 0xbd, 0x74, 0x71, + 0xd5, 0x5e, 0xfa, 0xe3, 0xaa, 0xbd, 0xf4, 0xd5, 0xa1, 0x76, 0x25, 0x03, 0x42, 0x13, 0x42, 0xd5, + 0xdf, 0x43, 0x1a, 0x9e, 0x39, 0x93, 0xea, 0xcb, 0xf1, 0x61, 0xf9, 0xe9, 0xf8, 0xce, 0x7b, 0x0f, + 0x17, 0xbf, 0xed, 0xfa, 0xb7, 0x84, 0x02, 0x3d, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x74, 0x88, + 0xaf, 0xcf, 0x69, 0x0a, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -468,26 +468,30 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - { - size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.LatestHeight != nil { + { + size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - i-- - dAtA[i] = 0x3a - { - size, err := m.FrozenHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.FrozenHeight != nil { + { + size, err := m.FrozenHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - i-- - dAtA[i] = 0x32 n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxClockDrift, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift):]) if err4 != nil { return 0, err4 @@ -673,16 +677,18 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - { - size, err := m.TrustedHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.TrustedHeight != nil { + { + size, err := m.TrustedHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x1a if m.ValidatorSet != nil { { size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) @@ -772,10 +778,14 @@ func (m *ClientState) Size() (n int) { n += 1 + l + sovTendermint(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift) n += 1 + l + sovTendermint(uint64(l)) - l = m.FrozenHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) - l = m.LatestHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) + if m.FrozenHeight != nil { + l = m.FrozenHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) + } + if m.LatestHeight != nil { + l = m.LatestHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) + } if m.ConsensusParams != nil { l = m.ConsensusParams.Size() n += 1 + l + sovTendermint(uint64(l)) @@ -855,8 +865,10 @@ func (m *Header) Size() (n int) { l = m.ValidatorSet.Size() n += 1 + l + sovTendermint(uint64(l)) } - l = m.TrustedHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) + if m.TrustedHeight != nil { + l = m.TrustedHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) + } if m.TrustedValidators != nil { l = m.TrustedValidators.Size() n += 1 + l + sovTendermint(uint64(l)) @@ -1107,6 +1119,9 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.FrozenHeight == nil { + m.FrozenHeight = &types.Height{} + } if err := m.FrozenHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1140,6 +1155,9 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.LatestHeight == nil { + m.LatestHeight = &types.Height{} + } if err := m.LatestHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1782,6 +1800,9 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.TrustedHeight == nil { + m.TrustedHeight = &types.Height{} + } if err := m.TrustedHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/light-clients/07-tendermint/types/update.go b/x/ibc/light-clients/07-tendermint/types/update.go index 50adcb1c1f17..928d2395e65a 100644 --- a/x/ibc/light-clients/07-tendermint/types/update.go +++ b/x/ibc/light-clients/07-tendermint/types/update.go @@ -168,7 +168,7 @@ func checkValidity( // update the consensus state from a new header func update(clientState *ClientState, header *Header) (*ClientState, *ConsensusState) { - height := header.GetHeight().(clienttypes.Height) + height := header.GetHeight().(*clienttypes.Height) if height.GT(clientState.LatestHeight) { clientState.LatestHeight = height } diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/07-tendermint/types/update_test.go index 2d075ad0a5cf..fb5970b840e0 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/07-tendermint/types/update_test.go @@ -17,7 +17,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { var ( clientState *types.ClientState consensusState *types.ConsensusState - consStateHeight clienttypes.Height + consStateHeight *clienttypes.Height newHeader *types.Header currentTime time.Time ) diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index f5debb01a6ef..1db840f9d46f 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -12,7 +12,7 @@ import ( func (suite *TendermintTestSuite) TestVerifyUpgrade() { var ( upgradedClient exported.ClientState - upgradeHeight clienttypes.Height + upgradeHeight *clienttypes.Height clientA string proofUpgrade []byte ) diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index edaa74c68713..5a649ff42799 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -21,7 +21,7 @@ import ( var _ exported.ClientState = (*ClientState)(nil) // NewClientState creates a new ClientState instance -func NewClientState(chainID string, height clienttypes.Height) *ClientState { +func NewClientState(chainID string, height *clienttypes.Height) *ClientState { return &ClientState{ ChainId: chainID, Height: height, diff --git a/x/ibc/light-clients/09-localhost/types/localhost.pb.go b/x/ibc/light-clients/09-localhost/types/localhost.pb.go index 28f7f74d3879..b1e0c506f49b 100644 --- a/x/ibc/light-clients/09-localhost/types/localhost.pb.go +++ b/x/ibc/light-clients/09-localhost/types/localhost.pb.go @@ -30,7 +30,7 @@ type ClientState struct { // self chain ID ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` // self latest block height - Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` + Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` } func (m *ClientState) Reset() { *m = ClientState{} } @@ -75,25 +75,25 @@ func init() { } var fileDescriptor_acd9f5b22d41bf6d = []byte{ - // 279 bytes of a gzipped FileDescriptorProto + // 273 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcd, 0x4c, 0x4a, 0xd6, 0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0x49, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x29, 0xd6, 0xcf, 0xc9, 0x4f, 0x4e, 0xcc, 0xc9, 0xc8, 0x2f, 0x2e, 0xd1, 0x2f, 0x33, 0x44, 0x70, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x64, 0x33, 0x93, 0x92, 0xf5, 0x90, 0x95, 0xeb, 0x21, 0x54, 0x94, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x55, 0xea, 0x83, 0x58, 0x10, 0x4d, 0x52, 0xf2, 0x20, 0x3b, 0x92, - 0xf3, 0x8b, 0x52, 0xf5, 0x21, 0x9a, 0x40, 0x06, 0x43, 0x58, 0x10, 0x05, 0x4a, 0xb5, 0x5c, 0xdc, + 0xf3, 0x8b, 0x52, 0xf5, 0x21, 0x9a, 0x40, 0x06, 0x43, 0x58, 0x10, 0x05, 0x4a, 0xe5, 0x5c, 0xdc, 0xce, 0x60, 0x7e, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x1e, 0x17, 0x47, 0x72, 0x46, 0x62, 0x66, 0x5e, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xf0, 0xa7, 0x7b, 0xf2, 0xfc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x30, 0x19, 0xa5, 0x20, 0x76, 0x30, 0xd3, 0x33, 0x45, 0xc8, - 0x82, 0x8b, 0x2d, 0x23, 0x15, 0xe4, 0x26, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, 0x3d, - 0x90, 0x2b, 0x41, 0x16, 0xea, 0x41, 0xad, 0x29, 0x33, 0xd4, 0xf3, 0x00, 0xab, 0x70, 0x62, 0x39, - 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xde, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x53, 0xec, 0x89, - 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, - 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, - 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0x43, 0x29, 0xdd, 0xe2, 0x94, - 0x6c, 0xfd, 0x0a, 0x7d, 0x78, 0xe0, 0xe9, 0xc2, 0x42, 0xcf, 0xc0, 0x52, 0x17, 0x11, 0x80, 0x25, - 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x4f, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcd, - 0x7d, 0x91, 0x77, 0x6b, 0x01, 0x00, 0x00, + 0x88, 0x8b, 0x2d, 0x23, 0x15, 0xe4, 0x26, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, 0x3d, + 0x90, 0x2b, 0x41, 0x16, 0xea, 0x41, 0xad, 0x29, 0x33, 0xd4, 0xf3, 0x00, 0xab, 0x08, 0x82, 0xaa, + 0xb4, 0x62, 0xe9, 0x58, 0x20, 0xcf, 0xe0, 0x14, 0x7b, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, + 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, + 0x72, 0x0c, 0x51, 0xce, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xc9, + 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x42, 0x1f, 0x1e, 0x6c, + 0xba, 0xb0, 0x70, 0x33, 0xb0, 0xd4, 0x45, 0x04, 0x5d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, + 0xd8, 0x7b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xb9, 0x98, 0x4d, 0x65, 0x01, 0x00, + 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -116,16 +116,18 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Height != nil { + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLocalhost(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintLocalhost(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 if len(m.ChainId) > 0 { i -= len(m.ChainId) copy(dAtA[i:], m.ChainId) @@ -157,8 +159,10 @@ func (m *ClientState) Size() (n int) { if l > 0 { n += 1 + l + sovLocalhost(uint64(l)) } - l = m.Height.Size() - n += 1 + l + sovLocalhost(uint64(l)) + if m.Height != nil { + l = m.Height.Size() + n += 1 + l + sovLocalhost(uint64(l)) + } return n } @@ -258,6 +262,9 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Height == nil { + m.Height = &types.Height{} + } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 4ef4676eefff..ed54b817cb1d 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -189,7 +189,7 @@ func (chain *TestChain) GetContext() sdk.Context { // QueryProof performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { +func (chain *TestChain) QueryProof(key []byte) ([]byte, *clienttypes.Height) { res := chain.App.Query(abci.RequestQuery{ Path: fmt.Sprintf("store/%s/key", host.StoreKey), Height: chain.App.LastBlockHeight() - 1, @@ -214,7 +214,7 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { // QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) { +func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, *clienttypes.Height) { res := chain.App.Query(abci.RequestQuery{ Path: "store/upgrade/key", Height: int64(height - 1), @@ -252,10 +252,10 @@ func (chain *TestChain) QueryClientStateProof(clientID string) (exported.ClientS // QueryConsensusStateProof performs an abci query for a consensus state // stored on the given clientID. The proof and consensusHeight are returned. -func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) { +func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, *clienttypes.Height) { clientState := chain.GetClientState(clientID) - consensusHeight := clientState.GetLatestHeight().(clienttypes.Height) + consensusHeight := clientState.GetLatestHeight().(*clienttypes.Height) consensusKey := host.FullKeyClientPath(clientID, host.KeyConsensusState(consensusHeight)) proofConsensus, _ := chain.QueryProof(consensusKey) @@ -435,7 +435,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client switch clientType { case Tendermint: - height := counterparty.LastHeader.GetHeight().(clienttypes.Height) + height := counterparty.LastHeader.GetHeight().(*clienttypes.Height) clientState = ibctmtypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, height, counterparty.App.GetConsensusParams(counterparty.GetContext()), commitmenttypes.GetSDKSpecs(), @@ -486,7 +486,7 @@ func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) { header := counterparty.LastHeader // Relayer must query for LatestHeight on client to get TrustedHeight - trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(clienttypes.Height) + trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(*clienttypes.Height) var ( tmTrustedVals *tmtypes.ValidatorSet ok bool @@ -529,12 +529,12 @@ func (chain *TestChain) ExpireClient(amount time.Duration) { // CurrentTMClientHeader creates a TM header using the current header parameters // on the chain. The trusted fields in the header are set to nil. func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header { - return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) + return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, &clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) } // CreateTMClientHeader creates a TM header to update the TM client. Args are passed in to allow // caller flexibility to use params that differ from the chain. -func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) *ibctmtypes.Header { +func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight *clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) *ibctmtypes.Header { var ( valSet *tmproto.ValidatorSet trustedVals *tmproto.ValidatorSet From a4d90346c69353218d3ed2ce9dd9bb3aa09b7fb0 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 11 Nov 2020 12:10:38 +0530 Subject: [PATCH 16/24] Fix tendermint abci query txs issue --- types/events.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/events.go b/types/events.go index 44d48d9cd5b8..d0435e7d8ce9 100644 --- a/types/events.go +++ b/types/events.go @@ -74,7 +74,8 @@ func (em *EventManager) EmitTypedEvents(tevs ...proto.Message) error { // TypedEventToEvent takes typed event and converts to Event object func TypedEventToEvent(tev proto.Message) (Event, error) { - evtType := proto.MessageName(tev) + // Replace "." in event type with "-" to fix tm event query issue + evtType := strings.ReplaceAll(proto.MessageName(tev), ".", "-") evtJSON, err := codec.ProtoMarshalJSON(tev, nil) if err != nil { return Event{}, err @@ -102,7 +103,9 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { // ParseTypedEvent converts abci.Event back to typed event func ParseTypedEvent(event abci.Event) (proto.Message, error) { - concreteGoType := proto.MessageType(event.Type) + // Revert changes in event type name by replacing "-" with "." + evtType := strings.ReplaceAll(event.Type, "-", ".") + concreteGoType := proto.MessageType(evtType) if concreteGoType == nil { return nil, fmt.Errorf("failed to retrieve the message of type %q", event.Type) } From f609c7e941c5d30e95eb54cb9b8feef1b0d857b3 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 11 Nov 2020 13:29:31 +0530 Subject: [PATCH 17/24] Add ResultEventToABCIEvent --- types/events.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/types/events.go b/types/events.go index d0435e7d8ce9..4cdf00622c6f 100644 --- a/types/events.go +++ b/types/events.go @@ -11,6 +11,13 @@ import ( "github.com/gogo/protobuf/jsonpb" proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" + tmtypes "github.com/tendermint/tendermint/types" +) + +var ( + txEvents = "tm.event='Tx'" + blEvents = "tm.event='NewBlock'" ) // ---------------------------------------------------------------------------- @@ -140,6 +147,41 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { return protoMsg, nil } +// ResultEventToABCIEvent takes the ctypes.ResultEvent and casts it to abci.TxResult, extracting the []abci.Event +func ResultEventToABCIEvent(rev ctypes.ResultEvent) ([]abci.Event, error) { + switch rev.Query { + case txEvents: + var txResult abci.TxResult + txResBytes, err := json.Marshal(rev.Data) + if err != nil { + return nil, err + } + if err := json.Unmarshal(txResBytes, &txResult); err != nil { + return nil, fmt.Errorf("failed to unmarshall into abci.TxResult: %s", string(txResBytes)) + } + return txResult.Result.Events, nil + case blEvents: + var blResult tmtypes.EventDataNewBlock + bl, err := json.Marshal(rev.Data) + if err != nil { + return nil, err + } + if err := json.Unmarshal(bl, &blResult); err != nil { + return nil, fmt.Errorf("failed to unmarshal into tmtypes.EventDataNewBlock: %s", string(bl)) + } + out := []abci.Event{} + for _, ev := range blResult.ResultBeginBlock.Events { + out = append(out, ev) + } + for _, ev := range blResult.ResultEndBlock.Events { + out = append(out, ev) + } + return out, nil + default: + return nil, fmt.Errorf("neither tx nor new block event: %s", rev.Query) + } +} + // ---------------------------------------------------------------------------- // Events // ---------------------------------------------------------------------------- From 6d92028eb3244bb3680bb2633263c7de3a3c6d40 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 11 Nov 2020 13:35:23 +0530 Subject: [PATCH 18/24] Fix golangci lint issues --- types/events.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/types/events.go b/types/events.go index 4cdf00622c6f..bf95087b727c 100644 --- a/types/events.go +++ b/types/events.go @@ -170,12 +170,8 @@ func ResultEventToABCIEvent(rev ctypes.ResultEvent) ([]abci.Event, error) { return nil, fmt.Errorf("failed to unmarshal into tmtypes.EventDataNewBlock: %s", string(bl)) } out := []abci.Event{} - for _, ev := range blResult.ResultBeginBlock.Events { - out = append(out, ev) - } - for _, ev := range blResult.ResultEndBlock.Events { - out = append(out, ev) - } + out = append(out, blResult.ResultBeginBlock.Events...) + out = append(out, blResult.ResultEndBlock.Events...) return out, nil default: return nil, fmt.Errorf("neither tx nor new block event: %s", rev.Query) From 344614ba217600de0d00a0473a2f368416623dd0 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Wed, 18 Nov 2020 12:26:55 +0530 Subject: [PATCH 19/24] Update attribute value encoding --- types/events.go | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/types/events.go b/types/events.go index bf95087b727c..89baae2c118c 100644 --- a/types/events.go +++ b/types/events.go @@ -88,7 +88,7 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { return Event{}, err } - var attrMap map[string]json.RawMessage + var attrMap map[string]interface{} err = json.Unmarshal(evtJSON, &attrMap) if err != nil { return Event{}, err @@ -96,9 +96,21 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { attrs := make([]abci.EventAttribute, 0, len(attrMap)) for k, v := range attrMap { + var valueBz []byte + switch v := v.(type) { + case string: + valueBz = []byte(v) + default: + var err error + valueBz, err = json.Marshal(v) + if err != nil { + return Event{}, err + } + } + attrs = append(attrs, abci.EventAttribute{ Key: []byte(k), - Value: v, + Value: valueBz, }) } @@ -129,9 +141,15 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { return nil, fmt.Errorf("%q does not implement proto.Message", event.Type) } - attrMap := make(map[string]json.RawMessage) + attrMap := make(map[string]interface{}) for _, attr := range event.Attributes { - attrMap[string(attr.Key)] = attr.Value + var value interface{} + err := json.Unmarshal(attr.Value, &value) + if err != nil { + value = string(attr.Value) + } + + attrMap[string(attr.Key)] = value } attrBytes, err := json.Marshal(attrMap) From 3e9169cfe3c49e0f2c866cc613849d319bff3e2a Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Thu, 19 Nov 2020 11:31:47 +0530 Subject: [PATCH 20/24] Revert EventTypeMessage events --- .../transfer/keeper/msg_server.go | 7 +++ x/ibc/core/04-channel/handler.go | 42 ++++++++++++++++ x/ibc/core/04-channel/keeper/packet.go | 28 +++++++++++ x/ibc/core/04-channel/keeper/timeout.go | 7 +++ x/ibc/core/keeper/msg_server.go | 49 +++++++++++++++++++ 5 files changed, 133 insertions(+) diff --git a/x/ibc/applications/transfer/keeper/msg_server.go b/x/ibc/applications/transfer/keeper/msg_server.go index 1ae750064151..598c73360a30 100644 --- a/x/ibc/applications/transfer/keeper/msg_server.go +++ b/x/ibc/applications/transfer/keeper/msg_server.go @@ -36,5 +36,12 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + ), + ) + return &types.MsgTransferResponse{}, nil } diff --git a/x/ibc/core/04-channel/handler.go b/x/ibc/core/04-channel/handler.go index 2c28c93c88ec..b7ced1eab302 100644 --- a/x/ibc/core/04-channel/handler.go +++ b/x/ibc/core/04-channel/handler.go @@ -30,6 +30,13 @@ func HandleMsgChannelOpenInit(ctx sdk.Context, k keeper.Keeper, portCap *capabil return nil, nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, capKey, nil @@ -56,6 +63,13 @@ func HandleMsgChannelOpenTry(ctx sdk.Context, k keeper.Keeper, portCap *capabili return nil, nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, capKey, nil @@ -84,6 +98,13 @@ func HandleMsgChannelOpenAck(ctx sdk.Context, k keeper.Keeper, channelCap *capab return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -110,6 +131,13 @@ func HandleMsgChannelOpenConfirm(ctx sdk.Context, k keeper.Keeper, channelCap *c return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -136,6 +164,13 @@ func HandleMsgChannelCloseInit(ctx sdk.Context, k keeper.Keeper, channelCap *cap return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -162,6 +197,13 @@ func HandleMsgChannelCloseConfirm(ctx sdk.Context, k keeper.Keeper, channelCap * return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 24bb1517aa06..214ccd7360e7 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -138,6 +138,13 @@ func (k Keeper) SendPacket( return err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + k.Logger(ctx).Info("packet sent", "packet", fmt.Sprintf("%v", packet)) return nil } @@ -300,6 +307,13 @@ func (k Keeper) RecvPacket( return err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return nil } @@ -383,6 +397,13 @@ func (k Keeper) WriteAcknowledgement( return err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return nil } @@ -520,5 +541,12 @@ func (k Keeper) AcknowledgePacket( return err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return nil } diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index 43fc615be1a8..9ef49fa878fe 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -172,6 +172,13 @@ func (k Keeper) TimeoutExecuted( return err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + ) + return nil } diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index f533b315db96..c0ae328890c9 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -51,6 +51,13 @@ func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateCl return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), + ), + ) + return &clienttypes.MsgCreateClientResponse{}, nil } @@ -67,6 +74,13 @@ func (k Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateCl return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), + ), + ) + return &clienttypes.MsgUpdateClientResponse{}, nil } @@ -83,6 +97,13 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), + ), + ) + return &clienttypes.MsgUpgradeClientResponse{}, nil } @@ -138,6 +159,13 @@ func (k Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.M return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), + ), + ) + return &connectiontypes.MsgConnectionOpenInitResponse{}, nil } @@ -169,6 +197,13 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), + ), + ) + return &connectiontypes.MsgConnectionOpenTryResponse{}, nil } @@ -201,6 +236,13 @@ func (k Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.Ms return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), + ), + ) + return &connectiontypes.MsgConnectionOpenAckResponse{}, nil } @@ -227,6 +269,13 @@ func (k Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontype return nil, err } + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), + ), + ) + return &connectiontypes.MsgConnectionOpenConfirmResponse{}, nil } From f9eb795b92c41b7ed5d0ad4df1caaf024266144d Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Mon, 30 Nov 2020 15:01:15 +0530 Subject: [PATCH 21/24] Revert Height changes --- proto/ibc/applications/transfer/v1/tx.proto | 2 +- proto/ibc/core/channel/v1/channel.proto | 2 +- proto/ibc/core/channel/v1/event.proto | 19 +- proto/ibc/core/channel/v1/query.proto | 26 +- proto/ibc/core/channel/v1/tx.proto | 16 +- proto/ibc/core/client/v1/client.proto | 2 +- proto/ibc/core/client/v1/event.proto | 19 +- proto/ibc/core/client/v1/query.proto | 4 +- proto/ibc/core/connection/v1/query.proto | 10 +- proto/ibc/core/connection/v1/tx.proto | 10 +- .../lightclients/localhost/v1/localhost.proto | 2 +- .../tendermint/v1/tendermint.proto | 6 +- x/ibc/applications/transfer/keeper/relay.go | 2 +- x/ibc/applications/transfer/types/msgs.go | 2 +- x/ibc/applications/transfer/types/tx.pb.go | 93 ++- x/ibc/core/02-client/abci_test.go | 2 +- x/ibc/core/02-client/client/cli/query.go | 2 +- x/ibc/core/02-client/keeper/client.go | 14 +- x/ibc/core/02-client/keeper/client_test.go | 4 +- x/ibc/core/02-client/keeper/keeper.go | 2 +- x/ibc/core/02-client/keeper/keeper_test.go | 10 +- x/ibc/core/02-client/keeper/proposal.go | 7 +- x/ibc/core/02-client/types/client.go | 2 +- x/ibc/core/02-client/types/client.pb.go | 108 ++- x/ibc/core/02-client/types/client_test.go | 2 +- x/ibc/core/02-client/types/codec.go | 32 - x/ibc/core/02-client/types/codec_test.go | 47 -- x/ibc/core/02-client/types/event.pb.go | 232 +++---- x/ibc/core/02-client/types/genesis_test.go | 10 +- x/ibc/core/02-client/types/height.go | 46 +- x/ibc/core/02-client/types/height_test.go | 6 +- x/ibc/core/02-client/types/msgs.go | 4 +- x/ibc/core/02-client/types/query.go | 4 +- x/ibc/core/02-client/types/query.pb.go | 172 +++-- .../core/03-connection/client/utils/utils.go | 2 +- x/ibc/core/03-connection/types/msgs.go | 6 +- x/ibc/core/03-connection/types/query.go | 8 +- x/ibc/core/03-connection/types/query.pb.go | 279 ++++---- x/ibc/core/03-connection/types/tx.pb.go | 294 ++++----- x/ibc/core/04-channel/client/utils/utils.go | 18 +- x/ibc/core/04-channel/keeper/packet.go | 28 +- x/ibc/core/04-channel/keeper/packet_test.go | 2 +- x/ibc/core/04-channel/keeper/timeout.go | 7 +- x/ibc/core/04-channel/types/channel.pb.go | 143 ++-- x/ibc/core/04-channel/types/event.pb.go | 332 +++++----- x/ibc/core/04-channel/types/msgs.go | 16 +- x/ibc/core/04-channel/types/packet.go | 2 +- x/ibc/core/04-channel/types/query.go | 14 +- x/ibc/core/04-channel/types/query.pb.go | 617 ++++++++---------- x/ibc/core/04-channel/types/tx.pb.go | 454 ++++++------- x/ibc/core/client/query.go | 10 +- x/ibc/core/genesis_test.go | 4 +- x/ibc/core/keeper/msg_server.go | 14 +- x/ibc/core/keeper/msg_server_test.go | 8 +- .../07-tendermint/client/cli/tx.go | 2 +- .../07-tendermint/types/client_state.go | 2 +- .../07-tendermint/types/header_test.go | 2 +- .../07-tendermint/types/misbehaviour.go | 2 +- .../types/misbehaviour_handle.go | 2 +- .../types/misbehaviour_handle_test.go | 6 +- .../types/proposal_handle_test.go | 2 +- .../07-tendermint/types/store_test.go | 2 +- .../07-tendermint/types/tendermint.pb.go | 229 +++---- .../07-tendermint/types/update.go | 2 +- .../07-tendermint/types/update_test.go | 36 +- .../07-tendermint/types/upgrade_test.go | 2 +- .../09-localhost/types/client_state.go | 2 +- .../09-localhost/types/localhost.pb.go | 51 +- x/ibc/testing/chain.go | 16 +- 69 files changed, 1535 insertions(+), 2002 deletions(-) diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index 5811ea56628d..a0f0827aaf6a 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -33,7 +33,7 @@ message MsgTransfer { // Timeout height relative to the current block height. // The timeout is disabled when set to 0. ibc.core.client.v1.Height timeout_height = 6 - [(gogoproto.moretags) = "yaml:\"timeout_height\""]; + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; // Timeout timestamp (in nanoseconds) relative to the current block timestamp. // The timeout is disabled when set to 0. uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 4f8f020673ab..302a48068953 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -109,7 +109,7 @@ message Packet { bytes data = 6; // block height after which the packet times out ibc.core.client.v1.Height timeout_height = 7 - [(gogoproto.moretags) = "yaml:\"timeout_height\""]; + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; // block timestamp (in nanoseconds) after which the packet times out uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; } diff --git a/proto/ibc/core/channel/v1/event.proto b/proto/ibc/core/channel/v1/event.proto index c44ea44c69c0..5614b7ab9153 100644 --- a/proto/ibc/core/channel/v1/event.proto +++ b/proto/ibc/core/channel/v1/event.proto @@ -4,8 +4,8 @@ package ibc.core.channel.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; import "ibc/core/channel/v1/channel.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; // EventChannelOpenInit is a typed event emitted on channel open init message EventChannelOpenInit { @@ -89,7 +89,8 @@ message EventChannelCloseConfirm { message EventChannelSendPacket { bytes data = 1; - google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height timeout_height = 2 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 timeout_timestamp = 3; @@ -110,7 +111,8 @@ message EventChannelSendPacket { message EventChannelRecvPacket { bytes data = 1; - google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height timeout_height = 2 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 timeout_timestamp = 3; @@ -131,7 +133,8 @@ message EventChannelRecvPacket { message EventChannelWriteAck { bytes data = 1; - google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height timeout_height = 2 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 timeout_timestamp = 3; @@ -150,7 +153,8 @@ message EventChannelWriteAck { // EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed message EventChannelAckPacket { - google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height timeout_height = 1 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 timeout_timestamp = 2; @@ -169,7 +173,8 @@ message EventChannelAckPacket { // EventChannelTimeoutPacket is a typed event emitted when packet is timeout message EventChannelTimeoutPacket { - google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height timeout_height = 1 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 timeout_timestamp = 2; diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 09b4daba26f0..4121096240ab 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -110,7 +110,7 @@ message QueryChannelResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -126,7 +126,7 @@ message QueryChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3; + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionChannelsRequest is the request type for the @@ -146,7 +146,7 @@ message QueryConnectionChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3; + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } // QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -166,7 +166,7 @@ message QueryChannelClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryChannelConsensusStateRequest is the request type for the @@ -192,7 +192,7 @@ message QueryChannelConsensusStateResponse { // merkle proof of existence bytes proof = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4; + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentRequest is the request type for the @@ -215,7 +215,7 @@ message QueryPacketCommitmentResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentsRequest is the request type for the @@ -236,7 +236,7 @@ message QueryPacketCommitmentsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3; + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } // QueryPacketReceiptRequest is the request type for the @@ -259,7 +259,7 @@ message QueryPacketReceiptResponse { // merkle proof of existence bytes proof = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4; + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryPacketAcknowledgementRequest is the request type for the @@ -282,7 +282,7 @@ message QueryPacketAcknowledgementResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryPacketAcknowledgementsRequest is the request type for the @@ -303,7 +303,7 @@ message QueryPacketAcknowledgementsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3; + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } // QueryUnreceivedPacketsRequest is the request type for the @@ -323,7 +323,7 @@ message QueryUnreceivedPacketsResponse { // list of unreceived packet sequences repeated uint64 sequences = 1; // query block height - ibc.core.client.v1.Height height = 2; + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; } // QueryUnreceivedAcks is the request type for the @@ -343,7 +343,7 @@ message QueryUnreceivedAcksResponse { // list of unreceived acknowledgement sequences repeated uint64 sequences = 1; // query block height - ibc.core.client.v1.Height height = 2; + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; } // QueryNextSequenceReceiveRequest is the request type for the @@ -363,5 +363,5 @@ message QueryNextSequenceReceiveResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index b9e2de9e5668..c60ecc4363d2 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -68,7 +68,7 @@ message MsgChannelOpenTry { string counterparty_version = 5 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_init = 6 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 8; } @@ -87,7 +87,7 @@ message MsgChannelOpenAck { string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 7; } @@ -104,7 +104,7 @@ message MsgChannelOpenConfirm { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 5; } @@ -135,7 +135,7 @@ message MsgChannelCloseConfirm { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 5; } @@ -150,7 +150,7 @@ message MsgRecvPacket { Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 4; } @@ -165,7 +165,7 @@ message MsgTimeout { Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; string signer = 5; } @@ -182,7 +182,7 @@ message MsgTimeoutOnClose { bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; string signer = 6; } @@ -199,7 +199,7 @@ message MsgAcknowledgement { bytes acknowledgement = 2; bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 5; } diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 2d7b5ee76874..a5d2b0f19e72 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -18,7 +18,7 @@ message IdentifiedClientState { // ConsensusStateWithHeight defines a consensus state with an additional height field. message ConsensusStateWithHeight { // consensus state height - Height height = 1; + Height height = 1 [(gogoproto.nullable) = false]; // consensus state google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""]; } diff --git a/proto/ibc/core/client/v1/event.proto b/proto/ibc/core/client/v1/event.proto index 9688a0b8346c..505bee0914ba 100644 --- a/proto/ibc/core/client/v1/event.proto +++ b/proto/ibc/core/client/v1/event.proto @@ -3,8 +3,8 @@ package ibc.core.client.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; // EventCreateClient is a typed event emitted on creating client message EventCreateClient { @@ -12,7 +12,8 @@ message EventCreateClient { string client_type = 2; - google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height consensus_height = 3 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; } // EventUpdateClient is a typed event emitted on updating client @@ -21,7 +22,8 @@ message EventUpdateClient { string client_type = 2; - google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height consensus_height = 3 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; } // EventUpgradeClient is a typed event emitted on upgrading client @@ -30,7 +32,8 @@ message EventUpgradeClient { string client_type = 2; - google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height consensus_height = 3 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; } // EventUpdateClientProposal is a typed event emitted on updating client proposal @@ -39,7 +42,8 @@ message EventUpdateClientProposal { string client_type = 2; - google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height consensus_height = 3 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; } // EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted @@ -48,5 +52,6 @@ message EventClientMisbehaviour { string client_type = 2; - google.protobuf.Any consensus_height = 3 [(cosmos_proto.accepts_interface) = "Height"]; + ibc.core.client.v1.Height consensus_height = 3 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index 1ecdcd2f8d46..7a1bf505388c 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -56,7 +56,7 @@ message QueryClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -99,7 +99,7 @@ message QueryConsensusStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index e04242696c8c..9e5b068804dc 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -58,7 +58,7 @@ message QueryConnectionResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -75,7 +75,7 @@ message QueryConnectionsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.core.client.v1.Height height = 3; + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } // QueryClientConnectionsRequest is the request type for the @@ -93,7 +93,7 @@ message QueryClientConnectionsResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionClientStateRequest is the request type for the @@ -111,7 +111,7 @@ message QueryConnectionClientStateResponse { // merkle proof of existence bytes proof = 2; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionConsensusStateRequest is the request type for the @@ -133,5 +133,5 @@ message QueryConnectionConsensusStateResponse { // merkle proof of existence bytes proof = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4; + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 091cd564227e..02a12b0e3106 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -52,7 +52,7 @@ message MsgConnectionOpenTry { Counterparty counterparty = 5 [(gogoproto.nullable) = false]; repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; @@ -61,7 +61,7 @@ message MsgConnectionOpenTry { // proof of client consensus state bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.core.client.v1.Height consensus_height = 11 - [(gogoproto.moretags) = "yaml:\"consensus_height\""]; + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; string signer = 12; } @@ -79,7 +79,7 @@ message MsgConnectionOpenAck { Version version = 3; google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; ibc.core.client.v1.Height proof_height = 5 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain B: `UNITIALIZED -> // TRYOPEN` bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; @@ -88,7 +88,7 @@ message MsgConnectionOpenAck { // proof of client consensus state bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.core.client.v1.Height consensus_height = 9 - [(gogoproto.moretags) = "yaml:\"consensus_height\""]; + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; string signer = 10; } @@ -105,7 +105,7 @@ message MsgConnectionOpenConfirm { // proof for the change of the connection state on Chain A: `INIT -> OPEN` bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\""]; + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 4; } diff --git a/proto/ibc/lightclients/localhost/v1/localhost.proto b/proto/ibc/lightclients/localhost/v1/localhost.proto index d6fe1c63c77f..d48a1c0076be 100644 --- a/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -13,5 +13,5 @@ message ClientState { // self chain ID string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""]; // self latest block height - ibc.core.client.v1.Height height = 2; + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index a96062bc2192..6f9285c05730 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -34,10 +34,10 @@ message ClientState { [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; // Block height when the client was frozen due to a misbehaviour ibc.core.client.v1.Height frozen_height = 6 - [(gogoproto.moretags) = "yaml:\"frozen_height\""]; + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; // Latest height the client was updated to ibc.core.client.v1.Height latest_height = 7 - [(gogoproto.moretags) = "yaml:\"latest_height\""]; + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; // Proof specifications used in verifying counterparty state repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; @@ -96,7 +96,7 @@ message Header { .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; ibc.core.client.v1.Height trusted_height = 3 - [(gogoproto.moretags) = "yaml:\"trusted_height\""]; + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; } diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index 358ccc0eebe1..d42032202df1 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -54,7 +54,7 @@ func (k Keeper) SendTransfer( token sdk.Coin, sender sdk.AccAddress, receiver string, - timeoutHeight *clienttypes.Height, + timeoutHeight clienttypes.Height, timeoutTimestamp uint64, ) error { diff --git a/x/ibc/applications/transfer/types/msgs.go b/x/ibc/applications/transfer/types/msgs.go index 0a70c852b158..065482671375 100644 --- a/x/ibc/applications/transfer/types/msgs.go +++ b/x/ibc/applications/transfer/types/msgs.go @@ -19,7 +19,7 @@ const ( func NewMsgTransfer( sourcePort, sourceChannel string, token sdk.Coin, sender sdk.AccAddress, receiver string, - timeoutHeight *clienttypes.Height, timeoutTimestamp uint64, + timeoutHeight clienttypes.Height, timeoutTimestamp uint64, ) *MsgTransfer { return &MsgTransfer{ SourcePort: sourcePort, diff --git a/x/ibc/applications/transfer/types/tx.pb.go b/x/ibc/applications/transfer/types/tx.pb.go index 62ae89605489..dd46dbe2610e 100644 --- a/x/ibc/applications/transfer/types/tx.pb.go +++ b/x/ibc/applications/transfer/types/tx.pb.go @@ -46,7 +46,7 @@ type MsgTransfer struct { Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` // Timeout height relative to the current block height. // The timeout is disabled when set to 0. - TimeoutHeight *types1.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty" yaml:"timeout_height"` + TimeoutHeight types1.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` // Timeout timestamp (in nanoseconds) relative to the current block timestamp. // The timeout is disabled when set to 0. TimeoutTimestamp uint64 `protobuf:"varint,7,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` @@ -132,38 +132,38 @@ func init() { } var fileDescriptor_7401ed9bed2f8e09 = []byte{ - // 484 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6b, 0xdb, 0x30, - 0x14, 0xc7, 0xed, 0x25, 0xcd, 0x32, 0x85, 0x96, 0x4d, 0x5b, 0x8b, 0x1b, 0x8a, 0x1d, 0x0c, 0x83, - 0xec, 0x30, 0x09, 0x77, 0x8c, 0x41, 0x0f, 0x63, 0xa4, 0x97, 0xed, 0x50, 0x18, 0xa6, 0x87, 0x31, - 0x06, 0xc5, 0x56, 0x35, 0x5b, 0x34, 0x96, 0x8c, 0xa4, 0x98, 0xf6, 0x1b, 0xec, 0xb8, 0x8f, 0xd0, - 0xd3, 0x3e, 0x4b, 0x8f, 0x3d, 0xee, 0x14, 0x46, 0x72, 0xd9, 0x39, 0x9f, 0x60, 0xd8, 0x52, 0x82, - 0x73, 0xd8, 0xd8, 0xc9, 0x7a, 0xef, 0xff, 0x7b, 0xfa, 0xf3, 0xf4, 0x9e, 0xc1, 0x73, 0x96, 0x12, - 0x9c, 0x94, 0xe5, 0x94, 0x91, 0x44, 0x33, 0xc1, 0x15, 0xd6, 0x32, 0xe1, 0xea, 0x2b, 0x95, 0xb8, - 0x8a, 0xb0, 0xbe, 0x46, 0xa5, 0x14, 0x5a, 0xc0, 0x23, 0x96, 0x12, 0xd4, 0xc6, 0xd0, 0x1a, 0x43, - 0x55, 0x34, 0x7c, 0x96, 0x89, 0x4c, 0x34, 0x20, 0xae, 0x4f, 0xa6, 0x66, 0xe8, 0x13, 0xa1, 0x0a, - 0xa1, 0x70, 0x9a, 0x28, 0x8a, 0xab, 0x28, 0xa5, 0x3a, 0x89, 0x30, 0x11, 0x8c, 0x5b, 0x3d, 0xa8, - 0xad, 0x89, 0x90, 0x14, 0x93, 0x29, 0xa3, 0x5c, 0xd7, 0x86, 0xe6, 0x64, 0x80, 0xf0, 0x47, 0x07, - 0x0c, 0xce, 0x54, 0x76, 0x6e, 0x9d, 0xe0, 0x1b, 0x30, 0x50, 0x62, 0x26, 0x09, 0xbd, 0x28, 0x85, - 0xd4, 0x9e, 0x3b, 0x72, 0xc7, 0x8f, 0x26, 0x07, 0xab, 0x79, 0x00, 0x6f, 0x92, 0x62, 0x7a, 0x12, - 0xb6, 0xc4, 0x30, 0x06, 0x26, 0xfa, 0x28, 0xa4, 0x86, 0xef, 0xc0, 0x9e, 0xd5, 0x48, 0x9e, 0x70, - 0x4e, 0xa7, 0xde, 0x83, 0xa6, 0xf6, 0x70, 0x35, 0x0f, 0xf6, 0xb7, 0x6a, 0xad, 0x1e, 0xc6, 0xbb, - 0x26, 0x71, 0x6a, 0x62, 0xf8, 0x1a, 0xec, 0x68, 0x71, 0x45, 0xb9, 0xd7, 0x19, 0xb9, 0xe3, 0xc1, - 0xf1, 0x21, 0x32, 0xbd, 0xa1, 0xba, 0x37, 0x64, 0x7b, 0x43, 0xa7, 0x82, 0xf1, 0x49, 0xf7, 0x6e, - 0x1e, 0x38, 0xb1, 0xa1, 0xe1, 0x01, 0xe8, 0x29, 0xca, 0x2f, 0xa9, 0xf4, 0xba, 0xb5, 0x61, 0x6c, - 0x23, 0x38, 0x04, 0x7d, 0x49, 0x09, 0x65, 0x15, 0x95, 0xde, 0x4e, 0xa3, 0x6c, 0x62,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+ // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x13, 0xd6, 0x95, 0xe2, 0x6a, 0x13, 0x18, 0x36, 0x65, 0xd5, 0x48, 0xaa, 0x48, 0x48, + 0xe5, 0x80, 0xad, 0x0c, 0x21, 0xa4, 0x1d, 0x10, 0xca, 0x2e, 0x70, 0x98, 0x84, 0xa2, 0x1d, 0x10, + 0x97, 0x91, 0x78, 0x26, 0xb1, 0xd6, 0xd8, 0x91, 0xed, 0x46, 0xdb, 0x37, 0xe0, 0xc8, 0x47, 0xd8, + 0x99, 0x4f, 0xb2, 0xe3, 0x8e, 0x9c, 0x2a, 0xd4, 0x5e, 0x38, 0xf7, 0x13, 0xa0, 0xc4, 0x6e, 0x69, + 0x0f, 0x20, 0x4e, 0xf1, 0x7b, 0xff, 0xdf, 0xf3, 0x5f, 0xcf, 0xef, 0x05, 0x3c, 0x63, 0x19, 0xc1, + 0x69, 0x55, 0x8d, 0x19, 0x49, 0x35, 0x13, 0x5c, 0x61, 0x2d, 0x53, 0xae, 0xbe, 0x50, 0x89, 0xeb, + 0x08, 0xeb, 0x2b, 0x54, 0x49, 0xa1, 0x05, 0x3c, 0x64, 0x19, 0x41, 0xeb, 0x18, 0x5a, 0x62, 0xa8, + 0x8e, 0x06, 0x4f, 0x72, 0x91, 0x8b, 0x16, 0xc4, 0xcd, 0xc9, 0xd4, 0x0c, 0x7c, 0x22, 0x54, 0x29, + 0x14, 0xce, 0x52, 0x45, 0x71, 0x1d, 0x65, 0x54, 0xa7, 0x11, 0x26, 0x82, 0x71, 0xab, 0x07, 0x8d, + 0x35, 0x11, 0x92, 0x62, 0x32, 0x66, 0x94, 0xeb, 0xc6, 0xd0, 0x9c, 0x0c, 0x10, 0x7e, 0xdf, 0x02, + 0xfd, 0x53, 0x95, 0x9f, 0x59, 0x27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xa6, 0x81, 0xb7, 0x79, 0xc9, + 0x0a, 0x09, 0x93, 0x87, 0x36, 0x77, 0xb6, 0x4c, 0x1d, 0xf7, 0xbe, 0xde, 0x04, 0xce, 0xaf, 0x9b, + 0xc0, 0x09, 0xf7, 0xc0, 0xe3, 0xb5, 0x59, 0x25, 0x54, 0x55, 0x82, 0x2b, 0x7a, 0x24, 0xc0, 0xd6, + 0xa9, 0xca, 0x61, 0x01, 0x7a, 0xab, 0x31, 0x3e, 0x47, 0xff, 0x5a, 0x26, 0xb4, 0x76, 0xcb, 0x20, + 0xfa, 0x6f, 0x74, 0x69, 0x18, 0x7f, 0xbc, 0x9d, 0xf9, 0xee, 0xdd, 0xcc, 0x77, 0x7f, 0xce, 0x7c, + 0xf7, 0xdb, 0xdc, 0x77, 0xee, 0xe6, 0xbe, 0xf3, 0x63, 0xee, 0x3b, 0x9f, 0xde, 0xe4, 0x4c, 0x17, + 0x93, 0x0c, 0x11, 0x51, 0x62, 0xbb, 0x9a, 0xe6, 0xf3, 0x42, 0x5d, 0x5c, 0xe2, 0x2b, 0xfc, 0xf7, + 0x3f, 0x41, 0x5f, 0x57, 0x54, 0x65, 0xdd, 0x76, 0x2b, 0x5f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, + 0x26, 0x76, 0x5b, 0xfa, 0x33, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -273,18 +273,16 @@ func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 if len(m.Receiver) > 0 { i -= len(m.Receiver) copy(dAtA[i:], m.Receiver) @@ -384,10 +382,8 @@ func (m *MsgTransfer) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovTx(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovTx(uint64(m.TimeoutTimestamp)) } @@ -628,9 +624,6 @@ func (m *MsgTransfer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types1.Height{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/02-client/abci_test.go b/x/ibc/core/02-client/abci_test.go index 83b58daa34e4..fe9016750f99 100644 --- a/x/ibc/core/02-client/abci_test.go +++ b/x/ibc/core/02-client/abci_test.go @@ -55,6 +55,6 @@ func (suite *ClientTestSuite) TestBeginBlocker() { localHostClient = suite.chainA.GetClientState(exported.Localhost) suite.Require().Equal(prevHeight.Increment(), localHostClient.GetLatestHeight()) - prevHeight = localHostClient.GetLatestHeight().(*types.Height) + prevHeight = localHostClient.GetLatestHeight().(types.Height) } } diff --git a/x/ibc/core/02-client/client/cli/query.go b/x/ibc/core/02-client/client/cli/query.go index 2c569136e04c..0140cb7850ef 100644 --- a/x/ibc/core/02-client/client/cli/query.go +++ b/x/ibc/core/02-client/client/cli/query.go @@ -159,7 +159,7 @@ If the '--latest' flag is included, the query returns the latest consensus state queryLatestHeight, _ := cmd.Flags().GetBool(flagLatestHeight) - var height *types.Height + var height types.Height if !queryLatestHeight { if len(args) != 2 { diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index 6abc736d37de..99ef941efe34 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -92,17 +92,12 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.H ) }() - anyHeight, err := types.PackHeight(consensusHeight) - if err != nil { - return err - } - // emitting events in the keeper emits for both begin block and handler client updates if err := ctx.EventManager().EmitTypedEvent( &types.EventUpdateClient{ ClientId: clientID, ClientType: clientState.ClientType(), - ConsensusHeight: anyHeight, + ConsensusHeight: consensusHeight.(types.Height), }, ); err != nil { return err @@ -145,17 +140,12 @@ func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient e ) }() - anyHeight, err := types.PackHeight(updatedClientState.GetLatestHeight()) - if err != nil { - return err - } - // emitting events in the keeper emits for client upgrades if err := ctx.EventManager().EmitTypedEvent( &types.EventUpgradeClient{ ClientId: clientID, ClientType: updatedClientState.ClientType(), - ConsensusHeight: anyHeight, + ConsensusHeight: updatedClientState.GetLatestHeight().(types.Height), }, ); err != nil { return err diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index 759da89d0dd6..c2f5c8144afd 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -57,7 +57,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { // Must create header creation functions since suite.header gets recreated on each test case createFutureUpdateFn := func(s *KeeperTestSuite) *ibctmtypes.Header { heightPlus3 := clienttypes.NewHeight(suite.header.GetHeight().GetVersionNumber(), suite.header.GetHeight().GetVersionHeight()+3) - height := suite.header.GetHeight().(*clienttypes.Height) + height := suite.header.GetHeight().(clienttypes.Height) return suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus3.VersionHeight), height, suite.header.Header.Time.Add(time.Hour), suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) @@ -230,7 +230,7 @@ func (suite *KeeperTestSuite) TestUpdateClientLocalhost() { clientState, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(ctx, exported.Localhost) suite.Require().True(found) - suite.Require().Equal(localhostClient.GetLatestHeight().(*types.Height).Increment(), clientState.GetLatestHeight()) + suite.Require().Equal(localhostClient.GetLatestHeight().(types.Height).Increment(), clientState.GetLatestHeight()) } func (suite *KeeperTestSuite) TestUpgradeClient() { diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index a0a76cac11f1..7ebfa335554c 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -170,7 +170,7 @@ func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) // and returns the expected consensus state at that height. // For now, can only retrieve self consensus states for the current version func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, bool) { - selfHeight, ok := height.(*types.Height) + selfHeight, ok := height.(types.Height) if !ok { return nil, false } diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index ad9c7777b50e..c031ac37c966 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -262,7 +262,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() { suite.ctx = suite.ctx.WithBlockHeight(10) cases := []struct { name string - height *types.Height + height types.Height expPass bool }{ {"zero height", types.ZeroHeight(), false}, @@ -299,7 +299,7 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) // mock update functionality - clientState.LatestHeight = header.GetHeight().(*types.Height) + clientState.LatestHeight = header.GetHeight().(types.Height) suite.keeper.SetClientConsensusState(suite.ctx, testClientID, header.GetHeight(), nextState) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) @@ -345,11 +345,11 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { expConsensusStates := types.ClientsConsensusStates{ types.NewClientConsensusStates(clientA, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight0.(*types.Height), expConsensus[0]), - types.NewConsensusStateWithHeight(expConsensusHeight1.(*types.Height), expConsensus[1]), + types.NewConsensusStateWithHeight(expConsensusHeight0.(types.Height), expConsensus[0]), + types.NewConsensusStateWithHeight(expConsensusHeight1.(types.Height), expConsensus[1]), }), types.NewClientConsensusStates(clientA2, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight2.(*types.Height), expConsensus2[0]), + types.NewConsensusStateWithHeight(expConsensusHeight2.(types.Height), expConsensus2[0]), }), }.Sort() diff --git a/x/ibc/core/02-client/keeper/proposal.go b/x/ibc/core/02-client/keeper/proposal.go index 15d2adfb4885..aeaba8815c43 100644 --- a/x/ibc/core/02-client/keeper/proposal.go +++ b/x/ibc/core/02-client/keeper/proposal.go @@ -49,17 +49,12 @@ func (k Keeper) ClientUpdateProposal(ctx sdk.Context, p *types.ClientUpdatePropo ) }() - anyHeight, err := types.PackHeight(header.GetHeight()) - if err != nil { - return err - } - // emitting events in the keeper for proposal updates to clients if err := ctx.EventManager().EmitTypedEvent( &types.EventUpgradeClient{ ClientId: p.ClientId, ClientType: clientState.ClientType(), - ConsensusHeight: anyHeight, + ConsensusHeight: header.GetHeight().(types.Height), }, ); err != nil { return err diff --git a/x/ibc/core/02-client/types/client.go b/x/ibc/core/02-client/types/client.go index 9f36f144cd6b..305b07cec471 100644 --- a/x/ibc/core/02-client/types/client.go +++ b/x/ibc/core/02-client/types/client.go @@ -59,7 +59,7 @@ func (ics IdentifiedClientStates) Sort() IdentifiedClientStates { } // NewConsensusStateWithHeight creates a new ConsensusStateWithHeight instance -func NewConsensusStateWithHeight(height *Height, consensusState exported.ConsensusState) ConsensusStateWithHeight { +func NewConsensusStateWithHeight(height Height, consensusState exported.ConsensusState) ConsensusStateWithHeight { msg, ok := consensusState.(proto.Message) if !ok { panic(fmt.Errorf("cannot proto marshal %T", consensusState)) diff --git a/x/ibc/core/02-client/types/client.pb.go b/x/ibc/core/02-client/types/client.pb.go index 51b86c0cba6d..95fc58c339e0 100644 --- a/x/ibc/core/02-client/types/client.pb.go +++ b/x/ibc/core/02-client/types/client.pb.go @@ -83,7 +83,7 @@ func (m *IdentifiedClientState) GetClientState() *types.Any { // ConsensusStateWithHeight defines a consensus state with an additional height field. type ConsensusStateWithHeight struct { // consensus state height - Height *Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` + Height Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` // consensus state ConsensusState *types.Any `protobuf:"bytes,2,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml"consensus_state"` } @@ -121,11 +121,11 @@ func (m *ConsensusStateWithHeight) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusStateWithHeight proto.InternalMessageInfo -func (m *ConsensusStateWithHeight) GetHeight() *Height { +func (m *ConsensusStateWithHeight) GetHeight() Height { if m != nil { return m.Height } - return nil + return Height{} } func (m *ConsensusStateWithHeight) GetConsensusState() *types.Any { @@ -344,43 +344,44 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 574 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xcf, 0xb5, 0x25, 0x6a, 0x2e, 0x90, 0x54, 0x26, 0xa1, 0x6e, 0x06, 0x3b, 0xba, 0x29, 0x43, - 0x6b, 0x93, 0x30, 0x20, 0x65, 0x82, 0x64, 0xa1, 0x03, 0x28, 0x18, 0x21, 0x10, 0x4b, 0xe4, 0x3f, - 0x57, 0xe7, 0x84, 0xe3, 0x8b, 0x7c, 0x97, 0xd0, 0x7c, 0x03, 0x46, 0x26, 0xc4, 0xc0, 0xc0, 0xc8, - 0x17, 0xe0, 0x1b, 0x30, 0x74, 0xec, 0xc8, 0x64, 0xa1, 0xe4, 0x1b, 0xe4, 0x13,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 0xf9, 0x26, 0x82, 0xba, 0x61, 0x3b, 0xdb, 0x10, - 0x64, 0x7d, 0x8d, 0x20, 0x39, 0x74, 0xf7, 0x33, 0x52, 0x5f, 0x32, 0x62, 0xcf, 0x61, 0x71, 0xe0, - 0x26, 0xee, 0x98, 0x69, 0x7d, 0x58, 0x75, 0xa3, 0x88, 0x7e, 0xc0, 0xc1, 0x50, 0x4a, 0x65, 0x3a, - 0x68, 0xee, 0xb6, 0x4a, 0xbd, 0xc6, 0x2a, 0x35, 0x1f, 0x48, 0xd8, 0x8d, 0x06, 0xe4, 0x54, 0x54, - 0x46, 0xee, 0x84, 0xf5, 0x5e, 0x5e, 0x2c, 0x0c, 0x70, 0xb9, 0x30, 0xc0, 0xef, 0x85, 0x01, 0x3e, - 0x2d, 0x8d, 0xc2, 0xe5, 0xd2, 0x28, 0xfc, 0x5a, 0x1a, 0x85, 0x77, 0x8f, 0x43, 0xc2, 0x47, 0x53, - 0xcf, 0xf2, 0xe9, 0xd8, 0xf6, 0x29, 0x1b, 0x53, 0xa6, 0x3e, 0x27, 0x2c, 0x78, 0x6f, 0x9f, 0xdb, - 0xd7, 0xef, 0xc9, 0xc3, 0xce, 0x89, 0x7a, 0x52, 0xf8, 0x7c, 0x82, 0x99, 0x57, 0x14, 0xb6, 0x3e, - 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0x76, 0xe1, 0x64, 0xaa, 0x72, 0x04, 0x00, 0x00, + // 579 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbd, 0x8e, 0xd3, 0x4c, + 0x14, 0xcd, 0x6c, 0xf2, 0x45, 0x9b, 0xc9, 0x47, 0xb2, 0x32, 0x09, 0xeb, 0x4d, 0x61, 0x47, 0x53, + 0xa5, 0xd8, 0xb5, 0x49, 0x28, 0x40, 0xa9, 0xc0, 0x69, 0xd8, 0x02, 0x14, 0x8c, 0x10, 0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 0x5f, 0xf5, 0x02, 0xfa, 0x04, 0x60, 0x59, + 0xde, 0x8e, 0xc7, 0xb0, 0x36, 0xc7, 0x31, 0x23, 0x34, 0x1a, 0x45, 0xb3, 0x89, 0x8b, 0xe3, 0x8c, + 0x72, 0x69, 0xb3, 0xcc, 0x3e, 0xca, 0xd7, 0x91, 0x7d, 0x47, 0x26, 0x9e, 0x67, 0xe7, 0x9b, 0x08, + 0xf2, 0x9e, 0xed, 0xed, 0x42, 0x10, 0xf5, 0x0d, 0x82, 0xe0, 0xd0, 0xdf, 0x4f, 0x49, 0x7d, 0x4e, + 0x89, 0x3d, 0x83, 0xe5, 0xa1, 0x13, 0x3b, 0x13, 0xa6, 0x0c, 0x60, 0xdd, 0x09, 0x43, 0xfa, 0x1e, + 0xfb, 0x23, 0x21, 0x95, 0xa9, 0xa0, 0x5d, 0xec, 0x54, 0xac, 0xd6, 0x3a, 0xd1, 0xef, 0x09, 0xd8, + 0xad, 0x06, 0x64, 0xd7, 0x64, 0x46, 0xec, 0x84, 0x59, 0x2f, 0x2e, 0x96, 0x1a, 0xb8, 0x5c, 0x6a, + 0xe0, 0xd7, 0x52, 0x03, 0x1f, 0x57, 0x5a, 0xe1, 0x72, 0xa5, 0x15, 0x7e, 0xae, 0xb4, 0xc2, 0xdb, + 0x87, 0x01, 0xe1, 0xe3, 0x99, 0x6b, 0x78, 0x74, 0x62, 0x7a, 0x94, 0x4d, 0x28, 0x93, 0x9f, 0x13, + 0xe6, 0xbf, 0x33, 0xcf, 0xcd, 0xeb, 0x57, 0xe5, 0x7e, 0xef, 0x44, 0x3e, 0x2c, 0x7c, 0x31, 0xc5, + 0xcc, 0x2d, 0x67, 0xb6, 0x3e, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x91, 0xd2, 0x2f, 0x3f, 0x78, + 0x04, 0x00, 0x00, } func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) { @@ -457,18 +458,16 @@ func (m *ConsensusStateWithHeight) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x12 } - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintClient(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -671,10 +670,8 @@ func (m *ConsensusStateWithHeight) Size() (n int) { } var l int _ = l - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovClient(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovClient(uint64(l)) if m.ConsensusState != nil { l = m.ConsensusState.Size() n += 1 + l + sovClient(uint64(l)) @@ -941,9 +938,6 @@ func (m *ConsensusStateWithHeight) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/02-client/types/client_test.go b/x/ibc/core/02-client/types/client_test.go index d1e3ffb8ddc4..409ab53050aa 100644 --- a/x/ibc/core/02-client/types/client_test.go +++ b/x/ibc/core/02-client/types/client_test.go @@ -28,7 +28,7 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { consensusState, ok := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(ok) - cswh = types.NewConsensusStateWithHeight(clientState.GetLatestHeight().(*types.Height), consensusState) + cswh = types.NewConsensusStateWithHeight(clientState.GetLatestHeight().(types.Height), consensusState) }, }, } diff --git a/x/ibc/core/02-client/types/codec.go b/x/ibc/core/02-client/types/codec.go index 7653f0d4855d..64b2a3a4f13e 100644 --- a/x/ibc/core/02-client/types/codec.go +++ b/x/ibc/core/02-client/types/codec.go @@ -180,35 +180,3 @@ func UnpackMisbehaviour(any *codectypes.Any) (exported.Misbehaviour, error) { return misbehaviour, nil } - -// PackHeight constructs a new Any packed with the given height value. It returns -// an error if the height can't be casted to a protobuf message or if the concrete -// implemention is not registered to the protobuf codec. -func PackHeight(height exported.Height) (*codectypes.Any, error) { - msg, ok := height.(proto.Message) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", height) - } - - anyHeight, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) - } - - return anyHeight, nil -} - -// UnpackHeight unpacks an Any into a Height. It returns an error if the -// consensus state can't be unpacked into a Height. -func UnpackHeight(any *codectypes.Any) (exported.Height, error) { - if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") - } - - height, ok := any.GetCachedValue().(exported.Height) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into Height %T", any) - } - - return height, nil -} diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index 71663be5f7cc..75cfc97eb08f 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -208,50 +208,3 @@ func (suite *TypesTestSuite) TestPackMisbehaviour() { } } } - -func (suite *TypesTestSuite) TestPackHeight() { - testCases := []struct { - name string - height exported.Height - expPass bool - }{ - { - "solo machine height", - ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).GetHeight(), - true, - }, - { - "tendermint height", - suite.chainA.LastHeader.GetHeight(), - true, - }, - { - "nil", - nil, - false, - }, - } - - testCasesAny := []caseAny{} - - for _, tc := range testCases { - clientAny, err := types.PackHeight(tc.height) - if tc.expPass { - suite.Require().NoError(err, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - - testCasesAny = append(testCasesAny, caseAny{tc.name, clientAny, tc.expPass}) - } - - for i, tc := range testCasesAny { - cs, err := types.UnpackHeight(tc.any) - if tc.expPass { - suite.Require().NoError(err, tc.name) - suite.Require().Equal(testCases[i].height, cs, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - } -} diff --git a/x/ibc/core/02-client/types/event.pb.go b/x/ibc/core/02-client/types/event.pb.go index 5a4ffecd20c2..da51540490ff 100644 --- a/x/ibc/core/02-client/types/event.pb.go +++ b/x/ibc/core/02-client/types/event.pb.go @@ -5,9 +5,8 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -26,9 +25,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventCreateClient is a typed event emitted on creating client type EventCreateClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` - ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } func (m *EventCreateClient) Reset() { *m = EventCreateClient{} } @@ -78,18 +77,18 @@ func (m *EventCreateClient) GetClientType() string { return "" } -func (m *EventCreateClient) GetConsensusHeight() *types.Any { +func (m *EventCreateClient) GetConsensusHeight() Height { if m != nil { return m.ConsensusHeight } - return nil + return Height{} } // EventUpdateClient is a typed event emitted on updating client type EventUpdateClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` - ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } func (m *EventUpdateClient) Reset() { *m = EventUpdateClient{} } @@ -139,18 +138,18 @@ func (m *EventUpdateClient) GetClientType() string { return "" } -func (m *EventUpdateClient) GetConsensusHeight() *types.Any { +func (m *EventUpdateClient) GetConsensusHeight() Height { if m != nil { return m.ConsensusHeight } - return nil + return Height{} } // EventUpgradeClient is a typed event emitted on upgrading client type EventUpgradeClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` - ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } func (m *EventUpgradeClient) Reset() { *m = EventUpgradeClient{} } @@ -200,18 +199,18 @@ func (m *EventUpgradeClient) GetClientType() string { return "" } -func (m *EventUpgradeClient) GetConsensusHeight() *types.Any { +func (m *EventUpgradeClient) GetConsensusHeight() Height { if m != nil { return m.ConsensusHeight } - return nil + return Height{} } // EventUpdateClientProposal is a typed event emitted on updating client proposal type EventUpdateClientProposal struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` - ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } func (m *EventUpdateClientProposal) Reset() { *m = EventUpdateClientProposal{} } @@ -261,18 +260,18 @@ func (m *EventUpdateClientProposal) GetClientType() string { return "" } -func (m *EventUpdateClientProposal) GetConsensusHeight() *types.Any { +func (m *EventUpdateClientProposal) GetConsensusHeight() Height { if m != nil { return m.ConsensusHeight } - return nil + return Height{} } // EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted type EventClientMisbehaviour struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` - ConsensusHeight *types.Any `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } func (m *EventClientMisbehaviour) Reset() { *m = EventClientMisbehaviour{} } @@ -322,11 +321,11 @@ func (m *EventClientMisbehaviour) GetClientType() string { return "" } -func (m *EventClientMisbehaviour) GetConsensusHeight() *types.Any { +func (m *EventClientMisbehaviour) GetConsensusHeight() Height { if m != nil { return m.ConsensusHeight } - return nil + return Height{} } func init() { @@ -341,28 +340,28 @@ func init() { proto.RegisterFile("ibc/core/client/v1/event.proto", fileDescripto var fileDescriptor_184b5eb6564931c0 = []byte{ // 346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0x41, 0x4a, 0x03, 0x31, - 0x14, 0x86, 0x1b, 0x85, 0x62, 0xd3, 0x85, 0x3a, 0x08, 0xb6, 0x15, 0x62, 0x71, 0xd5, 0x4d, 0x13, - 0x5b, 0x17, 0xae, 0x6d, 0x11, 0x14, 0x11, 0xb4, 0xe8, 0xc6, 0x4d, 0x99, 0xc9, 0xc4, 0x99, 0x60, - 0x3b, 0x6f, 0x98, 0x64, 0x06, 0xe7, 0x16, 0x9e, 0x40, 0x37, 0xe2, 0x09, 0x3c, 0x84, 0xb8, 0xea, - 0xd2, 0xa5, 0xb4, 0x17, 0x91, 0x26, 0x63, 0x5d, 0x78, 0x81, 0x59, 0x85, 0xf7, 0xfe, 0x97, 0xff, - 0x7d, 0x84, 0xfc, 0x98, 0x48, 0x8f, 0x33, 0x0e, 0x89, 0x60, 0x7c, 0x22, 0x45, 0xa4, 0x59, 0xd6, - 0x63, 0x22, 0x13, 0x91, 0xa6, 0x71, 0x02, 0x1a, 0x1c, 0x47, 0x7a, 0x9c, 0x2e, 0x75, 0x6a, 0x75, - 0x9a, 0xf5, 0x5a, 0xcd, 0x00, 0x20, 0x98, 0x08, 0x66, 0x26, 0xbc, 0xf4, 0x9e, 0xb9, 0x51, 0x6e, - 0xc7, 0x5b, 0x4d, 0x0e, 0x6a, 0x0a, 0x6a, 0x6c, 0x2a, 0x66, 0x0b, 0x2b, 0x1d, 0x3c, 0x23, 0xbc, - 0x7d, 0xba, 0x74, 0x1e, 0x26, 0xc2, 0xd5, 0x62, 0x68, 0xec, 0x9c, 0x3d, 0x5c, 0xb3,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74, 0x4f, 0x5e, 0xbc, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0xdd, 0x04, 0xa5, 0x20, + 0x7e, 0xb8, 0x10, 0x44, 0x07, 0xc2, 0xed, 0xa1, 0x05, 0x29, 0x43, 0xcd, 0xed, 0xbb, 0x18, 0xb9, + 0x84, 0xa0, 0x6e, 0x4f, 0x2f, 0x4a, 0x4c, 0x19, 0x5a, 0x8e, 0x3f, 0xc8, 0xc8, 0x25, 0x89, 0x11, + 0xf0, 0x01, 0x45, 0xf9, 0x05, 0xf9, 0xc5, 0x89, 0x39, 0x43, 0xc4, 0x0f, 0xfb, 0x19, 0xb9, 0xc4, + 0x21, 0x09, 0x1f, 0x6c, 0x96, 0x6f, 0x66, 0x71, 0x52, 0x6a, 0x46, 0x62, 0x59, 0x66, 0x7e, 0x69, + 0xd1, 0xd0, 0xf0, 0x81, 0x53, 0xe0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, + 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, + 0x99, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0xe7, 0x17, 0xe7, + 0xe6, 0x17, 0x43, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0x7d, 0x78, 0xa1, 0x60, 0x60, 0xa4, + 0x0b, 0x2d, 0x17, 0x40, 0x7e, 0x29, 0x4e, 0x62, 0x03, 0x17, 0x0a, 0xc6, 0x80, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x56, 0x7e, 0xbe, 0x9f, 0x81, 0x04, 0x00, 0x00, } func (m *EventCreateClient) Marshal() (dAtA []byte, err error) { @@ -385,18 +384,16 @@ func (m *EventCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) @@ -434,18 +431,16 @@ func (m *EventUpdateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) @@ -483,18 +478,16 @@ func (m *EventUpgradeClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) @@ -532,18 +525,16 @@ func (m *EventUpdateClientProposal) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) @@ -581,18 +572,16 @@ func (m *EventClientMisbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) @@ -635,10 +624,8 @@ func (m *EventCreateClient) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) return n } @@ -656,10 +643,8 @@ func (m *EventUpdateClient) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) return n } @@ -677,10 +662,8 @@ func (m *EventUpgradeClient) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) return n } @@ -698,10 +681,8 @@ func (m *EventUpdateClientProposal) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) return n } @@ -719,10 +700,8 @@ func (m *EventClientMisbehaviour) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovEvent(uint64(l)) return n } @@ -854,9 +833,6 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types.Any{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1007,9 +983,6 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types.Any{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1160,9 +1133,6 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types.Any{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1313,9 +1283,6 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types.Any{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1466,9 +1433,6 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types.Any{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 4c8a6078eedb..d6caca0e68a0 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -80,7 +80,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(*types.Height), + header.GetHeight().(types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), @@ -109,7 +109,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(*types.Height), + header.GetHeight().(types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), @@ -240,7 +240,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(*types.Height), + header.GetHeight().(types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), @@ -269,7 +269,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(*types.Height), + header.GetHeight().(types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), @@ -298,7 +298,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, []types.ConsensusStateWithHeight{ types.NewConsensusStateWithHeight( - header.GetHeight().(*types.Height), + header.GetHeight().(types.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, ), diff --git a/x/ibc/core/02-client/types/height.go b/x/ibc/core/02-client/types/height.go index b4410d89dc98..ab156e80de7c 100644 --- a/x/ibc/core/02-client/types/height.go +++ b/x/ibc/core/02-client/types/height.go @@ -20,25 +20,25 @@ var _ exported.Height = (*Height)(nil) var IsVersionFormat = regexp.MustCompile(`^.+[^-]-{1}[1-9][0-9]*$`).MatchString // ZeroHeight is a helper function which returns an uninitialized height. -func ZeroHeight() *Height { - return &Height{} +func ZeroHeight() Height { + return Height{} } // NewHeight is a constructor for the IBC height type -func NewHeight(versionNumber, versionHeight uint64) *Height { - return &Height{ +func NewHeight(versionNumber, versionHeight uint64) Height { + return Height{ VersionNumber: versionNumber, VersionHeight: versionHeight, } } // GetVersionNumber returns the version-number of the height -func (h *Height) GetVersionNumber() uint64 { +func (h Height) GetVersionNumber() uint64 { return h.VersionNumber } // GetVersionHeight returns the version-height of the height -func (h *Height) GetVersionHeight() uint64 { +func (h Height) GetVersionHeight() uint64 { return h.VersionHeight } @@ -50,8 +50,8 @@ func (h *Height) GetVersionHeight() uint64 { // // It first compares based on version numbers, whichever has the higher version number is the higher height // If version number is the same, then the version height is compared -func (h *Height) Compare(other exported.Height) int64 { - height, ok := other.(*Height) +func (h Height) Compare(other exported.Height) int64 { + height, ok := other.(Height) if !ok { panic(fmt.Sprintf("cannot compare against invalid height type: %T. expected height type: %T", other, h)) } @@ -67,29 +67,29 @@ func (h *Height) Compare(other exported.Height) int64 { } // LT Helper comparison function returns true if h < other -func (h *Height) LT(other exported.Height) bool { +func (h Height) LT(other exported.Height) bool { return h.Compare(other) == -1 } // LTE Helper comparison function returns true if h <= other -func (h *Height) LTE(other exported.Height) bool { +func (h Height) LTE(other exported.Height) bool { cmp := h.Compare(other) return cmp <= 0 } // GT Helper comparison function returns true if h > other -func (h *Height) GT(other exported.Height) bool { +func (h Height) GT(other exported.Height) bool { return h.Compare(other) == 1 } // GTE Helper comparison function returns true if h >= other -func (h *Height) GTE(other exported.Height) bool { +func (h Height) GTE(other exported.Height) bool { cmp := h.Compare(other) return cmp >= 0 } // EQ Helper comparison function returns true if h == other -func (h *Height) EQ(other exported.Height) bool { +func (h Height) EQ(other exported.Height) bool { return h.Compare(other) == 0 } @@ -100,27 +100,27 @@ func (h Height) String() string { // Decrement will return a new height with the VersionHeight decremented // If the VersionHeight is already at lowest value (1), then false success flag is returend -func (h *Height) Decrement() (decremented exported.Height, success bool) { +func (h Height) Decrement() (decremented exported.Height, success bool) { if h.VersionHeight == 0 { - return &Height{}, false + return Height{}, false } return NewHeight(h.VersionNumber, h.VersionHeight-1), true } // Increment will return a height with the same version number but an // incremented version height -func (h *Height) Increment() *Height { +func (h Height) Increment() Height { return NewHeight(h.VersionNumber, h.VersionHeight+1) } // IsZero returns true if height version and version-height are both 0 -func (h *Height) IsZero() bool { +func (h Height) IsZero() bool { return h.VersionNumber == 0 && h.VersionHeight == 0 } // MustParseHeight will attempt to parse a string representation of a height and panic if // parsing fails. -func MustParseHeight(heightStr string) *Height { +func MustParseHeight(heightStr string) Height { height, err := ParseHeight(heightStr) if err != nil { panic(err) @@ -131,18 +131,18 @@ func MustParseHeight(heightStr string) *Height { // ParseHeight is a utility function that takes a string representation of the height // and returns a Height struct -func ParseHeight(heightStr string) (*Height, error) { +func ParseHeight(heightStr string) (Height, error) { splitStr := strings.Split(heightStr, "-") if len(splitStr) != 2 { - return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr) } versionNumber, err := strconv.ParseUint(splitStr[0], 10, 64) if err != nil { - return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err) } versionHeight, err := strconv.ParseUint(splitStr[1], 10, 64) if err != nil { - return &Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err) } return NewHeight(versionNumber, versionHeight), nil } @@ -182,7 +182,7 @@ func ParseChainID(chainID string) uint64 { // GetSelfHeight is a utility function that returns self height given context // Version number is retrieved from ctx.ChainID() -func GetSelfHeight(ctx sdk.Context) *Height { +func GetSelfHeight(ctx sdk.Context) Height { version := ParseChainID(ctx.ChainID()) return NewHeight(version, uint64(ctx.BlockHeight())) } diff --git a/x/ibc/core/02-client/types/height_test.go b/x/ibc/core/02-client/types/height_test.go index 740b354c21b3..0bd8f0848fc8 100644 --- a/x/ibc/core/02-client/types/height_test.go +++ b/x/ibc/core/02-client/types/height_test.go @@ -10,14 +10,14 @@ import ( ) func TestZeroHeight(t *testing.T) { - require.Equal(t, &types.Height{}, types.ZeroHeight()) + require.Equal(t, types.Height{}, types.ZeroHeight()) } func TestCompareHeights(t *testing.T) { testCases := []struct { name string - height1 *types.Height - height2 *types.Height + height1 types.Height + height2 types.Height compareSign int64 }{ {"version number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1}, diff --git a/x/ibc/core/02-client/types/msgs.go b/x/ibc/core/02-client/types/msgs.go index dbee0462923d..04b351eb266e 100644 --- a/x/ibc/core/02-client/types/msgs.go +++ b/x/ibc/core/02-client/types/msgs.go @@ -188,7 +188,7 @@ func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, upgr return nil, err } - height, ok := upgradeHeight.(*Height) + height, ok := upgradeHeight.(Height) if !ok { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected: %T, got: %T", &Height{}, upgradeHeight) } @@ -197,7 +197,7 @@ func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, upgr ClientId: clientID, ClientState: anyClient, ProofUpgrade: proofUpgrade, - UpgradeHeight: height, + UpgradeHeight: &height, Signer: signer.String(), }, nil } diff --git a/x/ibc/core/02-client/types/query.go b/x/ibc/core/02-client/types/query.go index 8f531827451b..3f898dadb4b0 100644 --- a/x/ibc/core/02-client/types/query.go +++ b/x/ibc/core/02-client/types/query.go @@ -6,7 +6,7 @@ import ( // NewQueryClientStateResponse creates a new QueryClientStateResponse instance. func NewQueryClientStateResponse( - clientStateAny *codectypes.Any, proof []byte, height *Height, + clientStateAny *codectypes.Any, proof []byte, height Height, ) *QueryClientStateResponse { return &QueryClientStateResponse{ ClientState: clientStateAny, @@ -17,7 +17,7 @@ func NewQueryClientStateResponse( // NewQueryConsensusStateResponse creates a new QueryConsensusStateResponse instance. func NewQueryConsensusStateResponse( - consensusStateAny *codectypes.Any, proof []byte, height *Height, + consensusStateAny *codectypes.Any, proof []byte, height Height, ) *QueryConsensusStateResponse { return &QueryConsensusStateResponse{ ConsensusState: consensusStateAny, diff --git a/x/ibc/core/02-client/types/query.pb.go b/x/ibc/core/02-client/types/query.pb.go index 0baf19bf29fc..755d401802a2 100644 --- a/x/ibc/core/02-client/types/query.pb.go +++ b/x/ibc/core/02-client/types/query.pb.go @@ -87,7 +87,7 @@ type QueryClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryClientStateResponse) Reset() { *m = QueryClientStateResponse{} } @@ -137,11 +137,11 @@ func (m *QueryClientStateResponse) GetProof() []byte { return nil } -func (m *QueryClientStateResponse) GetProofHeight() *Height { +func (m *QueryClientStateResponse) GetProofHeight() Height { if m != nil { return m.ProofHeight } - return nil + return Height{} } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -331,7 +331,7 @@ type QueryConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConsensusStateResponse) Reset() { *m = QueryConsensusStateResponse{} } @@ -381,11 +381,11 @@ func (m *QueryConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConsensusStateResponse) GetProofHeight() *Height { +func (m *QueryConsensusStateResponse) GetProofHeight() Height { if m != nil { return m.ProofHeight } - return nil + return Height{} } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates @@ -599,59 +599,59 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 824 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0xcf, 0xf0, 0x4f, 0x30, 0x09, 0xb0, 0x1a, 0xa1, 0xdd, 0x60, 0x90, 0x89, 0xbc, 0x5a, 0x36, - 0xbb, 0x0b, 0x33, 0x24, 0xdb, 0x16, 0xa9, 0x12, 0x87, 0x52, 0x89, 0x96, 0x4b, 0x0b, 0xee, 0xa1, - 0x52, 0xa5, 0x0a, 0xd9, 0xce, 0xc4, 0xb1, 0x4a, 0x3c, 0x21, 0xe3, 0x44, 0x45, 0x88, 0x0b, 0x5f, - 0xa0, 0x95, 0x7a, 0xec, 0xb5, 0x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1d, 0xec, 0xb6, 0x28, 0xb7, 0x47, 0xc4, 0xee, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xb2, 0xfa, 0xa1, 0x37, 0xe2, 0x09, 0x00, 0x00, + // 823 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x4f, 0xdb, 0x48, + 0x18, 0xce, 0xf0, 0x25, 0x98, 0x04, 0x58, 0x8d, 0xd0, 0x6e, 0x30, 0xc8, 0x44, 0x5e, 0x2d, 0x9b, + 0xdd, 0x85, 0x19, 0x92, 0xdd, 0x2d, 0x52, 0x25, 0x0e, 0x05, 0x89, 0x96, 0x4b, 0x0b, 0xee, 0xa1, + 0x52, 0xa5, 0x0a, 0xd9, 0xce, 0xc4, 0xb1, 0x4a, 0x3c, 0x21, 0xe3, 0x44, 0x45, 0x88, 0x0b, 0x7f, + 0xa0, 0x95, 0x7a, 0xec, 0xb5, 0xa7, 0xaa, 0xea, 0xa5, 0x87, 0xfe, 0x83, 0x8a, 0x23, 0x52, 0x7b, + 0xe8, 0xa9, 0x1f, 0xd0, 0x1f, 0xd1, 0x63, 0xe5, 0x99, 0x31, 0xb1, 0x89, 0x11, 0x16, 0x6a, 0x4f, + 0xb1, 0xdf, 0xaf, 0x79, 0x9e, 0xe7, 0x7d, 0xdf, 0x71, 0xa0, 0xee, 0xd9, 0x0e, 0x71, 0x58, 0x9b, + 0x12, 0x67, 0xc7, 0xa3, 0x7e, 0x40, 0xba, 0x15, 0xb2, 0xdb, 0xa1, 0xed, 0x3d, 0xdc, 0x6a, 0xb3, + 0x80, 0x21, 0xe4, 0xd9, 0x0e, 0x0e, 0xfd, 0x58, 0xfa, 0x71, 0xb7, 0xa2, 0xfd, 0xed, 0x30, 0xde, + 0x64, 0x9c, 0xd8, 0x16, 0xa7, 0x32, 0x98, 0x74, 0x2b, 0x36, 0x0d, 0xac,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 0x82, 0x3e, 0xeb, 0xc3, 0x52, 0xf6, 0x04, 0x45, 0x73, 0x45, 0xd0, 0x5c, 0x46, 0xff, 0x5f, + 0x89, 0x26, 0x7a, 0x7c, 0x36, 0x37, 0x72, 0x03, 0x2e, 0x9d, 0x9b, 0xc4, 0xe2, 0x5d, 0x3a, 0x37, + 0xc9, 0x55, 0x34, 0x0c, 0x01, 0x76, 0x16, 0x69, 0x12, 0x6c, 0x12, 0xa7, 0x5c, 0xbd, 0xd5, 0xad, + 0xa3, 0x13, 0x1d, 0x1c, 0x9f, 0xe8, 0xe0, 0xf3, 0x89, 0x0e, 0x9e, 0x9c, 0xea, 0xb9, 0xe3, 0x53, + 0x3d, 0xf7, 0xe1, 0x54, 0xcf, 0xdd, 0x5f, 0x76, 0xbd, 0xa0, 0xd1, 0xb1, 0xb1, 0xc3, 0x9a, 0x44, + 0xfd, 0x07, 0x93, 0x3f, 0x8b, 0xbc, 0xf6, 0x90, 0x3c, 0xea, 0x09, 0xb0, 0x54, 0x5d, 0x54, 0xb5, + 0x83, 0xbd, 0x16, 0xe5, 0xf6, 0x88, 0xf8, 0x02, 0xfc, 0xfb, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xca, + 0xdc, 0xd5, 0x38, 0xee, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -942,18 +942,16 @@ func (m *QueryClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1130,18 +1128,16 @@ func (m *QueryConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1351,10 +1347,8 @@ func (m *QueryClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1426,10 +1420,8 @@ func (m *QueryConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1710,9 +1702,6 @@ func (m *QueryClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2224,9 +2213,6 @@ func (m *QueryConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/03-connection/client/utils/utils.go b/x/ibc/core/03-connection/client/utils/utils.go index dcefef4bc885..44283aef8282 100644 --- a/x/ibc/core/03-connection/client/utils/utils.go +++ b/x/ibc/core/03-connection/client/utils/utils.go @@ -138,7 +138,7 @@ func QueryConnectionClientState( // prove is true, it performs an ABCI store query in order to retrieve the // merkle proof. Otherwise, it uses the gRPC query client. func QueryConnectionConsensusState( - clientCtx client.Context, connectionID string, height *clienttypes.Height, prove bool, + clientCtx client.Context, connectionID string, height clienttypes.Height, prove bool, ) (*types.QueryConnectionConsensusStateResponse, error) { queryClient := types.NewQueryClient(clientCtx) diff --git a/x/ibc/core/03-connection/types/msgs.go b/x/ibc/core/03-connection/types/msgs.go index fb39e621dc23..a162fb589b10 100644 --- a/x/ibc/core/03-connection/types/msgs.go +++ b/x/ibc/core/03-connection/types/msgs.go @@ -84,7 +84,7 @@ func NewMsgConnectionOpenTry( counterpartyClientID string, counterpartyClient exported.ClientState, counterpartyPrefix commitmenttypes.MerklePrefix, counterpartyVersions []*Version, proofInit, proofClient, proofConsensus []byte, - proofHeight, consensusHeight *clienttypes.Height, signer sdk.AccAddress, + proofHeight, consensusHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgConnectionOpenTry { counterparty := NewCounterparty(counterpartyClientID, counterpartyConnectionID, counterpartyPrefix) csAny, _ := clienttypes.PackClientState(counterpartyClient) @@ -198,7 +198,7 @@ var _ sdk.Msg = &MsgConnectionOpenAck{} func NewMsgConnectionOpenAck( connectionID, counterpartyConnectionID string, counterpartyClient exported.ClientState, proofTry, proofClient, proofConsensus []byte, - proofHeight, consensusHeight *clienttypes.Height, + proofHeight, consensusHeight clienttypes.Height, version *Version, signer sdk.AccAddress, ) *MsgConnectionOpenAck { @@ -295,7 +295,7 @@ var _ sdk.Msg = &MsgConnectionOpenConfirm{} // NewMsgConnectionOpenConfirm creates a new MsgConnectionOpenConfirm instance //nolint:interfacer func NewMsgConnectionOpenConfirm( - connectionID string, proofAck []byte, proofHeight *clienttypes.Height, + connectionID string, proofAck []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgConnectionOpenConfirm { return &MsgConnectionOpenConfirm{ diff --git a/x/ibc/core/03-connection/types/query.go b/x/ibc/core/03-connection/types/query.go index ce2ce02dceb8..09058e6e8e81 100644 --- a/x/ibc/core/03-connection/types/query.go +++ b/x/ibc/core/03-connection/types/query.go @@ -8,7 +8,7 @@ import ( // NewQueryConnectionResponse creates a new QueryConnectionResponse instance func NewQueryConnectionResponse( - connection ConnectionEnd, proof []byte, height *clienttypes.Height, + connection ConnectionEnd, proof []byte, height clienttypes.Height, ) *QueryConnectionResponse { return &QueryConnectionResponse{ Connection: &connection, @@ -19,7 +19,7 @@ func NewQueryConnectionResponse( // NewQueryClientConnectionsResponse creates a new ConnectionPaths instance func NewQueryClientConnectionsResponse( - connectionPaths []string, proof []byte, height *clienttypes.Height, + connectionPaths []string, proof []byte, height clienttypes.Height, ) *QueryClientConnectionsResponse { return &QueryClientConnectionsResponse{ ConnectionPaths: connectionPaths, @@ -36,7 +36,7 @@ func NewQueryClientConnectionsRequest(clientID string) *QueryClientConnectionsRe } // NewQueryConnectionClientStateResponse creates a newQueryConnectionClientStateResponse instance -func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height *clienttypes.Height) *QueryConnectionClientStateResponse { +func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryConnectionClientStateResponse { return &QueryConnectionClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, @@ -45,7 +45,7 @@ func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.Ide } // NewQueryConnectionConsensusStateResponse creates a newQueryConnectionConsensusStateResponse instance -func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height *clienttypes.Height) *QueryConnectionConsensusStateResponse { +func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryConnectionConsensusStateResponse { return &QueryConnectionConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, diff --git a/x/ibc/core/03-connection/types/query.pb.go b/x/ibc/core/03-connection/types/query.pb.go index d142e6bafeef..5c3a2bcb2627 100644 --- a/x/ibc/core/03-connection/types/query.pb.go +++ b/x/ibc/core/03-connection/types/query.pb.go @@ -88,7 +88,7 @@ type QueryConnectionResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionResponse) Reset() { *m = QueryConnectionResponse{} } @@ -138,11 +138,11 @@ func (m *QueryConnectionResponse) GetProof() []byte { return nil } -func (m *QueryConnectionResponse) GetProofHeight() *types.Height { +func (m *QueryConnectionResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -199,7 +199,7 @@ type QueryConnectionsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` } func (m *QueryConnectionsResponse) Reset() { *m = QueryConnectionsResponse{} } @@ -249,11 +249,11 @@ func (m *QueryConnectionsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryConnectionsResponse) GetHeight() *types.Height { +func (m *QueryConnectionsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryClientConnectionsRequest is the request type for the @@ -311,7 +311,7 @@ type QueryClientConnectionsResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was generated - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryClientConnectionsResponse) Reset() { *m = QueryClientConnectionsResponse{} } @@ -361,11 +361,11 @@ func (m *QueryClientConnectionsResponse) GetProof() []byte { return nil } -func (m *QueryClientConnectionsResponse) GetProofHeight() *types.Height { +func (m *QueryClientConnectionsResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryConnectionClientStateRequest is the request type for the @@ -423,7 +423,7 @@ type QueryConnectionClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionClientStateResponse) Reset() { *m = QueryConnectionClientStateResponse{} } @@ -473,11 +473,11 @@ func (m *QueryConnectionClientStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionClientStateResponse) GetProofHeight() *types.Height { +func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryConnectionConsensusStateRequest is the request type for the @@ -553,7 +553,7 @@ type QueryConnectionConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionConsensusStateResponse) Reset() { *m = QueryConnectionConsensusStateResponse{} } @@ -610,11 +610,11 @@ func (m *QueryConnectionConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionConsensusStateResponse) GetProofHeight() *types.Height { +func (m *QueryConnectionConsensusStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } func init() { @@ -635,63 +635,63 @@ func init() { } var fileDescriptor_cd8d529f8c7cd06b = []byte{ - // 883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0x33, 0x45, - 0x18, 0x66, 0xca, 0x8f, 0xc0, 0x14, 0x50, 0x27, 0x05, 0xea, 0xaa, 0x05, 0x57, 0x91, 0x42, 0x64, - 0x86, 0x96, 0x68, 0x14, 0x68, 0xa2, 0x10, 0x44, 0x0e, 0x12, 0x5c, 0xe3, 0xc5, 0x0b, 0xd9, 0xdd, - 0x0e, 0xdb, 0x8d, 0x74, 0xa7, 0x74, 0xb7, 0x8d, 0x0d, 0xe9, 0x41, 0xff, 0x02, 0x13, 0x8f, 0x5e, - 0x8c, 0x07, 0xaf, 0x1e, 0x8c, 0x7f, 0x83, 0x1e, 0x49, 0xbc, 0x70, 0x50, 0xf3, 0x05, 0xbe, 0xe4, - 0xbb, 0x7f, 0x7f, 0xc1, 0x97, 0x9d, 0x99, 0xb2, 0xb3, 0x74, 0x5b, 0x4a, 0xf3, 0x71, 0xea, 0xee, - 0x3b, 0xef, 0x3b, 0xf3, 0x3c, 0xcf, 0xfb, 0xce, 0xb3, 0x85, 0xba, 0x6b, 0xd9, 0xc4, 0x66, 0x75, - 0x4a, 0x6c, 0xe6, 0x79, 0xd4, 0x0e, 0x5c, 0xe6, 0x91, 0x66, 0x81, 0x9c, 0x37, 0x68, 0xbd, 0x85, - 0x6b, 0x75, 0x16, 0x30, 0x34, 0xef, 0x5a, 0x36, 0x0e, 0x73, 0x70, 0x94, 0x83, 0x9b, 0x05, 0x2d, -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0x33, 0x8c, 0x34, 0xcf, 0x17, 0x2f, 0xba, 0xd9, 0x05, - 0xdb, 0xef, 0xf0, 0xfe, 0x0c, 0xc2, 0xa8, 0x51, 0x12, 0xf6, 0x7b, 0x58, 0x74, 0x15, 0x87, 0x5d, - 0xc5, 0x62, 0x38, 0x64, 0x57, 0xf1, 0xb1, 0xe9, 0x50, 0x59, 0x6b, 0x28, 0x95, 0xfa, 0x33, 0x00, - 0xb3, 0xdd, 0x67, 0x48, 0x6d, 0x8e, 0x60, 0x3a, 0xa2, 0xe8, 0x67, 0xc1, 0xd2, 0x68, 0x3e, 0x5d, - 0x7c, 0xbf, 0x97, 0x38, 0x87, 0x65, 0xea, 0x05, 0xee, 0xa9, 0x4b, 0xcb, 0x8a, 0xcc, 0xea, 0x06, - 0xe8, 0x20, 0x06, 0x3a, 0xc5, 0x41, 0xaf, 0xdc, 0x0b, 0x5a, 0x80, 0x51, 0x51, 0xa3, 0x22, 0x9c, - 0x18, 0x58, 0x51, 0x99, 0xa9, 0xef, 0xc0, 0xb7, 0x04, 0x51, 0x9e, 0x90, 0x20, 0xe9, 0x1b, 0x70, - 0x4a, 0x14, 0x47, 0x63, 0x34, 0x29, 0x02, 0x87, 0x65, 0xfd, 0x17, 0x00, 0x73, 0xbd, 0xca, 0xa5, - 0x5a, 0xab, 0xf0, 0x55, 0x65, 0x14, 0x6b, 0x66, 0x50, 0x11, 0x92, 0x4d, 0x19, 0xaf, 0x44, 0xf1, - 0xe3, 0x30, 0xfc, 0x38, 0xd3, 0x62, 0xc1, 0xb7, 0xef, 0x74, 0x52, 0x60, 0xfd, 0x2a, 0x30, 0x83, - 0x4e, 0xef, 0x51, 0x29, 0xf1, 0xbe, 0xec, 0x66, 0x9f, 0xff, 0xbf, 0x98, 0x69, 0x99, 0xd5, 0xb3, - 0x2d, 0x3d, 0xb6, 0xac, 0xdf, 0xb9, 0x49, 0xff, 0x02, 0xa8, 0xf7, 0x3b, 0x44, 0x4a, 0x61, 0xc2, - 0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0x82, - 0x0b, 0x00, 0x00, + // 887 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x4f, 0x33, 0x45, + 0x18, 0xee, 0x14, 0xbe, 0x2f, 0x1f, 0x53, 0x40, 0x9d, 0x14, 0xa8, 0xab, 0x16, 0x5c, 0x45, 0x0a, + 0x91, 0x19, 0x0a, 0xd1, 0x20, 0xd0, 0x44, 0x21, 0x88, 0x1c, 0x24, 0xb8, 0xc6, 0x8b, 0x17, 0xb2, + 0xbb, 0x1d, 0xb6, 0x1b, 0xe9, 0x4e, 0xe9, 0x6e, 0x1b, 0x1b, 0xd2, 0x83, 0xfe, 0x02, 0x13, 0x8f, + 0xde, 0x3c, 0x70, 0xf5, 0xe0, 0xd1, 0x1f, 0x20, 0x47, 0x12, 0x2f, 0x5e, 0x24, 0xa6, 0x78, 0xf5, + 0xe2, 0x2f, 0x30, 0x3b, 0x33, 0x65, 0x67, 0xe9, 0xb6, 0x94, 0xe6, 0xe3, 0xd4, 0xdd, 0x77, 0xde, + 0x77, 0xe6, 0x79, 0x9e, 0xf7, 0x9d, 0x67, 0x0b, 0x75, 0xd7, 0xb2, 0x89, 0xcd, 0xea, 0x94, 0xd8, + 0xcc, 0xf3, 0xa8, 0x1d, 0xb8, 0xcc, 0x23, 0xcd, 0x22, 0x39, 0x6f, 0xd0, 0x7a, 0x0b, 0xd7, 0xea, + 0x2c, 0x60, 0x68, 0xd6, 0xb5, 0x6c, 0x1c, 0xe6, 0xe0, 0x28, 0x07, 0x37, 0x8b, 0x5a, 0xd6, 0x61, + 0x0e, 0xe3, 0x29, 0x24, 0x7c, 0x12, 0xd9, 0xda, 0x8a, 0xcd, 0xfc, 0x2a, 0xf3, 0x89, 0x65, 0xfa, + 0x54, 0x6c, 0x43, 0x9a, 0x45, 0x8b, 0x06, 0x66, 0x91, 0xd4, 0x4c, 0xc7, 0xf5, 0x4c,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6, + 0x4c, 0xc2, 0xde, 0xe3, 0xb0, 0x4b, 0x68, 0x7b, 0x30, 0x6c, 0x31, 0x80, 0x71, 0xc9, 0xbb, 0x43, + 0xd9, 0x46, 0x7f, 0x01, 0x38, 0x93, 0xe8, 0x50, 0xe8, 0xa3, 0x21, 0x75, 0xec, 0xb5, 0x4e, 0x6d, + 0x6b, 0x94, 0x52, 0xc9, 0xea, 0x73, 0xce, 0xea, 0x00, 0xed, 0x8f, 0x3a, 0x41, 0x44, 0x35, 0x51, + 0xf4, 0x53, 0x1a, 0xe6, 0xfa, 0x5d, 0x73, 0xb4, 0x33, 0x2c, 0xce, 0x24, 0x4f, 0xd3, 0x4a, 0x23, + 0x56, 0x4b, 0xa2, 0xdf, 0x01, 0xce, 0xf4, 0x02, 0xb5, 0x46, 0x67, 0x1a, 0xf7, 0x26, 0x22, 0x6d, + 0x8e, 0x5c, 0xc4, 0xcd, 0xb2, 0x4d, 0x84, 0x99, 0x44, 0x71, 0xf1, 0xde, 0xde, 0xfd, 0xea, 0xaa, + 0x93, 0x07, 0xd7, 0x9d, 0x3c, 0xf8, 0xbb, 0x93, 0x07, 0x3f, 0xdc, 0xe6, 0x53, 0xd7, 0xb7, 0xf9, + 0xd4, 0x9f, 0xb7, 0xf9, 0xd4, 0xd7, 0xdb, 0x8e, 0x1b, 0x54, 0x1a, 0x16, 0xb6, 0x59, 0x95, 0xc8, + 0xff, 0xc4, 0xe2, 0x67, 0xd5, 0x2f, 0x7f, 0x43, 0xbe, 0x8d, 0x20, 0xaf, 0x6d, 0xac, 0x2a, 0xa8, + 0x83, 0x56, 0x8d, 0xfa, 0xd6, 0x73, 0xee, 0x8a, 0x1b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, + 0x3b, 0x2c, 0x79, 0xa0, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -984,18 +984,16 @@ func (m *QueryConnectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1073,18 +1071,16 @@ func (m *QueryConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1164,18 +1160,16 @@ func (m *QueryClientConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1245,18 +1239,16 @@ func (m *QueryConnectionClientStateResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1339,18 +1331,16 @@ func (m *QueryConnectionConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1418,10 +1408,8 @@ func (m *QueryConnectionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1454,10 +1442,8 @@ func (m *QueryConnectionsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1490,10 +1476,8 @@ func (m *QueryClientConnectionsResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1524,10 +1508,8 @@ func (m *QueryConnectionClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1568,10 +1550,8 @@ func (m *QueryConnectionConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -1794,9 +1774,6 @@ func (m *QueryConnectionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2042,9 +2019,6 @@ func (m *QueryConnectionsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2282,9 +2256,6 @@ func (m *QueryClientConnectionsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2526,9 +2497,6 @@ func (m *QueryConnectionClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2840,9 +2808,6 @@ func (m *QueryConnectionConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/03-connection/types/tx.pb.go b/x/ibc/core/03-connection/types/tx.pb.go index d2d99070c7df..be78639db0a5 100644 --- a/x/ibc/core/03-connection/types/tx.pb.go +++ b/x/ibc/core/03-connection/types/tx.pb.go @@ -113,22 +113,22 @@ var xxx_messageInfo_MsgConnectionOpenInitResponse proto.InternalMessageInfo // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // connection on Chain B. type MsgConnectionOpenTry struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - DesiredConnectionId string `protobuf:"bytes,2,opt,name=desired_connection_id,json=desiredConnectionId,proto3" json:"desired_connection_id,omitempty" yaml:"desired_connection_id"` - CounterpartyChosenConnectionId string `protobuf:"bytes,3,opt,name=counterparty_chosen_connection_id,json=counterpartyChosenConnectionId,proto3" json:"counterparty_chosen_connection_id,omitempty" yaml:"counterparty_chosen_connection_id"` - ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"` - CounterpartyVersions []*Version `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` - ProofHeight *types1.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + DesiredConnectionId string `protobuf:"bytes,2,opt,name=desired_connection_id,json=desiredConnectionId,proto3" json:"desired_connection_id,omitempty" yaml:"desired_connection_id"` + CounterpartyChosenConnectionId string `protobuf:"bytes,3,opt,name=counterparty_chosen_connection_id,json=counterpartyChosenConnectionId,proto3" json:"counterparty_chosen_connection_id,omitempty" yaml:"counterparty_chosen_connection_id"` + ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"` + CounterpartyVersions []*Version `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` + ProofHeight types1.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` ProofInit []byte `protobuf:"bytes,8,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` // proof of client state included in message ProofClient []byte `protobuf:"bytes,9,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,10,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight *types1.Height `protobuf:"bytes,11,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty" yaml:"consensus_height"` - Signer string `protobuf:"bytes,12,opt,name=signer,proto3" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,10,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight types1.Height `protobuf:"bytes,11,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` + Signer string `protobuf:"bytes,12,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenTry) Reset() { *m = MsgConnectionOpenTry{} } @@ -204,20 +204,20 @@ var xxx_messageInfo_MsgConnectionOpenTryResponse proto.InternalMessageInfo // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. type MsgConnectionOpenAck struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - CounterpartyConnectionId string `protobuf:"bytes,2,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` - Version *Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - ProofHeight *types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + CounterpartyConnectionId string `protobuf:"bytes,2,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + Version *Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + ProofHeight types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` // proof of the initialization the connection on Chain B: `UNITIALIZED -> // TRYOPEN` ProofTry []byte `protobuf:"bytes,6,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` // proof of client state included in message ProofClient []byte `protobuf:"bytes,7,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,8,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight *types1.Height `protobuf:"bytes,9,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height,omitempty" yaml:"consensus_height"` - Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,8,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight types1.Height `protobuf:"bytes,9,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` + Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenAck) Reset() { *m = MsgConnectionOpenAck{} } @@ -295,9 +295,9 @@ var xxx_messageInfo_MsgConnectionOpenAckResponse proto.InternalMessageInfo type MsgConnectionOpenConfirm struct { ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` // proof for the change of the connection state on Chain A: `INIT -> OPEN` - ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight *types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenConfirm) Reset() { *m = MsgConnectionOpenConfirm{} } @@ -384,64 +384,65 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 912 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x8f, 0x37, 0xfb, 0x27, 0x99, 0x04, 0xda, 0xba, 0xc9, 0xd6, 0x98, 0x62, 0xa7, 0x23, 0x10, - 0x39, 0x74, 0xed, 0xa6, 0x2d, 0x12, 0x2c, 0xe2, 0x90, 0xe4, 0xc2, 0x1e, 0x0a, 0xc8, 0x2c, 0x3d, - 0x70, 0x89, 0x12, 0x67, 0xd6, 0xb1, 0xb2, 0x99, 0x89, 0x3c, 0x4e, 0x5a, 0x73, 0x45, 0x42, 0x1c, - 0xf9, 0x08, 0xfd, 0x14, 0x7c, 0x05, 0x7a, 0xec, 0x11, 0x2e, 0x16, 0xda, 0xbd, 0x70, 0xf6, 0x8d, - 0x1b, 0xf2, 0xf8, 0x4f, 0xc6, 0x89, 0xa3, 0x26, 0x6c, 0x7a, 0xb2, 0xdf, 0xbc, 0xdf, 0xef, 0xbd, - 0x99, 0x37, 0xbf, 0xf7, 0x34, 0x40, 0xb5, 0x07, 0xa6, 0x6e, 0x12, 0x07, 0xe9, 0x26, 0xc1, 0x18, - 0x99, 0xae, 0x4d, 0xb0, 0x3e, 0x6f, 0xe9, 0xee, 0x4b, 0x6d, 0xea, 0x10, 0x97, 0x88, 0xc7, 0xf6, - 0xc0, 0xd4, 0x42, 0x80, 0xb6, 0x00, 0x68, 0xf3, 0x96, 0x5c, 0xb3, 0x88, 0x45, 0x18, 0x44, 0x0f, - 0xff, 0x22, 0xb4, 0xfc, 0x81, 0x45, 0x88, 0x75, 0x89, 0x74, 0x66, 0x0d, 0x66, 0x17, 0x7a, 0x1f, - 0x7b, 0xb1, 0x8b, 0xcb, 0x74, 0x69, 0x23, 0xec, 0x86, 0x59, 0xa2, 0xbf, 0x18, 0xf0, 0xe9, 0x9a, - 0xad, 0x70, 0x79, 0x19, 0x10, 0xfe, 0xbe, 0x07, 0xea, 0xcf, 0xa8, 0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 0x39, 0x4e, - 0x6e, 0x2d, 0xec, 0xb8, 0x65, 0x01, 0x15, 0x77, 0x24, 0xa0, 0x45, 0xa1, 0xf6, 0xd7, 0x14, 0x0a, - 0x82, 0xc6, 0xba, 0x3a, 0x24, 0xc5, 0x7a, 0xfc, 0x6f, 0x11, 0x14, 0x9f, 0x51, 0x4b, 0xfc, 0x09, - 0x88, 0x39, 0x0f, 0xae, 0x93, 0x75, 0x8d, 0x97, 0xfb, 0xce, 0x90, 0x3f, 0xdb, 0x0a, 0x9e, 0xec, - 0x41, 0x7c, 0x01, 0xee, 0xac, 0x3e, 0x49, 0x1e, 0x6e, 0x1c, 0xeb, 0xdc, 0xf1, 0xe4, 0xa7, 0xdb, - 0xa0, 0xd7, 0x27, 0x0e, 0xef, 0x6b, 0xf3, 0xc4, 0x6d, 0x73, 0xbc, 0x45, 0x62, 0x4e, 0xa2, 0xe2, - 0xcf, 0x02, 0xa8, 0xe7, 0xeb, 0xf3, 0xd1, 0xc6, 0xf1, 0x62, 0x86, 0xfc, 0xf9, 0xb6, 0x8c, 0x64, - 0x17, 0x9d, 0x1f, 0x5e, 0x5f, 0x29, 0xc2, 0x9b, 0x2b, 0x45, 0xf8, 0xfb, 0x4a, 0x11, 0x7e, 0xbb, - 0x56, 0x0a, 0x6f, 0xae, 0x95, 0xc2, 0x9f, 0xd7, 0x4a, 0xe1, 0xc7, 0x2f, 0x2d, 0xdb, 0x1d, 0xcd, - 0x06, 0x9a, 0x49, 0x26, 0xba, 0x49, 0xe8, 0x84, 0xd0, 0xf8, 0x73, 0x42, 0x87, 0x63, 0xfd, 0xa5, - 0x9e, 0x3e, 0xe5, 0x1f, 0x3d, 0x39, 0xe1, 0x5e, 0xf3, 0xae, 0x37, 0x45, 0x74, 0x70, 0xc8, 0xa6, - 0xec, 0x93, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x41, 0x2c, 0x86, 0x7c, 0x0c, 0x00, 0x00, + // 917 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x3f, 0x93, 0xdb, 0x44, + 0x14, 0xb7, 0xce, 0xf7, 0xc7, 0xde, 0x33, 0x24, 0x51, 0xec, 0x3b, 0x21, 0x82, 0xe4, 0xec, 0xc0, + 0x70, 0x45, 0x4e, 0x8a, 0x93, 0x30, 0x03, 0xc7, 0x50, 0xd8, 0x6e, 0xb8, 0x22, 0xc0, 0x88, 0x83, + 0x22, 0x8d, 0xc7, 0x96, 0xd7, 0xb2, 0xc6, 0xe7, 0x5d, 0x8f, 0x56, 0x76, 0x22, 0x5a, 0x1a, 0x86, + 0x8a, 0x8f, 0x90, 0x4f, 0xc1, 0x67, 0x48, 0x47, 0x4a, 0x2a, 0x0d, 0xdc, 0x35, 0xd4, 0xea, 0xe8, + 0x18, 0xad, 0xfe, 0x78, 0x65, 0xcb, 0x73, 0x36, 0xe7, 0x54, 0xd2, 0xdb, 0xf7, 0x7b, 0xef, 0xed, + 0xfe, 0xf6, 0xfd, 0xde, 0x2c, 0x50, 0xed, 0x9e, 0xa9, 0x9b, 0xc4, 0x41, 0xba, 0x49, 0x30, 0x46, + 0xa6, 0x6b, 0x13, 0xac, 0xcf, 0x1a, 0xba, 0xfb, 0x4a, 0x9b, 0x38, 0xc4, 0x25, 0xe2, 0x91, 0xdd, + 0x33, 0xb5, 0x10, 0xa0, 0xcd, 0x01, 0xda, 0xac, 0x21, 0x57, 0x2d, 0x62, 0x11, 0x06, 0xd1, 0xc3, + 0xbf, 0x08, 0x2d, 0x7f, 0x60, 0x11, 0x62, 0x5d, 0x22, 0x9d, 0x59, 0xbd, 0xe9, 0x40, 0xef, 0x62, + 0x2f, 0x76, 0x71, 0x95, 0x2e, 0x6d, 0x84, 0xdd, 0xb0, 0x4a, 0xf4, 0x17, 0x03, 0x3e, 0x5d, 0xb1, + 0x15, 0xae, 0x2e, 0x03, 0xc2, 0xdf, 0x77, 0x40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, 0x65, 0xa9, 0xcc, 0xe2, 0x8e, 0x17, 0x2b, 0x46, 0xde, 0xa4, 0x62, 0x9b, 0x59, 0x62, + 0x1b, 0xdc, 0x89, 0xbd, 0xa1, 0x22, 0x30, 0x9d, 0x52, 0x09, 0xb0, 0x70, 0x39, 0xf0, 0xd5, 0xa3, + 0x4c, 0x78, 0x02, 0x80, 0xc6, 0xfb, 0x51, 0x86, 0x64, 0x41, 0x1c, 0x80, 0xbb, 0xa9, 0x37, 0xa1, + 0xe5, 0xf0, 0x46, 0x5a, 0xd4, 0x98, 0x96, 0xe3, 0x74, 0xee, 0x64, 0x32, 0x40, 0xe3, 0x4e, 0xba, + 0x14, 0xd3, 0x33, 0x97, 0x7c, 0x65, 0x85, 0xe4, 0x15, 0xf0, 0x20, 0x4f, 0xd0, 0xa9, 0xe2, 0xff, + 0xde, 0xcb, 0x51, 0x7c, 0xd3, 0x1c, 0x2d, 0xcf, 0x45, 0x61, 0xa3, 0xb9, 0x68, 0x02, 0x39, 0x2b, + 0xba, 0x9c, 0x11, 0xf0, 0x49, 0xe0, 0xab, 0x0f, 0xf3, 0x04, 0x9a, 0x4d, 0x2c, 0x65, 0x94, 0xc9, + 0x17, 0xe1, 0x86, 0x65, 0x71, 0xc3, 0x61, 0xb9, 0x7d, 0x39, 0x2f, 0xca, 0x60, 0x6f, 0x8b, 0x32, + 0x68, 0x80, 0xa8, 0xbb, 0x3b, 0xae, 0xe3, 0x49, 0xfb, 0xac, 0x1d, 0xb9, 0xf1, 0x9b, 0xba, 0xa0, + 0x51, 0x62, 0xff, 0xe1, 0xc4, 0x5e, 0xd4, 0xc0, 0xc1, 0xed, 0x34, 0x50, 0xda, 0x8a, 0x06, 0xca, + 0xef, 0x54, 0x03, 0x60, 0x03, 0x0d, 0x34, 0xcd, 0x51, 0xaa, 0x81, 0x5f, 0x77, 0x80, 0xb4, 0x04, + 0x68, 0x13, 0x3c, 0xb0, 0x9d, 0xf1, 0x6d, 0x75, 0x90, 0xde, 0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, + 0x2c, 0x90, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -756,18 +757,16 @@ func (m *MsgConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 } - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x5a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x5a if len(m.ProofConsensus) > 0 { i -= len(m.ProofConsensus) copy(dAtA[i:], m.ProofConsensus) @@ -789,18 +788,16 @@ func (m *MsgConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.CounterpartyVersions) > 0 { for iNdEx := len(m.CounterpartyVersions) - 1; iNdEx >= 0; iNdEx-- { { @@ -911,18 +908,16 @@ func (m *MsgConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x52 } - if m.ConsensusHeight != nil { - { - size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ConsensusHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x4a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x4a if len(m.ProofConsensus) > 0 { i -= len(m.ProofConsensus) copy(dAtA[i:], m.ProofConsensus) @@ -944,18 +939,16 @@ func (m *MsgConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if m.ClientState != nil { { size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) @@ -1047,18 +1040,16 @@ func (m *MsgConnectionOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x22 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ProofAck) > 0 { i -= len(m.ProofAck) copy(dAtA[i:], m.ProofAck) @@ -1176,10 +1167,8 @@ func (m *MsgConnectionOpenTry) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.ProofInit) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1192,10 +1181,8 @@ func (m *MsgConnectionOpenTry) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1234,10 +1221,8 @@ func (m *MsgConnectionOpenAck) Size() (n int) { l = m.ClientState.Size() n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.ProofTry) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1250,10 +1235,8 @@ func (m *MsgConnectionOpenAck) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ConsensusHeight != nil { - l = m.ConsensusHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ConsensusHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1284,10 +1267,8 @@ func (m *MsgConnectionOpenConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1838,9 +1819,6 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types1.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1976,9 +1954,6 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types1.Height{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2286,9 +2261,6 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types1.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2424,9 +2396,6 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusHeight == nil { - m.ConsensusHeight = &types1.Height{} - } if err := m.ConsensusHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2664,9 +2633,6 @@ func (m *MsgConnectionOpenConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types1.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index a8bf1a57b5ca..f28ffcf805e0 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -96,7 +96,7 @@ func QueryChannelClientState( // prove is true, it performs an ABCI store query in order to retrieve the // merkle proof. Otherwise, it uses the gRPC query client. func QueryChannelConsensusState( - clientCtx client.Context, portID, channelID string, height *clienttypes.Height, prove bool, + clientCtx client.Context, portID, channelID string, height clienttypes.Height, prove bool, ) (*types.QueryChannelConsensusStateResponse, error) { queryClient := types.NewQueryClient(clientCtx) @@ -128,29 +128,29 @@ func QueryChannelConsensusState( // latest ConsensusState given the source port ID and source channel ID. func QueryLatestConsensusState( clientCtx client.Context, portID, channelID string, -) (exported.ConsensusState, *clienttypes.Height, *clienttypes.Height, error) { +) (exported.ConsensusState, clienttypes.Height, clienttypes.Height, error) { clientRes, err := QueryChannelClientState(clientCtx, portID, channelID, false) if err != nil { - return nil, &clienttypes.Height{}, &clienttypes.Height{}, err + return nil, clienttypes.Height{}, clienttypes.Height{}, err } clientState, err := clienttypes.UnpackClientState(clientRes.IdentifiedClientState.ClientState) if err != nil { - return nil, &clienttypes.Height{}, &clienttypes.Height{}, err + return nil, clienttypes.Height{}, clienttypes.Height{}, err } - clientHeight, ok := clientState.GetLatestHeight().(*clienttypes.Height) + clientHeight, ok := clientState.GetLatestHeight().(clienttypes.Height) if !ok { - return nil, &clienttypes.Height{}, &clienttypes.Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected type: %T, got: %T", - &clienttypes.Height{}, clientHeight) + return nil, clienttypes.Height{}, clienttypes.Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid height type. expected type: %T, got: %T", + clienttypes.Height{}, clientHeight) } res, err := QueryChannelConsensusState(clientCtx, portID, channelID, clientHeight, false) if err != nil { - return nil, &clienttypes.Height{}, &clienttypes.Height{}, err + return nil, clienttypes.Height{}, clienttypes.Height{}, err } consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState) if err != nil { - return nil, &clienttypes.Height{}, &clienttypes.Height{}, err + return nil, clienttypes.Height{}, clienttypes.Height{}, err } return consensusState, clientHeight, res.ProofHeight, nil diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 214ccd7360e7..96c635fe4515 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -115,17 +115,12 @@ func (k Keeper) SendPacket( k.SetNextSequenceSend(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), nextSequenceSend) k.SetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment) - anyTimeoutHeight, err := clienttypes.PackHeight(timeoutHeight) - if err != nil { - return nil - } - // Emit Event with Packet data along with other packet information for relayer to pick up // and relay to other chain if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelSendPacket{ Data: packet.GetData(), - TimeoutHeight: anyTimeoutHeight, + TimeoutHeight: timeoutHeight.(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), SrcPort: packet.GetSourcePort(), @@ -285,16 +280,11 @@ func (k Keeper) RecvPacket( // log that a packet has been received & executed k.Logger(ctx).Info("packet received", "packet", fmt.Sprintf("%v", packet)) - anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) - if err != nil { - return nil - } - // emit an event that the relayer can query for if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelRecvPacket{ Data: packet.GetData(), - TimeoutHeight: anyTimeoutHeight, + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), SrcPort: packet.GetSourcePort(), @@ -375,16 +365,11 @@ func (k Keeper) WriteAcknowledgement( // log that a packet acknowledgement has been written k.Logger(ctx).Info("acknowledged written", "packet", fmt.Sprintf("%v", packet)) - anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) - if err != nil { - return nil - } - // emit an event that the relayer can query for if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelWriteAck{ Data: packet.GetData(), - TimeoutHeight: anyTimeoutHeight, + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), SrcPort: packet.GetSourcePort(), @@ -520,15 +505,10 @@ func (k Keeper) AcknowledgePacket( // log that a packet has been acknowledged k.Logger(ctx).Info("packet acknowledged", "packet", fmt.Sprintf("%v", packet)) - anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) - if err != nil { - return nil - } - // emit an event marking that we have processed the acknowledgement if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelAckPacket{ - TimeoutHeight: anyTimeoutHeight, + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), SrcPort: packet.GetSourcePort(), diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index 79e678513e12..f53ed7947552 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -132,7 +132,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use client state latest height for timeout clientState := suite.chainA.GetClientState(clientA) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clientState.GetLatestHeight().(*clienttypes.Height), disabledTimeoutTimestamp) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clientState.GetLatestHeight().(clienttypes.Height), disabledTimeoutTimestamp) channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"timeout timestamp passed", func() { diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index 9ef49fa878fe..deea41adab02 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -151,15 +151,10 @@ func (k Keeper) TimeoutExecuted( k.Logger(ctx).Info("packet timed-out", "packet", fmt.Sprintf("%v", packet)) - anyTimeoutHeight, err := clienttypes.PackHeight(packet.GetTimeoutHeight()) - if err != nil { - return nil - } - // emit an event marking that we have processed the timeout if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelTimeoutPacket{ - TimeoutHeight: anyTimeoutHeight, + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), SrcPort: packet.GetSourcePort(), diff --git a/x/ibc/core/04-channel/types/channel.pb.go b/x/ibc/core/04-channel/types/channel.pb.go index 0c83ca5add40..e1be136186e6 100644 --- a/x/ibc/core/04-channel/types/channel.pb.go +++ b/x/ibc/core/04-channel/types/channel.pb.go @@ -261,7 +261,7 @@ type Packet struct { // actual opaque bytes transferred directly to the application module Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // block height after which the packet times out - TimeoutHeight *types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty" yaml:"timeout_height"` + TimeoutHeight types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` // block timestamp (in nanoseconds) after which the packet times out TimeoutTimestamp uint64 `protobuf:"varint,8,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` } @@ -455,64 +455,64 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 901 bytes of a gzipped FileDescriptorProto + // 904 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0x15, 0x2d, 0xea, 0x75, 0x65, 0xc9, 0xf2, 0xa4, 0x56, 0x58, 0x36, 0x15, 0x15, 0xa2, 0x0b, - 0x23, 0x45, 0xa4, 0x38, 0x0d, 0xda, 0x22, 0xab, 0x5a, 0x8f, 0xc0, 0x44, 0x03, 0xc9, 0x18, 0xc9, - 0x8b, 0x06, 0x05, 0x04, 0x99, 0x9c, 0x4a, 0x84, 0x25, 0x8e, 0x4a, 0x8e, 0xec, 0xfa, 0x0f, 0x02, - 0xad, 0xfa, 0x03, 0x02, 0x0a, 0x14, 0xed, 0x2f, 0xf4, 0x17, 0xb2, 0xcc, 0xb2, 0x2b, 0xa1, 0xb0, -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0xd2, 0x2f, 0x37, 0xe5, 0xd8, 0xbb, 0x9b, 0x72, 0xec, 0xaf, 0x9b, 0x72, + 0xec, 0xf5, 0x37, 0x43, 0x87, 0x8e, 0x66, 0x67, 0x55, 0x8b, 0x4c, 0x6a, 0x16, 0xf1, 0x27, 0xc4, + 0x17, 0x9f, 0x27, 0xbe, 0x7d, 0x5e, 0xfb, 0xb9, 0xb6, 0x7a, 0x93, 0x9f, 0x3e, 0x7f, 0x12, 0x3d, + 0xf2, 0xf4, 0x6a, 0x8a, 0xfd, 0xb3, 0x14, 0x7b, 0x94, 0xbf, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0xd7, 0x33, 0x69, 0x35, 0x05, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -709,18 +709,16 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintChannel(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) @@ -998,10 +996,8 @@ func (m *Packet) Size() (n int) { if l > 0 { n += 1 + l + sovChannel(uint64(l)) } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovChannel(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovChannel(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovChannel(uint64(m.TimeoutTimestamp)) } @@ -1869,9 +1865,6 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Height{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/types/event.pb.go b/x/ibc/core/04-channel/types/event.pb.go index 2f1889ad0ff0..451a60fa7ec8 100644 --- a/x/ibc/core/04-channel/types/event.pb.go +++ b/x/ibc/core/04-channel/types/event.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + types "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -488,15 +488,15 @@ func (m *EventChannelCloseConfirm) GetConnectionId() string { // EventChannelSendPacket is a typed event emitted when packet is sent type EventChannelSendPacket struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - TimeoutHeight *types.Any `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` } func (m *EventChannelSendPacket) Reset() { *m = EventChannelSendPacket{} } @@ -539,11 +539,11 @@ func (m *EventChannelSendPacket) GetData() []byte { return nil } -func (m *EventChannelSendPacket) GetTimeoutHeight() *types.Any { +func (m *EventChannelSendPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight } - return nil + return types.Height{} } func (m *EventChannelSendPacket) GetTimeoutTimestamp() uint64 { @@ -597,15 +597,15 @@ func (m *EventChannelSendPacket) GetChannelOrdering() Order { // EventChannelRecvPacket is a typed event emitted when packet is received in channel type EventChannelRecvPacket struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - TimeoutHeight *types.Any `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` } func (m *EventChannelRecvPacket) Reset() { *m = EventChannelRecvPacket{} } @@ -648,11 +648,11 @@ func (m *EventChannelRecvPacket) GetData() []byte { return nil } -func (m *EventChannelRecvPacket) GetTimeoutHeight() *types.Any { +func (m *EventChannelRecvPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight } - return nil + return types.Height{} } func (m *EventChannelRecvPacket) GetTimeoutTimestamp() uint64 { @@ -706,15 +706,15 @@ func (m *EventChannelRecvPacket) GetChannelOrdering() Order { // EventChannelWriteAck is a typed event emitted on write acknowledgement type EventChannelWriteAck struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - TimeoutHeight *types.Any `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - Acknowledgement []byte `protobuf:"bytes,9,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + Acknowledgement []byte `protobuf:"bytes,9,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` } func (m *EventChannelWriteAck) Reset() { *m = EventChannelWriteAck{} } @@ -757,11 +757,11 @@ func (m *EventChannelWriteAck) GetData() []byte { return nil } -func (m *EventChannelWriteAck) GetTimeoutHeight() *types.Any { +func (m *EventChannelWriteAck) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight } - return nil + return types.Height{} } func (m *EventChannelWriteAck) GetTimeoutTimestamp() uint64 { @@ -815,14 +815,14 @@ func (m *EventChannelWriteAck) GetAcknowledgement() []byte { // EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed type EventChannelAckPacket struct { - TimeoutHeight *types.Any `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` } func (m *EventChannelAckPacket) Reset() { *m = EventChannelAckPacket{} } @@ -858,11 +858,11 @@ func (m *EventChannelAckPacket) XXX_DiscardUnknown() { var xxx_messageInfo_EventChannelAckPacket proto.InternalMessageInfo -func (m *EventChannelAckPacket) GetTimeoutHeight() *types.Any { +func (m *EventChannelAckPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight } - return nil + return types.Height{} } func (m *EventChannelAckPacket) GetTimeoutTimestamp() uint64 { @@ -916,14 +916,14 @@ func (m *EventChannelAckPacket) GetChannelOrdering() Order { // EventChannelTimeoutPacket is a typed event emitted when packet is timeout type EventChannelTimeoutPacket struct { - TimeoutHeight *types.Any `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` + DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` } func (m *EventChannelTimeoutPacket) Reset() { *m = EventChannelTimeoutPacket{} } @@ -959,11 +959,11 @@ func (m *EventChannelTimeoutPacket) XXX_DiscardUnknown() { var xxx_messageInfo_EventChannelTimeoutPacket proto.InternalMessageInfo -func (m *EventChannelTimeoutPacket) GetTimeoutHeight() *types.Any { +func (m *EventChannelTimeoutPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight } - return nil + return types.Height{} } func (m *EventChannelTimeoutPacket) GetTimeoutTimestamp() uint64 { @@ -1032,49 +1032,50 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/event.proto", fileDescriptor_a989ebecceb60589) } var fileDescriptor_a989ebecceb60589 = []byte{ - // 665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6e, 0x13, 0x3f, - 0x14, 0xc5, 0xeb, 0x34, 0x4d, 0xd2, 0xdb, 0xcf, 0xbf, 0xdb, 0xfe, 0x9b, 0x46, 0x22, 0x2d, 0x65, - 0x53, 0x09, 0x75, 0xa6, 0x2d, 0x08, 0xb1, 0x6d, 0xa3, 0x0a, 0xb2, 0x6a, 0x35, 0x54, 0x42, 0x62, - 0x13, 0x4d, 0x6c, 0x37, 0x19, 0x25, 0xb1, 0x83, 0xed, 0x04, 0xf2, 0x16, 0x3c, 0x0c, 0x0f, 0x81, - 0x58, 0x75, 0xc9, 0x02, 0xaa, 0xd2, 0x6e, 0x58, 0xf0, 0x0a, 0x48, 0xc8, 0x1e, 0x4f, 0x49, 0x3f, - 0x14, 0x15, 0x09, 0x58, 0x44, 0x59, 0x4d, 0xae, 0xcf, 0x3d, 0x1e, 0x9d, 0x9f, 0xad, 0x71, 0x0c, - 0xab, 0x51, 0x95, 0xf8, 0x44, 0x48, 0xe6, 0x93, 0x7a, 0xc8, 0x39, 0x6b, 0xfa, 0xdd, 0x6d, 0x9f, - 0x75, 0x19, 0xd7, 0x5e, 0x5b, 0x0a, 0x2d, 0xf0, 0x42, 0x54, 0x25, 0x9e, 0x69, 0xf0, 0x5c, 0x83, - 0xd7, 0xdd, 0x2e, 0xdc, 0xbf, 0xcd, 0x95, 0xe8, 0xd6, 0x57, 0x58, 0xa9, 0x09, 0x51, 0x6b, 0x32, - 0xdf, 0x56, 0xd5, 0xce, 0xb1, 0x1f, 0xf2, 0x5e, 0x22, 0x11, 0xa1, 0x5a, 0x42, 0x55, 0x6c, 0xe5, - 0xc7, 0x45, 0x2c, 0xad, 0x7f, 0x41, 0xb0, 0xb8, 0x6f, 0xde, 0x5e, 0x8a, 0x27, 0x3b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 0xbf, 0xa5, 0xae, 0x1e, 0x84, 0xbb, 0xa4, - 0xe1, 0xf6, 0xf7, 0x4d, 0x9a, 0xe8, 0x0f, 0xd2, 0x4c, 0xdd, 0x81, 0xe6, 0xf8, 0x00, 0x9a, 0xe9, - 0x81, 0x34, 0x27, 0x06, 0xd2, 0xcc, 0x0c, 0xa4, 0x99, 0xbd, 0xd3, 0x5e, 0xce, 0xfd, 0xfe, 0x5e, - 0xfe, 0x9e, 0x82, 0x95, 0x7e, 0xd4, 0x47, 0x71, 0xf6, 0x11, 0xee, 0xbf, 0x82, 0x7b, 0x2f, 0xf8, - 0x70, 0x5e, 0x44, 0x27, 0xe7, 0x45, 0x74, 0x76, 0x5e, 0x44, 0xef, 0x2e, 0x8a, 0x63, 0x27, 0x17, - 0xc5, 0xb1, 0x4f, 0x17, 0xc5, 0xb1, 0x57, 0x4f, 0x6b, 0x91, 0xae, 0x77, 0xaa, 0x1e, 0x11, 0x2d, - 0x77, 0x67, 0x71, 0x8f, 0x4d, 0x45, 0x1b, 0xfe, 0x5b, 0xff, 0xf2, 0x4a, 0xb4, 0xf5, 0x78, 0x33, - 0xb9, 0x15, 0xe9, 0x5e, 0x9b, 0xa9, 0x6a, 0xc6, 0x2e, 0xc2, 0xa3, 0x9f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xea, 0xf4, 0x0b, 0x71, 0x6c, 0x0d, 0x00, 0x00, + // 673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xbf, 0x4f, 0x1b, 0x3f, + 0x1c, 0xcd, 0x91, 0x90, 0x04, 0xf3, 0xf3, 0x6b, 0xe0, 0x4b, 0x88, 0x44, 0x42, 0xd3, 0x05, 0xa9, + 0xe2, 0x0e, 0xda, 0xaa, 0xaa, 0xba, 0x41, 0x84, 0xd4, 0x4c, 0xa0, 0x2b, 0x52, 0xa5, 0x2e, 0xf4, + 0x62, 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 0xc6, + 0x1f, 0xbc, 0xc3, 0x55, 0x90, 0x97, 0x02, 0x19, 0x7f, 0xad, 0xf2, 0x9c, 0x14, 0x48, 0x7b, 0x0a, + 0xcb, 0x60, 0x5a, 0xb7, 0xac, 0x91, 0x85, 0xac, 0xe9, 0x02, 0x29, 0x90, 0x35, 0x41, 0x73, 0xb1, + 0x54, 0x11, 0x37, 0x17, 0x71, 0xb1, 0x54, 0x31, 0x57, 0xb7, 0x62, 0x6e, 0x3e, 0xe2, 0x62, 0x19, + 0x1b, 0x08, 0xf7, 0xc0, 0x42, 0x9c, 0x10, 0x17, 0x98, 0x08, 0xca, 0x1a, 0x85, 0xa9, 0x75, 0x67, + 0x63, 0x6e, 0xc8, 0xa4, 0xc1, 0x09, 0xe9, 0xee, 0x6b, 0x90, 0x3f, 0x6f, 0x2b, 0xfb, 0x96, 0x72, + 0x2d, 0x18, 0x9f, 0xa0, 0xde, 0x5d, 0x30, 0xff, 0x40, 0x30, 0x3f, 0x27, 0x86, 0xff, 0x77, 0xbc, + 0x14, 0x54, 0x11, 0x7d, 0x72, 0xdd, 0xc5, 0xf2, 0x57, 0xb1, 0x6c, 0x80, 0xf9, 0x00, 0xb5, 0x18, + 0x7f, 0xd7, 0x26, 0xb8, 0x41, 0x42, 0xc2, 0x94, 0x49, 0x65, 0xc6, 0xbf, 0x5a, 0xae, 0x7c, 0x48, + 0x0f, 0x9f, 0xa9, 0x3b, 0xa8, 0x65, 0x7f, 0x11, 0xd7, 0x6d, 0x76, 0x6e, 0xc3, 0xe6, 0x89, 0x1b, + 0xd8, 0x9c, 0x1e, 0x61, 0x73, 0x66, 0xa4, 0xcd, 0x93, 0x23, 0x6d, 0xce, 0x8e, 0xb4, 0x39, 0x77, + 0xa3, 0xdd, 0x9f, 0xff, 0xf3, 0xdd, 0xff, 0x31, 0x0d, 0x56, 0x93, 0x19, 0x1c, 0x46, 0xda, 0xef, + 0x72, 0xb8, 0xdd, 0x1c, 0x76, 0xfd, 0xe3, 0xf3, 0x92, 0x73, 0x72, 0x5e, 0x72, 0xce, 0xce, 0x4b, + 0xce, 0xa7, 0x8b, 0x52, 0xea, 0xe4, 0xa2, 0x94, 0xfa, 0x72, 0x51, 0x4a, 0xbd, 0x7a, 0xda, 0xa0, + 0xaa, 0xd9, 0xad, 0xbb, 0x88, 0x87, 0x1e, 0xe2, 0x32, 0xe4, 0xd2, 0x3e, 0x36, 0x25, 0x6e, 0x79, + 0xef, 0xbd, 0xc1, 0xbd, 0x6a, 0xeb, 0xf1, 0x66, 0x7c, 0x27, 0x53, 0xfd, 0x0e, 0x91, 0xf5, 0xac, + 0xb9, 0x58, 0x3d, 0xfa, 0x15, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x29, 0xfb, 0x89, 0xea, 0x0d, 0x00, + 0x00, } func (m *EventChannelOpenInit) Marshal() (dAtA []byte, err error) { @@ -1488,18 +1489,16 @@ func (m *EventChannelSendPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x18 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) @@ -1573,18 +1572,16 @@ func (m *EventChannelRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x18 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) @@ -1660,18 +1657,16 @@ func (m *EventChannelWriteAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) @@ -1745,18 +1740,16 @@ func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -1823,18 +1816,16 @@ func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, erro i-- dAtA[i] = 0x10 } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -2033,10 +2024,8 @@ func (m *EventChannelSendPacket) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) } @@ -2075,10 +2064,8 @@ func (m *EventChannelRecvPacket) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) } @@ -2117,10 +2104,8 @@ func (m *EventChannelWriteAck) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) } @@ -2156,10 +2141,8 @@ func (m *EventChannelAckPacket) Size() (n int) { } var l int _ = l - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) } @@ -2194,10 +2177,8 @@ func (m *EventChannelTimeoutPacket) Size() (n int) { } var l int _ = l - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.TimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) } @@ -3602,9 +3583,6 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Any{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3910,9 +3888,6 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Any{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4218,9 +4193,6 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Any{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4507,9 +4479,6 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Any{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4781,9 +4750,6 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types.Any{} - } if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index f9130a784b31..772a1204effc 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -81,7 +81,7 @@ var _ sdk.Msg = &MsgChannelOpenTry{} func NewMsgChannelOpenTry( portID, desiredChannelID, counterpartyChosenChannelID, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID, counterpartyVersion string, - proofInit []byte, proofHeight *clienttypes.Height, signer sdk.AccAddress, + proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenTry { counterparty := NewCounterparty(counterpartyPortID, counterpartyChannelID) channel := NewChannel(TRYOPEN, channelOrder, counterparty, connectionHops, version) @@ -157,7 +157,7 @@ var _ sdk.Msg = &MsgChannelOpenAck{} // NewMsgChannelOpenAck creates a new MsgChannelOpenAck instance // nolint:interfacer func NewMsgChannelOpenAck( - portID, channelID, counterpartyChannelID string, cpv string, proofTry []byte, proofHeight *clienttypes.Height, + portID, channelID, counterpartyChannelID string, cpv string, proofTry []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenAck { return &MsgChannelOpenAck{ @@ -225,7 +225,7 @@ var _ sdk.Msg = &MsgChannelOpenConfirm{} // NewMsgChannelOpenConfirm creates a new MsgChannelOpenConfirm instance // nolint:interfacer func NewMsgChannelOpenConfirm( - portID, channelID string, proofAck []byte, proofHeight *clienttypes.Height, + portID, channelID string, proofAck []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenConfirm { return &MsgChannelOpenConfirm{ @@ -342,7 +342,7 @@ var _ sdk.Msg = &MsgChannelCloseConfirm{} // NewMsgChannelCloseConfirm creates a new MsgChannelCloseConfirm instance // nolint:interfacer func NewMsgChannelCloseConfirm( - portID, channelID string, proofInit []byte, proofHeight *clienttypes.Height, + portID, channelID string, proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelCloseConfirm { return &MsgChannelCloseConfirm{ @@ -405,7 +405,7 @@ var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket // nolint:interfacer func NewMsgRecvPacket( - packet Packet, proofCommitment []byte, proofHeight *clienttypes.Height, + packet Packet, proofCommitment []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgRecvPacket { return &MsgRecvPacket{ @@ -469,7 +469,7 @@ var _ sdk.Msg = &MsgTimeout{} // nolint:interfacer func NewMsgTimeout( packet Packet, nextSequenceRecv uint64, proofUnreceived []byte, - proofHeight *clienttypes.Height, signer sdk.AccAddress, + proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeout { return &MsgTimeout{ Packet: packet, @@ -528,7 +528,7 @@ func (msg MsgTimeout) Type() string { func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, proofUnreceived, proofClose []byte, - proofHeight *clienttypes.Height, signer sdk.AccAddress, + proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeoutOnClose { return &MsgTimeoutOnClose{ Packet: packet, @@ -593,7 +593,7 @@ var _ sdk.Msg = &MsgAcknowledgement{} func NewMsgAcknowledgement( packet Packet, ack, proofAcked []byte, - proofHeight *clienttypes.Height, + proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgAcknowledgement { return &MsgAcknowledgement{ diff --git a/x/ibc/core/04-channel/types/packet.go b/x/ibc/core/04-channel/types/packet.go index 7a92f9395a94..18a3690b1ebf 100644 --- a/x/ibc/core/04-channel/types/packet.go +++ b/x/ibc/core/04-channel/types/packet.go @@ -47,7 +47,7 @@ func NewPacket( data []byte, sequence uint64, sourcePort, sourceChannel, destinationPort, destinationChannel string, - timeoutHeight *clienttypes.Height, timeoutTimestamp uint64, + timeoutHeight clienttypes.Height, timeoutTimestamp uint64, ) Packet { return Packet{ Data: data, diff --git a/x/ibc/core/04-channel/types/query.go b/x/ibc/core/04-channel/types/query.go index 2b3c784b2e75..1f1962a6e594 100644 --- a/x/ibc/core/04-channel/types/query.go +++ b/x/ibc/core/04-channel/types/query.go @@ -7,7 +7,7 @@ import ( ) // NewQueryChannelResponse creates a new QueryChannelResponse instance -func NewQueryChannelResponse(channel Channel, proof []byte, height *clienttypes.Height) *QueryChannelResponse { +func NewQueryChannelResponse(channel Channel, proof []byte, height clienttypes.Height) *QueryChannelResponse { return &QueryChannelResponse{ Channel: &channel, Proof: proof, @@ -16,7 +16,7 @@ func NewQueryChannelResponse(channel Channel, proof []byte, height *clienttypes. } // NewQueryChannelClientStateResponse creates a newQueryChannelClientStateResponse instance -func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height *clienttypes.Height) *QueryChannelClientStateResponse { +func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryChannelClientStateResponse { return &QueryChannelClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, @@ -25,7 +25,7 @@ func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.Identi } // NewQueryChannelConsensusStateResponse creates a newQueryChannelConsensusStateResponse instance -func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height *clienttypes.Height) *QueryChannelConsensusStateResponse { +func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryChannelConsensusStateResponse { return &QueryChannelConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, @@ -36,7 +36,7 @@ func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *c // NewQueryPacketCommitmentResponse creates a new QueryPacketCommitmentResponse instance func NewQueryPacketCommitmentResponse( - commitment []byte, proof []byte, height *clienttypes.Height, + commitment []byte, proof []byte, height clienttypes.Height, ) *QueryPacketCommitmentResponse { return &QueryPacketCommitmentResponse{ Commitment: commitment, @@ -47,7 +47,7 @@ func NewQueryPacketCommitmentResponse( // NewQueryPacketReceiptResponse creates a new QueryPacketReceiptResponse instance func NewQueryPacketReceiptResponse( - recvd bool, proof []byte, height *clienttypes.Height, + recvd bool, proof []byte, height clienttypes.Height, ) *QueryPacketReceiptResponse { return &QueryPacketReceiptResponse{ Received: recvd, @@ -58,7 +58,7 @@ func NewQueryPacketReceiptResponse( // NewQueryPacketAcknowledgementResponse creates a new QueryPacketAcknowledgementResponse instance func NewQueryPacketAcknowledgementResponse( - acknowledgement []byte, proof []byte, height *clienttypes.Height, + acknowledgement []byte, proof []byte, height clienttypes.Height, ) *QueryPacketAcknowledgementResponse { return &QueryPacketAcknowledgementResponse{ Acknowledgement: acknowledgement, @@ -69,7 +69,7 @@ func NewQueryPacketAcknowledgementResponse( // NewQueryNextSequenceReceiveResponse creates a new QueryNextSequenceReceiveResponse instance func NewQueryNextSequenceReceiveResponse( - sequence uint64, proof []byte, height *clienttypes.Height, + sequence uint64, proof []byte, height clienttypes.Height, ) *QueryNextSequenceReceiveResponse { return &QueryNextSequenceReceiveResponse{ NextSequenceReceive: sequence, diff --git a/x/ibc/core/04-channel/types/query.pb.go b/x/ibc/core/04-channel/types/query.pb.go index 698cac525a3c..7015a2acf9e9 100644 --- a/x/ibc/core/04-channel/types/query.pb.go +++ b/x/ibc/core/04-channel/types/query.pb.go @@ -96,7 +96,7 @@ type QueryChannelResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelResponse) Reset() { *m = QueryChannelResponse{} } @@ -146,11 +146,11 @@ func (m *QueryChannelResponse) GetProof() []byte { return nil } -func (m *QueryChannelResponse) GetProofHeight() *types.Height { +func (m *QueryChannelResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -206,7 +206,7 @@ type QueryChannelsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` } func (m *QueryChannelsResponse) Reset() { *m = QueryChannelsResponse{} } @@ -256,11 +256,11 @@ func (m *QueryChannelsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryChannelsResponse) GetHeight() *types.Height { +func (m *QueryChannelsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryConnectionChannelsRequest is the request type for the @@ -327,7 +327,7 @@ type QueryConnectionChannelsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` } func (m *QueryConnectionChannelsResponse) Reset() { *m = QueryConnectionChannelsResponse{} } @@ -377,11 +377,11 @@ func (m *QueryConnectionChannelsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryConnectionChannelsResponse) GetHeight() *types.Height { +func (m *QueryConnectionChannelsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -448,7 +448,7 @@ type QueryChannelClientStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelClientStateResponse) Reset() { *m = QueryChannelClientStateResponse{} } @@ -498,11 +498,11 @@ func (m *QueryChannelClientStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelClientStateResponse) GetProofHeight() *types.Height { +func (m *QueryChannelClientStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryChannelConsensusStateRequest is the request type for the @@ -589,7 +589,7 @@ type QueryChannelConsensusStateResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelConsensusStateResponse) Reset() { *m = QueryChannelConsensusStateResponse{} } @@ -646,11 +646,11 @@ func (m *QueryChannelConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelConsensusStateResponse) GetProofHeight() *types.Height { +func (m *QueryChannelConsensusStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryPacketCommitmentRequest is the request type for the @@ -727,7 +727,7 @@ type QueryPacketCommitmentResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryPacketCommitmentResponse) Reset() { *m = QueryPacketCommitmentResponse{} } @@ -777,11 +777,11 @@ func (m *QueryPacketCommitmentResponse) GetProof() []byte { return nil } -func (m *QueryPacketCommitmentResponse) GetProofHeight() *types.Height { +func (m *QueryPacketCommitmentResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryPacketCommitmentsRequest is the request type for the @@ -856,7 +856,7 @@ type QueryPacketCommitmentsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` } func (m *QueryPacketCommitmentsResponse) Reset() { *m = QueryPacketCommitmentsResponse{} } @@ -906,11 +906,11 @@ func (m *QueryPacketCommitmentsResponse) GetPagination() *query.PageResponse { return nil } -func (m *QueryPacketCommitmentsResponse) GetHeight() *types.Height { +func (m *QueryPacketCommitmentsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryPacketReceiptRequest is the request type for the @@ -987,7 +987,7 @@ type QueryPacketReceiptResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryPacketReceiptResponse) Reset() { *m = QueryPacketReceiptResponse{} } @@ -1037,11 +1037,11 @@ func (m *QueryPacketReceiptResponse) GetProof() []byte { return nil } -func (m *QueryPacketReceiptResponse) GetProofHeight() *types.Height { +func (m *QueryPacketReceiptResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryPacketAcknowledgementRequest is the request type for the @@ -1118,7 +1118,7 @@ type QueryPacketAcknowledgementResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryPacketAcknowledgementResponse) Reset() { *m = QueryPacketAcknowledgementResponse{} } @@ -1168,11 +1168,11 @@ func (m *QueryPacketAcknowledgementResponse) GetProof() []byte { return nil } -func (m *QueryPacketAcknowledgementResponse) GetProofHeight() *types.Height { +func (m *QueryPacketAcknowledgementResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } // QueryPacketAcknowledgementsRequest is the request type for the @@ -1247,7 +1247,7 @@ type QueryPacketAcknowledgementsResponse struct { // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` } func (m *QueryPacketAcknowledgementsResponse) Reset() { *m = QueryPacketAcknowledgementsResponse{} } @@ -1297,11 +1297,11 @@ func (m *QueryPacketAcknowledgementsResponse) GetPagination() *query.PageRespons return nil } -func (m *QueryPacketAcknowledgementsResponse) GetHeight() *types.Height { +func (m *QueryPacketAcknowledgementsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryUnreceivedPacketsRequest is the request type for the @@ -1375,7 +1375,7 @@ type QueryUnreceivedPacketsResponse struct { // list of unreceived packet sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` } func (m *QueryUnreceivedPacketsResponse) Reset() { *m = QueryUnreceivedPacketsResponse{} } @@ -1418,11 +1418,11 @@ func (m *QueryUnreceivedPacketsResponse) GetSequences() []uint64 { return nil } -func (m *QueryUnreceivedPacketsResponse) GetHeight() *types.Height { +func (m *QueryUnreceivedPacketsResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryUnreceivedAcks is the request type for the @@ -1496,7 +1496,7 @@ type QueryUnreceivedAcksResponse struct { // list of unreceived acknowledgement sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height - Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` } func (m *QueryUnreceivedAcksResponse) Reset() { *m = QueryUnreceivedAcksResponse{} } @@ -1539,11 +1539,11 @@ func (m *QueryUnreceivedAcksResponse) GetSequences() []uint64 { return nil } -func (m *QueryUnreceivedAcksResponse) GetHeight() *types.Height { +func (m *QueryUnreceivedAcksResponse) GetHeight() types.Height { if m != nil { return m.Height } - return nil + return types.Height{} } // QueryNextSequenceReceiveRequest is the request type for the @@ -1610,7 +1610,7 @@ type QueryNextSequenceReceiveResponse struct { // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // height at which the proof was retrieved - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryNextSequenceReceiveResponse) Reset() { *m = QueryNextSequenceReceiveResponse{} } @@ -1660,11 +1660,11 @@ func (m *QueryNextSequenceReceiveResponse) GetProof() []byte { return nil } -func (m *QueryNextSequenceReceiveResponse) GetProofHeight() *types.Height { +func (m *QueryNextSequenceReceiveResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight } - return nil + return types.Height{} } func init() { @@ -1699,100 +1699,100 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1475 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdd, 0x6f, 0x14, 0x55, - 0x14, 0xe7, 0x6e, 0x0b, 0xb4, 0x87, 0xef, 0xdb, 0x16, 0xca, 0x50, 0x96, 0xb2, 0x7e, 0x15, 0x12, - 0xe6, 0xd2, 0x82, 0x48, 0x62,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b, 0xb2, 0xf4, 0xde, 0x25, 0xf4, 0x0e, 0xe9, 0x45, 0xd1, 0xc9, 0x68, 0xfe, 0x1b, 0xac, 0x1e, - 0xc0, 0x2a, 0x56, 0x91, 0xf8, 0x3f, 0x04, 0xb6, 0xc7, 0xdb, 0x5d, 0xca, 0xda, 0xe1, 0x15, 0x69, - 0xd0, 0x95, 0xa3, 0xed, 0x3b, 0xa0, 0x0a, 0x1f, 0x4b, 0x15, 0x56, 0xe8, 0x72, 0x0f, 0x35, 0x88, - 0x75, 0xfd, 0x31, 0xf2, 0x5e, 0x0a, 0xd0, 0xc7, 0x04, 0x86, 0x12, 0x7a, 0x63, 0x9a, 0xd1, 0x33, - 0xa4, 0xb7, 0xe9, 0xca, 0xab, 0x1d, 0x7a, 0xa1, 0x10, 0x97, 0x85, 0x0e, 0xef, 0xd0, 0x73, 0xdd, - 0xea, 0x10, 0x6b, 0xe3, 0x4f, 0x6b, 0x3f, 0xaf, 0xe6, 0xc9, 0x83, 0xd5, 0x3c, 0x79, 0xb2, 0x9a, - 0x27, 0x5f, 0x3c, 0xcd, 0x6f, 0x78, 0xf0, 0x34, 0xbf, 0xe1, 0xd1, 0xd3, 0xfc, 0x86, 0x6b, 0x27, - 0x2b, 0xa6, 0x3b, 0x57, 0x2f, 0xa9, 0x86, 0xbd, 0xc8, 0xf0, 0xef, 0x78, 0xf2, 0x9f, 0x23, 0x4e, - 0x79, 0x9e, 0xdd, 0x0e, 0x61, 0x1c, 0x3d, 0x7e, 0xc4, 0x47, 0xe2, 0x2e, 0x57, 0xb9, 0x53, 0xda, - 0x24, 0x7e, 0x8e, 0x3d, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0xe0, 0x59, 0x0d, 0x56, - 0x1c, 0x00, 0x00, + // 1487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdf, 0x6b, 0x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x10, 0x26, 0x06, 0xd1, 0xbe, 0xac, 0xca, 0x2c, + 0xaa, 0x5e, 0x16, 0x55, 0x79, 0x28, 0x30, 0x8b, 0xea, 0x79, 0xbd, 0xc2, 0xd1, 0x57, 0x8b, 0x78, + 0x16, 0x1e, 0x11, 0x18, 0x6e, 0xda, 0x00, 0xc5, 0x38, 0x05, 0xfd, 0xc8, 0xcf, 0x19, 0x21, 0x63, + 0xbd, 0x22, 0x7e, 0x92, 0x1a, 0x33, 0x65, 0x6e, 0xb9, 0xe6, 0x75, 0x93, 0x97, 0x7d, 0x5d, 0x02, + 0x3f, 0x7a, 0x3a, 0x86, 0x32, 0x27, 0x50, 0xbe, 0xb2, 0x2a, 0x4a, 0x09, 0x20, 0x0a, 0x93, 0x9e, + 0x80, 0x8d, 0x6d, 0xaa, 0x88, 0xf6, 0x85, 0x4f, 0x09, 0xe4, 0x25, 0x41, 0xdb, 0xb2, 0xb8, 0xe1, + 0x45, 0x6b, 0xd6, 0x32, 0x0f, 0x60, 0x04, 0x2f, 0xf1, 0x28, 0x45, 0x56, 0x9a, 0xb4, 0xce, 0x3d, + 0xb7, 0xd6, 0xcf, 0x08, 0xec, 0x4f, 0x85, 0xf2, 0xdf, 0x52, 0xfd, 0xb2, 0x2f, 0xba, 0xc4, 0x34, + 0x2d, 0xac, 0x2f, 0xb8, 0xba, 0xcb, 0x3b, 0x2d, 0xde, 0xdf, 0x03, 0x11, 0x13, 0x42, 0xa3, 0x88, + 0x3a, 0xec, 0x36, 0x03, 0x7d, 0x8a, 0x12, 0x6a, 0xd1, 0xf1, 0x4c, 0xb0, 0x52, 0x0e, 0x26, 0x11, + 0x89, 0x48, 0x1a, 0x89, 0x39, 0x6c, 0x26, 0x2d, 0x77, 0xb3, 0xe4, 0xef, 0x11, 0x38, 0x10, 0x63, + 0xe8, 0x71, 0xb2, 0x9c, 0xba, 0xb3, 0x1e, 0xfa, 0xd1, 0x97, 0x60, 0xdb, 0x22, 0xaf, 0x39, 0xa6, + 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c, + 0xa3, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x48, 0x61, 0x15, 0x26, 0xa4, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2404,18 +2404,16 @@ func (m *QueryChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2493,18 +2491,16 @@ func (m *QueryChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2596,18 +2592,16 @@ func (m *QueryConnectionChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2694,18 +2688,16 @@ func (m *QueryChannelClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2795,18 +2787,16 @@ func (m *QueryChannelConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2898,18 +2888,16 @@ func (m *QueryPacketCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2996,18 +2984,16 @@ func (m *QueryPacketCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -3099,18 +3085,16 @@ func (m *QueryPacketReceiptResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3193,18 +3177,16 @@ func (m *QueryPacketAcknowledgementResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3291,18 +3273,16 @@ func (m *QueryPacketAcknowledgementsResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -3407,18 +3387,16 @@ func (m *QueryUnreceivedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.Sequences) > 0 { dAtA26 := make([]byte, len(m.Sequences)*10) var j25 int @@ -3515,18 +3493,16 @@ func (m *QueryUnreceivedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.Sequences) > 0 { dAtA31 := make([]byte, len(m.Sequences)*10) var j30 int @@ -3605,18 +3581,16 @@ func (m *QueryNextSequenceReceiveResponse) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3674,10 +3648,8 @@ func (m *QueryChannelResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3710,10 +3682,8 @@ func (m *QueryChannelsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3750,10 +3720,8 @@ func (m *QueryConnectionChannelsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3788,10 +3756,8 @@ func (m *QueryChannelClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3836,10 +3802,8 @@ func (m *QueryChannelConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3877,10 +3841,8 @@ func (m *QueryPacketCommitmentResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3921,10 +3883,8 @@ func (m *QueryPacketCommitmentsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3961,10 +3921,8 @@ func (m *QueryPacketReceiptResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4002,10 +3960,8 @@ func (m *QueryPacketAcknowledgementResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4046,10 +4002,8 @@ func (m *QueryPacketAcknowledgementsResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4090,10 +4044,8 @@ func (m *QueryUnreceivedPacketsResponse) Size() (n int) { } n += 1 + sovQuery(uint64(l)) + l } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4134,10 +4086,8 @@ func (m *QueryUnreceivedAcksResponse) Size() (n int) { } n += 1 + sovQuery(uint64(l)) + l } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4171,10 +4121,8 @@ func (m *QueryNextSequenceReceiveResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4429,9 +4377,6 @@ func (m *QueryChannelResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4677,9 +4622,6 @@ func (m *QueryChannelsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4957,9 +4899,6 @@ func (m *QueryConnectionChannelsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5233,9 +5172,6 @@ func (m *QueryChannelClientStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5579,9 +5515,6 @@ func (m *QueryChannelConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5872,9 +5805,6 @@ func (m *QueryPacketCommitmentResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6184,9 +6114,6 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6463,9 +6390,6 @@ func (m *QueryPacketReceiptResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6756,9 +6680,6 @@ func (m *QueryPacketAcknowledgementResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7068,9 +6989,6 @@ func (m *QueryPacketAcknowledgementsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7426,9 +7344,6 @@ func (m *QueryUnreceivedPacketsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7784,9 +7699,6 @@ func (m *QueryUnreceivedAcksResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8043,9 +7955,6 @@ func (m *QueryNextSequenceReceiveResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/04-channel/types/tx.pb.go b/x/ibc/core/04-channel/types/tx.pb.go index caece58be0dc..608f573a7754 100644 --- a/x/ibc/core/04-channel/types/tx.pb.go +++ b/x/ibc/core/04-channel/types/tx.pb.go @@ -111,14 +111,14 @@ var xxx_messageInfo_MsgChannelOpenInitResponse proto.InternalMessageInfo // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // on Chain B. type MsgChannelOpenTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - DesiredChannelId string `protobuf:"bytes,2,opt,name=desired_channel_id,json=desiredChannelId,proto3" json:"desired_channel_id,omitempty" yaml:"desired_channel_id"` - CounterpartyChosenChannelId string `protobuf:"bytes,3,opt,name=counterparty_chosen_channel_id,json=counterpartyChosenChannelId,proto3" json:"counterparty_chosen_channel_id,omitempty" yaml:"counterparty_chosen_channel_id"` - Channel Channel `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel"` - CounterpartyVersion string `protobuf:"bytes,5,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofInit []byte `protobuf:"bytes,6,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight *types.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,8,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + DesiredChannelId string `protobuf:"bytes,2,opt,name=desired_channel_id,json=desiredChannelId,proto3" json:"desired_channel_id,omitempty" yaml:"desired_channel_id"` + CounterpartyChosenChannelId string `protobuf:"bytes,3,opt,name=counterparty_chosen_channel_id,json=counterpartyChosenChannelId,proto3" json:"counterparty_chosen_channel_id,omitempty" yaml:"counterparty_chosen_channel_id"` + Channel Channel `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel"` + CounterpartyVersion string `protobuf:"bytes,5,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofInit []byte `protobuf:"bytes,6,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight types.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,8,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenTry) Reset() { *m = MsgChannelOpenTry{} } @@ -194,13 +194,13 @@ var xxx_messageInfo_MsgChannelOpenTryResponse proto.InternalMessageInfo // MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge // the change of channel state to TRYOPEN on Chain B. type MsgChannelOpenAck struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - CounterpartyChannelId string `protobuf:"bytes,3,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` - CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofTry []byte `protobuf:"bytes,5,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` - ProofHeight *types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyChannelId string `protobuf:"bytes,3,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofTry []byte `protobuf:"bytes,5,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` + ProofHeight types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenAck) Reset() { *m = MsgChannelOpenAck{} } @@ -276,11 +276,11 @@ var xxx_messageInfo_MsgChannelOpenAckResponse proto.InternalMessageInfo // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of channel state to OPEN on Chain A. type MsgChannelOpenConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenConfirm) Reset() { *m = MsgChannelOpenConfirm{} } @@ -434,11 +434,11 @@ var xxx_messageInfo_MsgChannelCloseInitResponse proto.InternalMessageInfo // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // to acknowledge the change of channel state to CLOSED on Chain A. type MsgChannelCloseConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelCloseConfirm) Reset() { *m = MsgChannelCloseConfirm{} } @@ -513,10 +513,10 @@ var xxx_messageInfo_MsgChannelCloseConfirmResponse proto.InternalMessageInfo // MsgRecvPacket receives incoming IBC packet type MsgRecvPacket struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty" yaml:"proof_commitment"` - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty" yaml:"proof_commitment"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} } @@ -591,11 +591,11 @@ var xxx_messageInfo_MsgRecvPacketResponse proto.InternalMessageInfo // MsgTimeout receives timed-out packet type MsgTimeout struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` - ProofHeight *types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeout) Reset() { *m = MsgTimeout{} } @@ -670,12 +670,12 @@ var xxx_messageInfo_MsgTimeoutResponse proto.InternalMessageInfo // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. type MsgTimeoutOnClose struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` - ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` + ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeoutOnClose) Reset() { *m = MsgTimeoutOnClose{} } @@ -750,11 +750,11 @@ var xxx_messageInfo_MsgTimeoutOnCloseResponse proto.InternalMessageInfo // MsgAcknowledgement receives incoming IBC acknowledgement type MsgAcknowledgement struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` - ProofAcked []byte `protobuf:"bytes,3,opt,name=proof_acked,json=proofAcked,proto3" json:"proof_acked,omitempty" yaml:"proof_acked"` - ProofHeight *types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + ProofAcked []byte `protobuf:"bytes,3,opt,name=proof_acked,json=proofAcked,proto3" json:"proof_acked,omitempty" yaml:"proof_acked"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgAcknowledgement) Reset() { *m = MsgAcknowledgement{} } @@ -853,80 +853,80 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0xd6, 0xcd, 0xb2, 0x7d, 0xec, 0x3f, 0x76, 0xe8, 0x9b, 0x42, 0xd9, 0xa2, 0x7f, 0x02, 0x4d, - 0xdc, 0x14, 0x91, 0x62, 0x27, 0x40, 0xdb, 0xa0, 0x1b, 0x4b, 0x40, 0x51, 0x23, 0x30, 0x52, 0x30, - 0x6e, 0x16, 0x41, 0x01, 0x41, 0x1e, 0x4d, 0x28, 0x42, 0xd6, 0x8c, 0x4a, 0x52, 0x8a, 0xf5, 0x06, - 0x5d, 0x74, 0xd1, 0x55, 0x17, 0x5d, 0x65, 0xd7, 0x45, 0x0b, 0xf4, 0x11, 0xba, 0xcd, 0x32, 0x40, - 0x81, 0xb6, 0x2b, 0xa2, 0xb0, 0x37, 0x5d, 0xf3, 0x09, 0x0a, 0x0e, 0x87, 0x17, 0x51, 0x64, 0x4c, - 0xd7, 0x8e, 0xda, 0x95, 0x66, 0xce, 0xf9, 0xe6, 0xcc, 0x99, 0xef, 0x7c, 0x73, 0xa1, 0x60, 0x53, - 0x3b, 0x46, 0x35, 0x44, 0x75, 0x5c, 0x43, 0x9d, 0x16, 0x21, 0xf8, 0xa4, 0x36, 0xdc, 0xad, 0x99, - 0xa7, 0xd5, 0xbe, 0x4e, 0x4d, 0x2a, 0xac, 0x68, 0xc7, 0xa8, 0xea, 0x78, 0xab, 0xdc, 0x5b, 0x1d, - 0xee, 0x8a, 0xab, 0x2a, 0x55, 0x29, 0xf3, 0xd7, 0x9c, 0x96, 0x0b, 0x15, 0xa5, 0x20, 0xd0, 0x89, - 0x86, 0x89, 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3c, 0x9a, 0x5b, 0x35, 0x25, 0x6a, 0x0e, - 0x0a, 0xe3, 0x0c, 0x6c, 0x27, 0x15, 0x86, 0x39, 0xbd, 0xc2, 0xec, 0x3b, 0x9d, 0x7f, 0xf1, 0x74, - 0x76, 0x3f, 0xa1, 0x22, 0x6c, 0x79, 0x64, 0xee, 0xfd, 0x3c, 0x07, 0xf9, 0x43, 0x43, 0x15, 0xba, - 0xb0, 0x14, 0xfd, 0x7c, 0xbc, 0x13, 0x4b, 0xe0, 0xe4, 0xe7, 0x98, 0x58, 0x4b, 0x09, 0xf4, 0x26, - 0x15, 0x3a, 0x70, 0x23, 0xf2, 0xcd, 0x76, 0x3b, 0x45, 0x88, 0x23, 0x7d, 0x24, 0x56, 0xd3, 0xe1, - 0x12, 0x66, 0x72, 0x5e, 0x4c, 0x69, 0x66, 0xda, 0x47, 0xdd, 0x54, 0x33, 0x85, 0x5e, 0x8e, 0x82, - 0x09, 0x42, 0xcc, 0xab, 0xf1, 0x6e, 0x8a, 0x28, 0x1c, 0x2b, 0xee, 0xa5, 0xc7, 0xfa, 0xb3, 0x12, - 0x58, 0x9e, 0x78, 0x60, 0xed, 0x5c, 0x10, 0xc7, 0x47, 0x8a, 0xf7, 0xd3, 0x22, 0xfd, 0xf9, 0x5e, - 0xc2, 0x4a, 0xec, 0xa3, 0x28, 0x4d, 0x20, 0x6f, 0x9d, 0x0f, 0x2e, 0x01, 0xf6, 0x27, 0xfe, 0x12, - 0x20, 0xf4, 0x7a, 0x90, 0x93, 0x42, 0x04, 0x18, 0xf1, 0xee, 0xc5, 0x18, 0x3f, 0xfa, 0x53, 0x98, - 0xf5, 0xee, 0x5c, 0x29, 0x69, 0x18, 0x07, 0x88, 0x77, 0x2e, 0x00, 0x84, 0xb5, 0x17, 0xb9, 0x59, - 0x6e, 0x5f, 0x30, 0x94, 0xe3, 0x92, 0xb5, 0x17, 0x7f, 0x22, 0x3a, 0x9b, 0x37, 0x7a, 0x1a, 0x26, - 0x66, 0x19, 0x01, 0x26, 0x6f, 0xde, 0x84, 0x13, 0xa3, 0xae, 0xbc, 0x3e, 0xab, 0x64, 0xdf, 0x9c, - 0x55, 0xb2, 0x7f, 0x9e, 0x55, 0xb2, 0xdf, 0x9e, 0x57, 0x32, 0x6f, 0xce, 0x2b, 0x99, 0x3f, 0xce, - 0x2b, 0x99, 0xe7, 0x1f, 0xa9, 0x9a, 0xd9, 0x19, 0x1c, 0x57, 0x11, 0xed, 0xd5, 0x10, 0x35, 0x7a, - 0xd4, 0xe0, 0x3f, 0xf7, 0x8c, 0x76, 0xb7, 0x76, 0x5a, 0xf3, 0xff, 0xc8, 0xba, 0xff, 0xf0, 0x9e, - 0xf7, 0x5f, 0x96, 0x39, 0xea, 0x63, 0xe3, 0xb8, 0xc8, 0xfe, 0xc7, 0x7a, 0xf0, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x93, 0xec, 0xca, 0x7c, 0x56, 0x13, 0x00, 0x00, + // 1158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xd6, 0x9f, 0x65, 0x7b, 0xec, 0xc6, 0x0e, 0xfd, 0xa7, 0x50, 0xb6, 0xe8, 0x12, 0x68, 0xe2, + 0xa6, 0x88, 0x14, 0x3b, 0x01, 0xda, 0x06, 0xbd, 0x58, 0x02, 0x8a, 0x1a, 0x81, 0x91, 0x82, 0x71, + 0x7b, 0x30, 0x0a, 0x08, 0xf2, 0x6a, 0x43, 0x11, 0xb2, 0x76, 0x55, 0x92, 0x56, 0xac, 0x37, 0xe8, + 0x31, 0xe7, 0x9e, 0x72, 0xef, 0x21, 0x7d, 0x87, 0x5e, 0x72, 0xcc, 0x2d, 0x45, 0x0f, 0x44, 0x61, + 0x5f, 0x7a, 0xe6, 0x13, 0x14, 0x5c, 0x2e, 0x7f, 0x44, 0x91, 0x31, 0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f, 0xef, 0x25, 0xac, 0xc4, 0x5e, 0x94, + 0xd2, 0x04, 0xf2, 0xd6, 0xf9, 0xe8, 0x1a, 0x60, 0x7f, 0xe2, 0x1f, 0x00, 0x42, 0xb7, 0x09, 0x39, + 0x29, 0x44, 0x80, 0x11, 0xef, 0x5f, 0x8d, 0xf1, 0xa3, 0x3f, 0x87, 0x59, 0xef, 0xfc, 0x95, 0x92, + 0x86, 0x71, 0x80, 0x78, 0xef, 0x0a, 0x40, 0x58, 0x7b, 0x91, 0x13, 0xe6, 0xee, 0x15, 0x43, 0x39, + 0x2e, 0x59, 0x7b, 0xf1, 0x5d, 0xd1, 0xd9, 0xbc, 0xd1, 0x8e, 0x98, 0x98, 0x65, 0x04, 0x98, 0xbc, + 0x79, 0x13, 0x3a, 0x46, 0x5d, 0x79, 0x7b, 0x51, 0xc9, 0xbe, 0xbb, 0xa8, 0x64, 0xff, 0xbc, 0xa8, + 0x64, 0x5f, 0x5d, 0x56, 0x32, 0xef, 0x2e, 0x2b, 0x99, 0xdf, 0x2f, 0x2b, 0x99, 0xe3, 0x2f, 0x54, + 0xcd, 0xec, 0x9c, 0x9d, 0x54, 0x11, 0xed, 0xd5, 0x10, 0x35, 0x7a, 0xd4, 0xe0, 0x3f, 0x0f, 0x8c, + 0x76, 0xb7, 0x76, 0x5e, 0xf3, 0xff, 0xe8, 0x7a, 0xf8, 0xf8, 0x81, 0xf7, 0x5f, 0x97, 0x39, 0xec, + 0x63, 0xe3, 0xa4, 0xc8, 0xfe, 0xe7, 0x7a, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x07, + 0x48, 0xeb, 0x76, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1457,18 +1457,16 @@ func (m *MsgChannelOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.ProofInit) > 0 { i -= len(m.ProofInit) copy(dAtA[i:], m.ProofInit) @@ -1567,18 +1565,16 @@ func (m *MsgChannelOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 if len(m.ProofTry) > 0 { i -= len(m.ProofTry) copy(dAtA[i:], m.ProofTry) @@ -1667,18 +1663,16 @@ func (m *MsgChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.ProofAck) > 0 { i -= len(m.ProofAck) copy(dAtA[i:], m.ProofAck) @@ -1820,18 +1814,16 @@ func (m *MsgChannelCloseConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x2a } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.ProofInit) > 0 { i -= len(m.ProofInit) copy(dAtA[i:], m.ProofInit) @@ -1906,18 +1898,16 @@ func (m *MsgRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ProofCommitment) > 0 { i -= len(m.ProofCommitment) copy(dAtA[i:], m.ProofCommitment) @@ -1993,18 +1983,16 @@ func (m *MsgTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.ProofUnreceived) > 0 { i -= len(m.ProofUnreceived) copy(dAtA[i:], m.ProofUnreceived) @@ -2080,18 +2068,16 @@ func (m *MsgTimeoutOnClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.ProofClose) > 0 { i -= len(m.ProofClose) copy(dAtA[i:], m.ProofClose) @@ -2169,18 +2155,16 @@ func (m *MsgAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.ProofHeight != nil { - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.ProofAcked) > 0 { i -= len(m.ProofAcked) copy(dAtA[i:], m.ProofAcked) @@ -2302,10 +2286,8 @@ func (m *MsgChannelOpenTry) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2348,10 +2330,8 @@ func (m *MsgChannelOpenAck) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2386,10 +2366,8 @@ func (m *MsgChannelOpenConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2454,10 +2432,8 @@ func (m *MsgChannelCloseConfirm) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2486,10 +2462,8 @@ func (m *MsgRecvPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2518,10 +2492,8 @@ func (m *MsgTimeout) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) if m.NextSequenceRecv != 0 { n += 1 + sovTx(uint64(m.NextSequenceRecv)) } @@ -2557,10 +2529,8 @@ func (m *MsgTimeoutOnClose) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) if m.NextSequenceRecv != 0 { n += 1 + sovTx(uint64(m.NextSequenceRecv)) } @@ -2596,10 +2566,8 @@ func (m *MsgAcknowledgement) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProofHeight != nil { - l = m.ProofHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.ProofHeight.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -3110,9 +3078,6 @@ func (m *MsgChannelOpenTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3446,9 +3411,6 @@ func (m *MsgChannelOpenAck) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3718,9 +3680,6 @@ func (m *MsgChannelOpenConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4192,9 +4151,6 @@ func (m *MsgChannelCloseConfirm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4433,9 +4389,6 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4674,9 +4627,6 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4968,9 +4918,6 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5262,9 +5209,6 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ProofHeight == nil { - m.ProofHeight = &types.Height{} - } if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/core/client/query.go b/x/ibc/core/client/query.go index 6ab51c91ac23..dad0c28998fb 100644 --- a/x/ibc/core/client/query.go +++ b/x/ibc/core/client/query.go @@ -21,7 +21,7 @@ import ( // not supported. Queries with a client context height of 0 will perform a query // at the lastest state available. // Issue: https://github.com/cosmos/cosmos-sdk/issues/6567 -func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, *clienttypes.Height, error) { +func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, clienttypes.Height, error) { height := clientCtx.Height // ABCI queries at heights 1, 2 or less than or equal to 0 are not supported. @@ -29,7 +29,7 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, // Therefore, a query at height 2 would be equivalent to a query at height 3. // A height of 0 will query with the lastest state. if height != 0 && height <= 2 { - return nil, nil, &clienttypes.Height{}, fmt.Errorf("proof queries at height <= 2 are not supported") + return nil, nil, clienttypes.Height{}, fmt.Errorf("proof queries at height <= 2 are not supported") } // Use the IAVL height if a valid tendermint height is passed in. @@ -47,19 +47,19 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, res, err := clientCtx.QueryABCI(req) if err != nil { - return nil, nil, &clienttypes.Height{}, err + return nil, nil, clienttypes.Height{}, err } merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) if err != nil { - return nil, nil, &clienttypes.Height{}, err + return nil, nil, clienttypes.Height{}, err } cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) proofBz, err := cdc.MarshalBinaryBare(&merkleProof) if err != nil { - return nil, nil, &clienttypes.Height{}, err + return nil, nil, clienttypes.Height{}, err } version := clienttypes.ParseChainID(clientCtx.ChainID) diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 86a25941e249..d435cf85667a 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -87,7 +87,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { clientID, []clienttypes.ConsensusStateWithHeight{ clienttypes.NewConsensusStateWithHeight( - header.GetHeight().(*clienttypes.Height), + header.GetHeight().(clienttypes.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.AppHash), header.Header.NextValidatorsHash, ), @@ -226,7 +226,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { clientID, []clienttypes.ConsensusStateWithHeight{ clienttypes.NewConsensusStateWithHeight( - header.GetHeight().(*clienttypes.Height), + header.GetHeight().(clienttypes.Height), ibctmtypes.NewConsensusState( header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.AppHash), header.Header.NextValidatorsHash, ), diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index c0ae328890c9..14ee8d96de85 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -36,16 +36,11 @@ func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateCl return nil, err } - anyHeight, err := clienttypes.PackHeight(clientState.GetLatestHeight()) - if err != nil { - return nil, err - } - if err := ctx.EventManager().EmitTypedEvent( &clienttypes.EventCreateClient{ ClientId: msg.ClientId, ClientType: clientState.ClientType(), - ConsensusHeight: anyHeight, + ConsensusHeight: clientState.GetLatestHeight().(clienttypes.Height), }, ); err != nil { return nil, err @@ -120,16 +115,11 @@ func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSu return nil, sdkerrors.Wrap(err, "failed to process misbehaviour for IBC client") } - anyHeight, err := clienttypes.PackHeight(misbehaviour.GetHeight()) - if err != nil { - return nil, err - } - if err := ctx.EventManager().EmitTypedEvent( &clienttypes.EventClientMisbehaviour{ ClientId: msg.ClientId, ClientType: misbehaviour.ClientType(), - ConsensusHeight: anyHeight, + ConsensusHeight: misbehaviour.GetHeight().(clienttypes.Height), }, ); err != nil { return nil, err diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 7c232505e3e1..a5199ba3c9b2 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -628,7 +628,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "successful upgrade", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -668,9 +668,9 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { consAny, err := clienttypes.PackConsensusState(consState) suite.Require().NoError(err) - height, _ := upgradeHeight.(*clienttypes.Height) + height, _ := upgradeHeight.(clienttypes.Height) - msg = &clienttypes.MsgUpgradeClient{ClientId: clientA, ClientState: consAny, UpgradeHeight: height, ProofUpgrade: proofUpgrade, Signer: suite.chainA.SenderAccount.GetAddress().String()} + msg = &clienttypes.MsgUpgradeClient{ClientId: clientA, ClientState: consAny, UpgradeHeight: &height, ProofUpgrade: proofUpgrade, Signer: suite.chainA.SenderAccount.GetAddress().String()} }, expPass: false, }, @@ -678,7 +678,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "VerifyUpgrade fails", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) diff --git a/x/ibc/light-clients/07-tendermint/client/cli/tx.go b/x/ibc/light-clients/07-tendermint/client/cli/tx.go index 78bb6f9c34b5..be2b4c472594 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/tx.go +++ b/x/ibc/light-clients/07-tendermint/client/cli/tx.go @@ -126,7 +126,7 @@ func NewCreateClientCmd() *cobra.Command { return err } - height := header.GetHeight().(*clienttypes.Height) + height := header.GetHeight().(clienttypes.Height) clientState := types.NewClientState( header.GetHeader().GetChainID(), trustLevel, trustingPeriod, ubdPeriod, maxClockDrift, diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 8931108392c1..8cfc849541bc 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -24,7 +24,7 @@ var _ exported.ClientState = (*ClientState)(nil) func NewClientState( chainID string, trustLevel Fraction, trustingPeriod, ubdPeriod, maxClockDrift time.Duration, - latestHeight *clienttypes.Height, specs []*ics23.ProofSpec, + latestHeight clienttypes.Height, specs []*ics23.ProofSpec, upgradePath string, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour bool, ) *ClientState { return &ClientState{ diff --git a/x/ibc/light-clients/07-tendermint/types/header_test.go b/x/ibc/light-clients/07-tendermint/types/header_test.go index 25ad56d57145..2dbba94b97f8 100644 --- a/x/ibc/light-clients/07-tendermint/types/header_test.go +++ b/x/ibc/light-clients/07-tendermint/types/header_test.go @@ -44,7 +44,7 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { header.SignedHeader.Commit = nil }, false}, {"trusted height is greater than header height", func() { - header.TrustedHeight = header.GetHeight().(*clienttypes.Height).Increment() + header.TrustedHeight = header.GetHeight().(clienttypes.Height).Increment() }, false}, {"validator set nil", func() { header.ValidatorSet = nil diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index de16e5dff2af..d4de93504e12 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -94,7 +94,7 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { ) } // Ensure that Heights are the same - if !misbehaviour.Header1.GetHeight().EQ(misbehaviour.Header2.GetHeight()) { + if misbehaviour.Header1.GetHeight() != misbehaviour.Header2.GetHeight() { return sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "headers in misbehaviour are on different heights (%d ≠ %d)", misbehaviour.Header1.GetHeight(), misbehaviour.Header2.GetHeight()) } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index 1a0433ea72ed..b27cc06a45d7 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -67,7 +67,7 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState( return nil, sdkerrors.Wrap(err, "verifying Header2 in Misbehaviour failed") } - cs.FrozenHeight = tmMisbehaviour.GetHeight().(*clienttypes.Height) + cs.FrozenHeight = tmMisbehaviour.GetHeight().(clienttypes.Height) return &cs, nil } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 0b6badcabc1f..6d8cd5e32a8f 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -42,9 +42,9 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { name string clientState exported.ClientState consensusState1 exported.ConsensusState - height1 *clienttypes.Height + height1 clienttypes.Height consensusState2 exported.ConsensusState - height2 *clienttypes.Height + height2 clienttypes.Height misbehaviour exported.Misbehaviour timestamp time.Time expPass bool @@ -218,7 +218,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { "trusted consensus state does not exist", types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), nil, // consensus state for trusted height - 1 does not exist in store - &clienttypes.Height{}, + clienttypes.Height{}, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ diff --git a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go index 1387b8cc39ca..062a29a0dcdb 100644 --- a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go @@ -294,7 +294,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeader() { "header height is not newer than client state", func() { consensusState, found := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(found) - clientState.LatestHeight = header.GetHeight().(*clienttypes.Height) + clientState.LatestHeight = header.GetHeight().(clienttypes.Height) suite.chainA.App.IBCKeeper.ClientKeeper.SetClientConsensusState(suite.chainA.GetContext(), clientA, clientState.GetLatestHeight(), consensusState) }, false, diff --git a/x/ibc/light-clients/07-tendermint/types/store_test.go b/x/ibc/light-clients/07-tendermint/types/store_test.go index ecb6d67ff7ac..3bb267b0fc20 100644 --- a/x/ibc/light-clients/07-tendermint/types/store_test.go +++ b/x/ibc/light-clients/07-tendermint/types/store_test.go @@ -26,7 +26,7 @@ func (suite *TendermintTestSuite) TestGetConsensusState() { { "consensus state not found", func() { // use height with no consensus state set - height = height.(*clienttypes.Height).Increment() + height = height.(clienttypes.Height).Increment() }, false, }, { diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index fa03810dc754..df0967ef0205 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -46,9 +46,9 @@ type ClientState struct { // defines how much new (untrusted) header's Time can drift into the future. MaxClockDrift time.Duration `protobuf:"bytes,5,opt,name=max_clock_drift,json=maxClockDrift,proto3,stdduration" json:"max_clock_drift" yaml:"max_clock_drift"` // Block height when the client was frozen due to a misbehaviour - FrozenHeight *types.Height `protobuf:"bytes,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty" yaml:"frozen_height"` + FrozenHeight types.Height `protobuf:"bytes,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height" yaml:"frozen_height"` // Latest height the client was updated to - LatestHeight *types.Height `protobuf:"bytes,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty" yaml:"latest_height"` + LatestHeight types.Height `protobuf:"bytes,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height" yaml:"latest_height"` // Proof specifications used in verifying counterparty state ProofSpecs []*_go.ProofSpec `protobuf:"bytes,8,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty" yaml:"proof_specs"` // Path at which next upgraded client will be committed @@ -193,7 +193,7 @@ var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo type Header struct { *types2.SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3,embedded=signed_header" json:"signed_header,omitempty" yaml:"signed_header"` ValidatorSet *types2.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` - TrustedHeight *types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height,omitempty" yaml:"trusted_height"` + TrustedHeight types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height" yaml:"trusted_height"` TrustedValidators *types2.ValidatorSet `protobuf:"bytes,4,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` } @@ -237,11 +237,11 @@ func (m *Header) GetValidatorSet() *types2.ValidatorSet { return nil } -func (m *Header) GetTrustedHeight() *types.Height { +func (m *Header) GetTrustedHeight() types.Height { if m != nil { return m.TrustedHeight } - return nil + return types.Height{} } func (m *Header) GetTrustedValidators() *types2.ValidatorSet { @@ -317,75 +317,75 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1078 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x6f, 0xda, 0xd2, 0xa6, 0x93, 0x74, 0x5b, 0xbc, 0xa5, 0x9b, 0x96, 0x12, 0x47, 0x06, 0x2d, - 0x15, 0x52, 0x6d, 0x92, 0x45, 0x42, 0xaa, 0xb8, 0xe0, 0x16, 0xd4, 0x22, 0x56, 0xaa, 0x5c, 0xfe, - 0x08, 0x04, 0x58, 0x13, 0x7b, 0x12, 0x8f, 0x6a, 0x7b, 0x8c, 0x67, 0x12, 0x52, 0x3e, 0x01, 0x1c, - 0x90, 0xf6, 0x84, 0x38, 0x72, 0xe0, 0xc3, 0xec, 0xb1, 0x47, 0x4e, 0x66, 0xd5, 0x7e, 0x83, 0x1c, - 0x39, 0x21, 0xcf, 0x8c, 0xed, 0x49, 0xb6, 0x4b, 0xb5, 0x7b, 0x69, 0xe7, 0xbd, 0xf7, 0x7b, 0xbf, - 0x5f, 0xe6, 0xcd, 0x9b, 0x37, 0x06, 0x16, 0xee, 0x7b, 0x56, 0x88, 0x87, 0x01, 0xf3, 0x42, 0x8c, - 0x62, 0x46, 0x2d, 0x86, 0x62, 0x1f, 0xa5, 0x11, 0x8e, 0x99, 0x35, 0xee, 0x2a, 0x96, 0x99, 0xa4, - 0x84, 0x11, 0xad, 0x8d, 0xfb, 0x9e, 0xa9, 0x26, 0x98, 0x0a, 0x64, 0xdc, 0xdd, 0xed, 0x28, 0xf9, - 0xec, 0x32, 0x41, 0xd4, 0x1a, 0xc3, 0x10, 0xfb, 0x90, 0x91, 0x54, 0x30, 0xec, 0xee, 0x3d, 0x87, - 0xe0, 0x7f, 0x65, 0xf4, 0xbe, 0x47, 0xe2, 0x01, 0x26, 0x56, 0x92, 0x12, 0x32, 0x28, 0x9c, 0xed, - 0x21, 0x21, 0xc3, 0x10, 0x59, 0xdc, 0xea, 0x8f, 0x06, 0x96, 0x3f, 0x4a, 0x21, 0xc3, 0x24, 0x96, - 0x71, 0x7d, 0x3e, 0xce, 0x70, 0x84, 0x28, 0x83, 0x51, 0x52, 0x00, 0xf2, 0x6d, 0x7a, 0x24, 0x45, - 0x96, 0xf8, 0xd5, 0xf9, 0xd6, 0xc4, 0x4a, 0x02, 0xde, 0xad, 0x00, 0x24, 0x8a, 0x30, 0x8b, 0x0a, - 0x50, 0x69, 0x49, 0xe0, 0xd6, 0x90, 0x0c, 0x09, 0x5f, 0x5a, 0xf9, 0x4a, 0x78, 0x8d, 0x67, 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8, 0x0c, 0xd4, 0x8b, 0x47, - 0x55, 0xdb, 0x03, 0x6b, 0xf1, 0x28, 0x42, 0x69, 0x1e, 0xe1, 0xa7, 0xb2, 0xec, 0x54, 0x0e, 0xad, - 0x03, 0x1a, 0x3e, 0x8a, 0x49, 0x84, 0x63, 0x1e, 0x5f, 0xe4, 0x71, 0xd5, 0x65, 0xff, 0xf0, 0xf4, - 0xba, 0x5d, 0xbb, 0xba, 0x6e, 0xd7, 0x9e, 0x5d, 0xb7, 0x6b, 0x4f, 0x6e, 0xda, 0x0b, 0x57, 0x37, - 0xed, 0x85, 0xbf, 0x6f, 0xda, 0x0b, 0xdf, 0x1e, 0x2b, 0xd7, 0xcb, 0x23, 0x34, 0x22, 0x54, 0xfe, - 0x3b, 0xa0, 0xfe, 0x85, 0x35, 0xa9, 0x3e, 0xbf, 0x0e, 0x8a, 0xef, 0xaf, 0xf7, 0x3f, 0x3c, 0x98, - 0xff, 0x40, 0xea, 0xaf, 0xf0, 0x69, 0xf2, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x5b, - 0xe8, 0x82, 0xae, 0x09, 0x00, 0x00, + // 1079 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x6f, 0xda, 0x7e, 0xb7, 0xe9, 0x24, 0xdd, 0xf6, 0xeb, 0x2d, 0xdd, 0xb4, 0x74, 0xe3, 0xc8, + 0xa0, 0xa5, 0x42, 0xaa, 0x4d, 0xb2, 0x48, 0x48, 0x15, 0x17, 0xdc, 0x82, 0x5a, 0xc4, 0x4a, 0x95, + 0xcb, 0x0f, 0x09, 0x09, 0xcc, 0xc4, 0x9e, 0x24, 0xa3, 0xda, 0x1e, 0xe3, 0x99, 0x84, 0x94, 0xbf, + 0x00, 0x0e, 0x48, 0x7b, 0x44, 0x9c, 0x38, 0xf0, 0xc7, 0xec, 0xb1, 0x47, 0x4e, 0x06, 0xb5, 0x17, + 0xce, 0x39, 0x72, 0x42, 0xf3, 0xc3, 0xf6, 0x34, 0xdb, 0xa5, 0x5a, 0x2e, 0xed, 0xbc, 0xf7, 0x3e, + 0xef, 0xf3, 0xc9, 0xbc, 0x79, 0xf3, 0xc6, 0xc0, 0xc1, 0xfd, 0xc0, 0x89, 0xf0, 0x70, 0xc4, 0x82, + 0x08, 0xa3, 0x84, 0x51, 0x87, 0xa1, 0x24, 0x44, 0x59, 0x8c, 0x13, 0xe6, 0x4c, 0xba, 0x9a, 0x65, + 0xa7, 0x19, 0x61, 0xc4, 0x68, 0xe3, 0x7e, 0x60, 0xeb, 0x09, 0xb6, 0x06, 0x99, 0x74, 0x77, 0x3a, + 0x5a, 0x3e, 0xbb, 0x48, 0x11, 0x75, 0x26, 0x30, 0xc2, 0x21, 0x64, 0x24, 0x93, 0x0c, 0x3b, 0xbb, + 0x2f, 0x20, 0xc4, 0x5f, 0x15, 0x7d, 0x10, 0x90, 0x64, 0x80, 0x89, 0x93, 0x66, 0x84, 0x0c, 0x0a, + 0x67, 0x7b, 0x48, 0xc8, 0x30, 0x42, 0x8e, 0xb0, 0xfa, 0xe3, 0x81, 0x13, 0x8e, 0x33, 0xc8, 0x30, + 0x49, 0x54, 0xdc, 0x9c, 0x8f, 0x33, 0x1c, 0x23, 0xca, 0x60, 0x9c, 0x16, 0x00, 0xbe, 0xcd, 0x80, + 0x64, 0xc8, 0x91, 0xbf, 0x9a, 0x6f, 0x4d, 0xae, 0x14, 0xe0, 0xad, 0x0a, 0x40, 0xe2, 0x18, 0xb3, + 0xb8, 0x00, 0x95, 0x96, 0x02, 0x6e, 0x0e, 0xc9, 0x90, 0x88, 0xa5, 0xc3, 0x57, 0xd2, 0x6b, 0xfd, + 0xb5, 0x02, 0x1a, 0x87, 0x82, 0xef, 0x8c, 0x41, 0x86, 0x8c, 0x6d, 0x50, 0x0f, 0x46, 0x10, 0x27, + 0x3e, 0x0e, 0x5b, 0xb5, 0x4e, 0x6d, 0x6f, 0xd5, 0x5b, 0x11, 0xf6, 0x49, 0x68, 0x20, 0xd0, 0x60, + 0xd9, 0x98, 0x32, 0x3f, 0x42, 0x13, 0x14, 0xb5, 0x16, 0x3b, 0xb5, 0xbd, 0x46, 0x6f, 0xcf, 0xfe, + 0xf7, 0xb2, 0xda, 0x1f, 0x65, 0x30, 0xe0, 0x1b, 0x76, 0x77, 0x9e, 0xe7, 0xe6, 0xc2, 0x2c, 0x37, + 0x8d, 0x0b, 0x18, 0x47, 0x07, 0x96, 0x46, 0x65, 0x79, 0x40, 0x58, 0x9f, 0x70, 0xc3, 0x18, 0x80, + 0x75, 0x61, 0xe1, 0x64, 0xe8, 0xa7, 0x28, 0xc3, 0x24, 0x6c, 0x2d, 0x09, 0xa9, 0x6d, 0x5b, 0x16, + 0xcb, 0x2e, 0x8a, 0x65, 0x1f, 0xa9, 0x62, 0xba, 0x96, 0xe2, 0xde, 0xd2, 0xb8, 0xab, 0x7c, 0xeb, + 0xe7, 0x3f, 0xcc, 0x9a, 0x77, 0xbf, 0xf0, 0x9e, 0x0a, 0xa7, 0x81, 0xc1, 0xc6, 0x38, 0xe9, 0x93, + 0x24, 0xd4, 0x84, 0x96, 0xef, 0x12, 0x7a, 0x43, 0x09, 0x3d, 0x94, 0x42, 0xf3, 0x04, 0x52, 0x69, + 0xbd, 0x74, 0x2b, 0x29, 0x04, 0xd6, 0x63, 0x38, 0xf5, 0x83, 0x88, 0x04, 0xe7, 0x7e, 0x98, 0xe1, + 0x01, 0x6b, 0xfd, 0xef, 0x15, 0xb7, 0x34, 0x97, 0x2f, 0x85, 0xd6, 0x62, 0x38, 0x3d, 0xe4, 0xce, + 0x23, 0xee, 0x33, 0xbe, 0x02, 0x6b, 0x83, 0x8c, 0x7c, 0x8f, 0x12, 0x7f, 0x84, 0xf8, 0x81, 0xb4, + 0xee, 0x09, 0x91, 0x1d, 0x71, 0x44, 0xbc, 0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78, 0x44, 0x9c, 0xcc, 0xb2, 0x57, 0x39, + 0x8c, 0x0e, 0x68, 0x84, 0x28, 0x21, 0x31, 0x4e, 0x44, 0x7c, 0x51, 0xc4, 0x75, 0x97, 0xfb, 0xf5, + 0xf3, 0xab, 0x76, 0xed, 0xf2, 0xaa, 0x5d, 0xfb, 0xf3, 0xaa, 0x5d, 0x7b, 0x76, 0xdd, 0x5e, 0xb8, + 0xbc, 0x6e, 0x2f, 0xfc, 0x7e, 0xdd, 0x5e, 0xf8, 0xf2, 0x48, 0xbb, 0x62, 0x01, 0xa1, 0x31, 0xa1, + 0xea, 0xdf, 0x3e, 0x0d, 0xcf, 0x9d, 0x69, 0xf5, 0x29, 0xb6, 0x5f, 0x7c, 0x8b, 0xbd, 0xf3, 0xde, + 0xfe, 0xfc, 0xc7, 0x52, 0xff, 0x9e, 0x98, 0x28, 0x4f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x4c, + 0xb7, 0x2c, 0x8e, 0xba, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -449,30 +449,26 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x42 } } - if m.LatestHeight != nil { - { - size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + { + size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } - if m.FrozenHeight != nil { - { - size, err := m.FrozenHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + { + size, err := m.FrozenHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxClockDrift, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift):]) if err3 != nil { return 0, err3 @@ -651,18 +647,16 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.TrustedHeight != nil { - { - size, err := m.TrustedHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + { + size, err := m.TrustedHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintTendermint(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.ValidatorSet != nil { { size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) @@ -752,14 +746,10 @@ func (m *ClientState) Size() (n int) { n += 1 + l + sovTendermint(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift) n += 1 + l + sovTendermint(uint64(l)) - if m.FrozenHeight != nil { - l = m.FrozenHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) - } - if m.LatestHeight != nil { - l = m.LatestHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) - } + l = m.FrozenHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) + l = m.LatestHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) if len(m.ProofSpecs) > 0 { for _, e := range m.ProofSpecs { l = e.Size() @@ -831,10 +821,8 @@ func (m *Header) Size() (n int) { l = m.ValidatorSet.Size() n += 1 + l + sovTendermint(uint64(l)) } - if m.TrustedHeight != nil { - l = m.TrustedHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) - } + l = m.TrustedHeight.Size() + n += 1 + l + sovTendermint(uint64(l)) if m.TrustedValidators != nil { l = m.TrustedValidators.Size() n += 1 + l + sovTendermint(uint64(l)) @@ -1085,9 +1073,6 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FrozenHeight == nil { - m.FrozenHeight = &types.Height{} - } if err := m.FrozenHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1121,9 +1106,6 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LatestHeight == nil { - m.LatestHeight = &types.Height{} - } if err := m.LatestHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1698,9 +1680,6 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TrustedHeight == nil { - m.TrustedHeight = &types.Height{} - } if err := m.TrustedHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/light-clients/07-tendermint/types/update.go b/x/ibc/light-clients/07-tendermint/types/update.go index 928d2395e65a..50adcb1c1f17 100644 --- a/x/ibc/light-clients/07-tendermint/types/update.go +++ b/x/ibc/light-clients/07-tendermint/types/update.go @@ -168,7 +168,7 @@ func checkValidity( // update the consensus state from a new header func update(clientState *ClientState, header *Header) (*ClientState, *ConsensusState) { - height := header.GetHeight().(*clienttypes.Height) + height := header.GetHeight().(clienttypes.Height) if height.GT(clientState.LatestHeight) { clientState.LatestHeight = height } diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/07-tendermint/types/update_test.go index 33f61c85a845..3a8652ab0672 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/07-tendermint/types/update_test.go @@ -16,7 +16,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { var ( clientState *types.ClientState consensusState *types.ConsensusState - consStateHeight *clienttypes.Height + consStateHeight clienttypes.Height newHeader *types.Header currentTime time.Time ) @@ -57,7 +57,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with next height and same validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -67,7 +67,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with future height and different validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -77,7 +77,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with next height and different validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) currentTime = suite.now @@ -87,7 +87,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update for a previous height", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) consStateHeight = heightMinus3 newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.VersionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) @@ -98,7 +98,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update for a previous version", setup: func() { - clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -108,7 +108,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with incorrect header chain-id", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader("ethermint", int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -118,7 +118,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update to a future version", setup: func() { - clientState = types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -128,7 +128,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header height version and trusted height version mismatch", setup: func() { - clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion1, 3, height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -138,7 +138,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with next height: update header mismatches nextValSetHash", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -148,7 +148,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with next height: update header mismatches different nextValSetHash", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, bothValSet, signers) currentTime = suite.now @@ -158,7 +158,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with future height: too much change in validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, altValSet, suite.valSet, altSigners) currentTime = suite.now @@ -168,7 +168,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful updates, passed in incorrect trusted validators for given consensus state", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) currentTime = suite.now @@ -178,7 +178,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: trusting period has passed since last client timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) // make current time pass trusting period from last timestamp on clientstate @@ -189,7 +189,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header timestamp is past current timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -199,7 +199,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header timestamp is not past last client timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.clientTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -209,7 +209,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "header basic validation failed", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) // cause new header to fail validatebasic by changing commit height to mismatch header height @@ -221,7 +221,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "header height < consensus height", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.VersionNumber, heightPlus5.VersionHeight), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.VersionNumber, heightPlus5.VersionHeight), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) // Make new header at height less than latest client state newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index e0c1ab6f3cde..6bffb19408e6 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -11,7 +11,7 @@ import ( func (suite *TendermintTestSuite) TestVerifyUpgrade() { var ( upgradedClient exported.ClientState - upgradeHeight *clienttypes.Height + upgradeHeight clienttypes.Height clientA string proofUpgrade []byte ) diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index 075aed528d46..32b799fccd39 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -21,7 +21,7 @@ import ( var _ exported.ClientState = (*ClientState)(nil) // NewClientState creates a new ClientState instance -func NewClientState(chainID string, height *clienttypes.Height) *ClientState { +func NewClientState(chainID string, height clienttypes.Height) *ClientState { return &ClientState{ ChainId: chainID, Height: height, diff --git a/x/ibc/light-clients/09-localhost/types/localhost.pb.go b/x/ibc/light-clients/09-localhost/types/localhost.pb.go index b1e0c506f49b..28f7f74d3879 100644 --- a/x/ibc/light-clients/09-localhost/types/localhost.pb.go +++ b/x/ibc/light-clients/09-localhost/types/localhost.pb.go @@ -30,7 +30,7 @@ type ClientState struct { // self chain ID ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` // self latest block height - Height *types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` + Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` } func (m *ClientState) Reset() { *m = ClientState{} } @@ -75,25 +75,25 @@ func init() { } var fileDescriptor_acd9f5b22d41bf6d = []byte{ - // 273 bytes of a gzipped FileDescriptorProto + // 279 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcd, 0x4c, 0x4a, 0xd6, 0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0x49, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x29, 0xd6, 0xcf, 0xc9, 0x4f, 0x4e, 0xcc, 0xc9, 0xc8, 0x2f, 0x2e, 0xd1, 0x2f, 0x33, 0x44, 0x70, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x64, 0x33, 0x93, 0x92, 0xf5, 0x90, 0x95, 0xeb, 0x21, 0x54, 0x94, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x55, 0xea, 0x83, 0x58, 0x10, 0x4d, 0x52, 0xf2, 0x20, 0x3b, 0x92, - 0xf3, 0x8b, 0x52, 0xf5, 0x21, 0x9a, 0x40, 0x06, 0x43, 0x58, 0x10, 0x05, 0x4a, 0xe5, 0x5c, 0xdc, + 0xf3, 0x8b, 0x52, 0xf5, 0x21, 0x9a, 0x40, 0x06, 0x43, 0x58, 0x10, 0x05, 0x4a, 0xb5, 0x5c, 0xdc, 0xce, 0x60, 0x7e, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x1e, 0x17, 0x47, 0x72, 0x46, 0x62, 0x66, 0x5e, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xf0, 0xa7, 0x7b, 0xf2, 0xfc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x30, 0x19, 0xa5, 0x20, 0x76, 0x30, 0xd3, 0x33, 0x45, 0xc8, - 0x88, 0x8b, 0x2d, 0x23, 0x15, 0xe4, 0x26, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, 0x3d, - 0x90, 0x2b, 0x41, 0x16, 0xea, 0x41, 0xad, 0x29, 0x33, 0xd4, 0xf3, 0x00, 0xab, 0x08, 0x82, 0xaa, - 0xb4, 0x62, 0xe9, 0x58, 0x20, 0xcf, 0xe0, 0x14, 0x7b, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, - 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, - 0x72, 0x0c, 0x51, 0xce, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xc9, - 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x42, 0x1f, 0x1e, 0x6c, - 0xba, 0xb0, 0x70, 0x33, 0xb0, 0xd4, 0x45, 0x04, 0x5d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, - 0xd8, 0x7b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xb9, 0x98, 0x4d, 0x65, 0x01, 0x00, - 0x00, + 0x82, 0x8b, 0x2d, 0x23, 0x15, 0xe4, 0x26, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, 0x3d, + 0x90, 0x2b, 0x41, 0x16, 0xea, 0x41, 0xad, 0x29, 0x33, 0xd4, 0xf3, 0x00, 0xab, 0x70, 0x62, 0x39, + 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xde, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x53, 0xec, 0x89, + 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, + 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, + 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0x43, 0x29, 0xdd, 0xe2, 0x94, + 0x6c, 0xfd, 0x0a, 0x7d, 0x78, 0xe0, 0xe9, 0xc2, 0x42, 0xcf, 0xc0, 0x52, 0x17, 0x11, 0x80, 0x25, + 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x4f, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcd, + 0x7d, 0x91, 0x77, 0x6b, 0x01, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -116,18 +116,16 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Height != nil { - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLocalhost(dAtA, i, uint64(size)) + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintLocalhost(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.ChainId) > 0 { i -= len(m.ChainId) copy(dAtA[i:], m.ChainId) @@ -159,10 +157,8 @@ func (m *ClientState) Size() (n int) { if l > 0 { n += 1 + l + sovLocalhost(uint64(l)) } - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovLocalhost(uint64(l)) - } + l = m.Height.Size() + n += 1 + l + sovLocalhost(uint64(l)) return n } @@ -262,9 +258,6 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Height == nil { - m.Height = &types.Height{} - } if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index eb58314551fa..2d3172b938cb 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -173,7 +173,7 @@ func (chain *TestChain) GetContext() sdk.Context { // QueryProof performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryProof(key []byte) ([]byte, *clienttypes.Height) { +func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { res := chain.App.Query(abci.RequestQuery{ Path: fmt.Sprintf("store/%s/key", host.StoreKey), Height: chain.App.LastBlockHeight() - 1, @@ -197,7 +197,7 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, *clienttypes.Height) { // QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, *clienttypes.Height) { +func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) { res := chain.App.Query(abci.RequestQuery{ Path: "store/upgrade/key", Height: int64(height - 1), @@ -234,10 +234,10 @@ func (chain *TestChain) QueryClientStateProof(clientID string) (exported.ClientS // QueryConsensusStateProof performs an abci query for a consensus state // stored on the given clientID. The proof and consensusHeight are returned. -func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, *clienttypes.Height) { +func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) { clientState := chain.GetClientState(clientID) - consensusHeight := clientState.GetLatestHeight().(*clienttypes.Height) + consensusHeight := clientState.GetLatestHeight().(clienttypes.Height) consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) proofConsensus, _ := chain.QueryProof(consensusKey) @@ -417,7 +417,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client switch clientType { case exported.Tendermint: - height := counterparty.LastHeader.GetHeight().(*clienttypes.Height) + height := counterparty.LastHeader.GetHeight().(clienttypes.Height) clientState = ibctmtypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, height, commitmenttypes.GetSDKSpecs(), UpgradePath, false, false, @@ -467,7 +467,7 @@ func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) { header := counterparty.LastHeader // Relayer must query for LatestHeight on client to get TrustedHeight - trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(*clienttypes.Height) + trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(clienttypes.Height) var ( tmTrustedVals *tmtypes.ValidatorSet ok bool @@ -510,12 +510,12 @@ func (chain *TestChain) ExpireClient(amount time.Duration) { // CurrentTMClientHeader creates a TM header using the current header parameters // on the chain. The trusted fields in the header are set to nil. func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header { - return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, &clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) + return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) } // CreateTMClientHeader creates a TM header to update the TM client. Args are passed in to allow // caller flexibility to use params that differ from the chain. -func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight *clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) *ibctmtypes.Header { +func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) *ibctmtypes.Header { var ( valSet *tmproto.ValidatorSet trustedVals *tmproto.ValidatorSet From f3fa0c7ebdf09cf3c4019841f0f9e24d4caed794 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Mon, 30 Nov 2020 17:03:02 +0530 Subject: [PATCH 22/24] Address PR comments --- .../ibc/applications/transfer/v1/event.proto | 47 +- proto/ibc/core/channel/v1/event.proto | 144 +- proto/ibc/core/client/v1/event.proto | 20 +- proto/ibc/core/connection/v1/event.proto | 42 +- x/ibc/applications/transfer/keeper/keeper.go | 5 + x/ibc/applications/transfer/module.go | 58 +- x/ibc/applications/transfer/types/event.pb.go | 1359 +---------------- x/ibc/core/02-client/types/event.pb.go | 67 +- x/ibc/core/03-connection/types/event.pb.go | 70 +- x/ibc/core/04-channel/keeper/packet.go | 3 + x/ibc/core/04-channel/keeper/timeout.go | 1 + x/ibc/core/04-channel/types/event.pb.go | 860 +++++++++-- 12 files changed, 1011 insertions(+), 1665 deletions(-) diff --git a/proto/ibc/applications/transfer/v1/event.proto b/proto/ibc/applications/transfer/v1/event.proto index 3d7b9787635d..03e956e71171 100644 --- a/proto/ibc/applications/transfer/v1/event.proto +++ b/proto/ibc/applications/transfer/v1/event.proto @@ -4,48 +4,6 @@ package ibc.applications.transfer.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; import "gogoproto/gogo.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// EventOnRecvPacket is a typed event emitted on receiving packet -message EventOnRecvPacket { - string receiver = 1; - - string denom = 2; - - uint64 amount = 3; - - bool success = 4; -} - -// EventOnAcknowledgementPacket is a typed event emitted on packet acknowledgement -message EventOnAcknowledgementPacket { - string receiver = 1; - - string denom = 2; - - uint64 amount = 3; - - ibc.core.channel.v1.Acknowledgement acknowledgement = 4 [(gogoproto.nullable) = false]; -} - -// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success -message EventAcknowledgementSuccess { - bytes success = 1; -} - -// EventAcknowledgementError is a typed event emitted on packet acknowledgement error -message EventAcknowledgementError { - string error = 1; -} - -// EventOnTimeoutPacket is a typed event emitted on packet timeout -message EventOnTimeoutPacket { - string refund_receiver = 1; - - string refund_denom = 2; - - uint64 refund_amount = 3; -} // EventTransfer is a typed event emitted on ibc transfer message EventTransfer { @@ -56,7 +14,10 @@ message EventTransfer { // EventDenominationTrace is a typed event for denomination trace message EventDenominationTrace { - bytes trace_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes trace_hash = 1 [ + (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", + (gogoproto.moretags) = "yaml:\"trace_hash\"" + ]; string denom = 2; } diff --git a/proto/ibc/core/channel/v1/event.proto b/proto/ibc/core/channel/v1/event.proto index 5614b7ab9153..25982d17933e 100644 --- a/proto/ibc/core/channel/v1/event.proto +++ b/proto/ibc/core/channel/v1/event.proto @@ -9,80 +9,80 @@ import "ibc/core/client/v1/client.proto"; // EventChannelOpenInit is a typed event emitted on channel open init message EventChannelOpenInit { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelOpenTry is a typed event emitted on channel open try message EventChannelOpenTry { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelOpenAck is a typed event emitted on channel open acknowledgement message EventChannelOpenAck { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelCloseInit is a typed event emitted on channel close init message EventChannelCloseInit { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelOpenConfirm is a typed event emitted on channel open confirm message EventChannelOpenConfirm { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelCloseConfirm is a typed event emitted on channel close confirm message EventChannelCloseConfirm { - string port_id = 1; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_port_id = 3; + string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4; + string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5; + string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // EventChannelSendPacket is a typed event emitted when packet is sent @@ -92,19 +92,19 @@ message EventChannelSendPacket { ibc.core.client.v1.Height timeout_height = 2 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - uint64 timeout_timestamp = 3; + uint64 timeout_timestamp = 3 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; uint64 sequence = 4; - string src_port = 5; + string src_port = 5 [(gogoproto.moretags) = "yaml:\"src_port\""]; - string src_channel = 6; + string src_channel = 6 [(gogoproto.moretags) = "yaml:\"src_channel\""]; - string dst_port = 7; + string dst_port = 7 [(gogoproto.moretags) = "yaml:\"dst_port\""]; - string dst_channel = 8; + string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; - Order channel_ordering = 9; + Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; } // EventChannelRecvPacket is a typed event emitted when packet is received in channel @@ -114,19 +114,21 @@ message EventChannelRecvPacket { ibc.core.client.v1.Height timeout_height = 2 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - uint64 timeout_timestamp = 3; + uint64 timeout_timestamp = 3 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; uint64 sequence = 4; - string src_port = 5; + string src_port = 5 [(gogoproto.moretags) = "yaml:\"src_port\""]; - string src_channel = 6; + string src_channel = 6 [(gogoproto.moretags) = "yaml:\"src_channel\""]; - string dst_port = 7; + string dst_port = 7 [(gogoproto.moretags) = "yaml:\"dst_port\""]; - string dst_channel = 8; + string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; - Order channel_ordering = 9; + Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; + + bool success = 10; } // EventChannelWriteAck is a typed event emitted on write acknowledgement @@ -136,57 +138,73 @@ message EventChannelWriteAck { ibc.core.client.v1.Height timeout_height = 2 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - uint64 timeout_timestamp = 3; + uint64 timeout_timestamp = 3 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; uint64 sequence = 4; - string src_port = 5; + string src_port = 5 [(gogoproto.moretags) = "yaml:\"src_port\""]; - string src_channel = 6; + string src_channel = 6 [(gogoproto.moretags) = "yaml:\"src_channel\""]; - string dst_port = 7; + string dst_port = 7 [(gogoproto.moretags) = "yaml:\"dst_port\""]; - string dst_channel = 8; + string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; bytes acknowledgement = 9; } // EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed message EventChannelAckPacket { - ibc.core.client.v1.Height timeout_height = 1 + bytes data = 1; + + ibc.core.client.v1.Height timeout_height = 2 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - uint64 timeout_timestamp = 2; + uint64 timeout_timestamp = 3 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; - uint64 sequence = 3; + uint64 sequence = 4; + + string src_port = 5 [(gogoproto.moretags) = "yaml:\"src_port\""]; - string src_port = 4; + string src_channel = 6 [(gogoproto.moretags) = "yaml:\"src_channel\""]; - string src_channel = 5; + string dst_port = 7 [(gogoproto.moretags) = "yaml:\"dst_port\""]; - string dst_port = 6; + string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; - string dst_channel = 7; + Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; - Order channel_ordering = 8; + bytes acknowledgement = 10; } // EventChannelTimeoutPacket is a typed event emitted when packet is timeout message EventChannelTimeoutPacket { - ibc.core.client.v1.Height timeout_height = 1 + bytes data = 1; + + ibc.core.client.v1.Height timeout_height = 2 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - uint64 timeout_timestamp = 2; + uint64 timeout_timestamp = 3 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; + + uint64 sequence = 4; - uint64 sequence = 3; + string src_port = 5 [(gogoproto.moretags) = "yaml:\"src_port\""]; - string src_port = 4; + string src_channel = 6 [(gogoproto.moretags) = "yaml:\"src_channel\""]; - string src_channel = 5; + string dst_port = 7 [(gogoproto.moretags) = "yaml:\"dst_port\""]; - string dst_port = 6; + string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; - string dst_channel = 7; + Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; +} + +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +message EventAcknowledgementSuccess { + bytes success = 1; +} - Order channel_ordering = 8; +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +message EventAcknowledgementError { + string error = 1; } diff --git a/proto/ibc/core/client/v1/event.proto b/proto/ibc/core/client/v1/event.proto index 505bee0914ba..9ce191a067ff 100644 --- a/proto/ibc/core/client/v1/event.proto +++ b/proto/ibc/core/client/v1/event.proto @@ -8,9 +8,9 @@ import "ibc/core/client/v1/client.proto"; // EventCreateClient is a typed event emitted on creating client message EventCreateClient { - string client_id = 1; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_type = 2; + string client_type = 2 [(gogoproto.moretags) = "yaml:\"client_type\""]; ibc.core.client.v1.Height consensus_height = 3 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; @@ -18,9 +18,9 @@ message EventCreateClient { // EventUpdateClient is a typed event emitted on updating client message EventUpdateClient { - string client_id = 1; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_type = 2; + string client_type = 2 [(gogoproto.moretags) = "yaml:\"client_type\""]; ibc.core.client.v1.Height consensus_height = 3 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; @@ -28,9 +28,9 @@ message EventUpdateClient { // EventUpgradeClient is a typed event emitted on upgrading client message EventUpgradeClient { - string client_id = 1; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_type = 2; + string client_type = 2 [(gogoproto.moretags) = "yaml:\"client_type\""]; ibc.core.client.v1.Height consensus_height = 3 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; @@ -38,9 +38,9 @@ message EventUpgradeClient { // EventUpdateClientProposal is a typed event emitted on updating client proposal message EventUpdateClientProposal { - string client_id = 1; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_type = 2; + string client_type = 2 [(gogoproto.moretags) = "yaml:\"client_type\""]; ibc.core.client.v1.Height consensus_height = 3 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; @@ -48,9 +48,9 @@ message EventUpdateClientProposal { // EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted message EventClientMisbehaviour { - string client_id = 1; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_type = 2; + string client_type = 2 [(gogoproto.moretags) = "yaml:\"client_type\""]; ibc.core.client.v1.Height consensus_height = 3 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; diff --git a/proto/ibc/core/connection/v1/event.proto b/proto/ibc/core/connection/v1/event.proto index 3738a22d0b42..4393eb53dd7f 100644 --- a/proto/ibc/core/connection/v1/event.proto +++ b/proto/ibc/core/connection/v1/event.proto @@ -3,46 +3,48 @@ package ibc.core.connection.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +import "gogoproto/gogo.proto"; + // EventConnectionOpenInit is a typed event emitted on connection open init message EventConnectionOpenInit { - string connection_id = 1; - - string client_id = 2; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string counterparty_connection_id = 3; + string counterparty_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string counterparty_client_id = 4; + string counterparty_client_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_client_id\""]; } // EventConnectionOpenTry is a typed event emitted on connection open try message EventConnectionOpenTry { - string connection_id = 1; - - string client_id = 2; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string counterparty_connection_id = 3; + string counterparty_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string counterparty_client_id = 4; + string counterparty_client_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_client_id\""]; } // EventConnectionOpenAck is a typed event emitted on connection open acknowledgement message EventConnectionOpenAck { - string connection_id = 1; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string client_id = 2; + string counterparty_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string counterparty_connection_id = 3; - - string counterparty_client_id = 4; + string counterparty_client_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_client_id\""]; } // EventConnectionOpenConfirm is a typed event emitted on connection open init message EventConnectionOpenConfirm { - string connection_id = 1; - - string client_id = 2; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string counterparty_connection_id = 3; + string counterparty_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string counterparty_client_id = 4; + string counterparty_client_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_client_id\""]; } diff --git a/x/ibc/applications/transfer/keeper/keeper.go b/x/ibc/applications/transfer/keeper/keeper.go index e1149ef9be49..eea9cb28da6c 100644 --- a/x/ibc/applications/transfer/keeper/keeper.go +++ b/x/ibc/applications/transfer/keeper/keeper.go @@ -169,3 +169,8 @@ func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Cap func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { return k.scopedKeeper.ClaimCapability(ctx, cap, name) } + +// GetChannel returns a channel with a particular identifier binded to a specific port +func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channeltypes.Channel, bool) { + return k.channelKeeper.GetChannel(ctx, portID, channelID) +} diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 33089c568d38..a5c54145999e 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -25,6 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper" "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/simulation" "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" + clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" @@ -317,14 +318,23 @@ func (am AppModule) OnRecvPacket( acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) } + channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) + err = ctx.EventManager().EmitTypedEvent( - &types.EventOnRecvPacket{ - Receiver: data.Receiver, - Denom: data.Denom, - Amount: data.Amount, - Success: err != nil, + &channeltypes.EventChannelRecvPacket{ + Data: packet.GetData(), + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + Success: err != nil, }, ) + if err != nil { acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) } @@ -354,12 +364,20 @@ func (am AppModule) OnAcknowledgementPacket( return nil, err } + channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) + if err := ctx.EventManager().EmitTypedEvent( - &types.EventOnAcknowledgementPacket{ - Receiver: data.Receiver, - Denom: data.Denom, - Amount: data.Amount, - Acknowledgement: ack, + &channeltypes.EventChannelAckPacket{ + Data: packet.GetData(), + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, + Acknowledgement: acknowledgement, }, ); err != nil { return nil, err @@ -368,7 +386,7 @@ func (am AppModule) OnAcknowledgementPacket( switch resp := ack.Response.(type) { case *channeltypes.Acknowledgement_Result: if err := ctx.EventManager().EmitTypedEvent( - &types.EventAcknowledgementSuccess{ + &channeltypes.EventAcknowledgementSuccess{ Success: resp.Result, }, ); err != nil { @@ -376,7 +394,7 @@ func (am AppModule) OnAcknowledgementPacket( } case *channeltypes.Acknowledgement_Error: if err := ctx.EventManager().EmitTypedEvent( - &types.EventAcknowledgementError{ + &channeltypes.EventAcknowledgementError{ Error: resp.Error, }, ); err != nil { @@ -403,11 +421,19 @@ func (am AppModule) OnTimeoutPacket( return nil, err } + channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) + if err := ctx.EventManager().EmitTypedEvent( - &types.EventOnTimeoutPacket{ - RefundReceiver: data.Sender, - RefundDenom: data.Denom, - RefundAmount: data.Amount, + &channeltypes.EventChannelTimeoutPacket{ + Data: packet.GetData(), + TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), + TimeoutTimestamp: packet.GetTimeoutTimestamp(), + Sequence: packet.GetSequence(), + SrcPort: packet.GetSourcePort(), + SrcChannel: packet.GetSourceChannel(), + DstPort: packet.GetDestPort(), + DstChannel: packet.GetDestChannel(), + ChannelOrdering: channel.Ordering, }, ); err != nil { return nil, err diff --git a/x/ibc/applications/transfer/types/event.pb.go b/x/ibc/applications/transfer/types/event.pb.go index d3fc228b025b..359459b5569f 100644 --- a/x/ibc/applications/transfer/types/event.pb.go +++ b/x/ibc/applications/transfer/types/event.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" @@ -25,295 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// EventOnRecvPacket is a typed event emitted on receiving packet -type EventOnRecvPacket struct { - Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *EventOnRecvPacket) Reset() { *m = EventOnRecvPacket{} } -func (m *EventOnRecvPacket) String() string { return proto.CompactTextString(m) } -func (*EventOnRecvPacket) ProtoMessage() {} -func (*EventOnRecvPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{0} -} -func (m *EventOnRecvPacket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventOnRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventOnRecvPacket.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 *EventOnRecvPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventOnRecvPacket.Merge(m, src) -} -func (m *EventOnRecvPacket) XXX_Size() int { - return m.Size() -} -func (m *EventOnRecvPacket) XXX_DiscardUnknown() { - xxx_messageInfo_EventOnRecvPacket.DiscardUnknown(m) -} - -var xxx_messageInfo_EventOnRecvPacket proto.InternalMessageInfo - -func (m *EventOnRecvPacket) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *EventOnRecvPacket) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *EventOnRecvPacket) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *EventOnRecvPacket) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -// EventOnAcknowledgementPacket is a typed event emitted on packet acknowledgement -type EventOnAcknowledgementPacket struct { - Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - Acknowledgement types.Acknowledgement `protobuf:"bytes,4,opt,name=acknowledgement,proto3" json:"acknowledgement"` -} - -func (m *EventOnAcknowledgementPacket) Reset() { *m = EventOnAcknowledgementPacket{} } -func (m *EventOnAcknowledgementPacket) String() string { return proto.CompactTextString(m) } -func (*EventOnAcknowledgementPacket) ProtoMessage() {} -func (*EventOnAcknowledgementPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{1} -} -func (m *EventOnAcknowledgementPacket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventOnAcknowledgementPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventOnAcknowledgementPacket.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 *EventOnAcknowledgementPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventOnAcknowledgementPacket.Merge(m, src) -} -func (m *EventOnAcknowledgementPacket) XXX_Size() int { - return m.Size() -} -func (m *EventOnAcknowledgementPacket) XXX_DiscardUnknown() { - xxx_messageInfo_EventOnAcknowledgementPacket.DiscardUnknown(m) -} - -var xxx_messageInfo_EventOnAcknowledgementPacket proto.InternalMessageInfo - -func (m *EventOnAcknowledgementPacket) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *EventOnAcknowledgementPacket) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *EventOnAcknowledgementPacket) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *EventOnAcknowledgementPacket) GetAcknowledgement() types.Acknowledgement { - if m != nil { - return m.Acknowledgement - } - return types.Acknowledgement{} -} - -// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success -type EventAcknowledgementSuccess struct { - Success []byte `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *EventAcknowledgementSuccess) Reset() { *m = EventAcknowledgementSuccess{} } -func (m *EventAcknowledgementSuccess) String() string { return proto.CompactTextString(m) } -func (*EventAcknowledgementSuccess) ProtoMessage() {} -func (*EventAcknowledgementSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{2} -} -func (m *EventAcknowledgementSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAcknowledgementSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAcknowledgementSuccess.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 *EventAcknowledgementSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAcknowledgementSuccess.Merge(m, src) -} -func (m *EventAcknowledgementSuccess) XXX_Size() int { - return m.Size() -} -func (m *EventAcknowledgementSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_EventAcknowledgementSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAcknowledgementSuccess proto.InternalMessageInfo - -func (m *EventAcknowledgementSuccess) GetSuccess() []byte { - if m != nil { - return m.Success - } - return nil -} - -// EventAcknowledgementError is a typed event emitted on packet acknowledgement error -type EventAcknowledgementError struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *EventAcknowledgementError) Reset() { *m = EventAcknowledgementError{} } -func (m *EventAcknowledgementError) String() string { return proto.CompactTextString(m) } -func (*EventAcknowledgementError) ProtoMessage() {} -func (*EventAcknowledgementError) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{3} -} -func (m *EventAcknowledgementError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAcknowledgementError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAcknowledgementError.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 *EventAcknowledgementError) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAcknowledgementError.Merge(m, src) -} -func (m *EventAcknowledgementError) XXX_Size() int { - return m.Size() -} -func (m *EventAcknowledgementError) XXX_DiscardUnknown() { - xxx_messageInfo_EventAcknowledgementError.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAcknowledgementError proto.InternalMessageInfo - -func (m *EventAcknowledgementError) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -// EventOnTimeoutPacket is a typed event emitted on packet timeout -type EventOnTimeoutPacket struct { - RefundReceiver string `protobuf:"bytes,1,opt,name=refund_receiver,json=refundReceiver,proto3" json:"refund_receiver,omitempty"` - RefundDenom string `protobuf:"bytes,2,opt,name=refund_denom,json=refundDenom,proto3" json:"refund_denom,omitempty"` - RefundAmount uint64 `protobuf:"varint,3,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount,omitempty"` -} - -func (m *EventOnTimeoutPacket) Reset() { *m = EventOnTimeoutPacket{} } -func (m *EventOnTimeoutPacket) String() string { return proto.CompactTextString(m) } -func (*EventOnTimeoutPacket) ProtoMessage() {} -func (*EventOnTimeoutPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{4} -} -func (m *EventOnTimeoutPacket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventOnTimeoutPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventOnTimeoutPacket.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 *EventOnTimeoutPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventOnTimeoutPacket.Merge(m, src) -} -func (m *EventOnTimeoutPacket) XXX_Size() int { - return m.Size() -} -func (m *EventOnTimeoutPacket) XXX_DiscardUnknown() { - xxx_messageInfo_EventOnTimeoutPacket.DiscardUnknown(m) -} - -var xxx_messageInfo_EventOnTimeoutPacket proto.InternalMessageInfo - -func (m *EventOnTimeoutPacket) GetRefundReceiver() string { - if m != nil { - return m.RefundReceiver - } - return "" -} - -func (m *EventOnTimeoutPacket) GetRefundDenom() string { - if m != nil { - return m.RefundDenom - } - return "" -} - -func (m *EventOnTimeoutPacket) GetRefundAmount() uint64 { - if m != nil { - return m.RefundAmount - } - return 0 -} - // EventTransfer is a typed event emitted on ibc transfer type EventTransfer struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` @@ -324,7 +34,7 @@ func (m *EventTransfer) Reset() { *m = EventTransfer{} } func (m *EventTransfer) String() string { return proto.CompactTextString(m) } func (*EventTransfer) ProtoMessage() {} func (*EventTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{5} + return fileDescriptor_c490d680aa16af7e, []int{0} } func (m *EventTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -369,7 +79,7 @@ func (m *EventTransfer) GetReceiver() string { // EventDenominationTrace is a typed event for denomination trace type EventDenominationTrace struct { - TraceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=trace_hash,json=traceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"trace_hash,omitempty"` + TraceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=trace_hash,json=traceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"trace_hash,omitempty" yaml:"trace_hash"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } @@ -377,7 +87,7 @@ func (m *EventDenominationTrace) Reset() { *m = EventDenominationTrace{} func (m *EventDenominationTrace) String() string { return proto.CompactTextString(m) } func (*EventDenominationTrace) ProtoMessage() {} func (*EventDenominationTrace) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{6} + return fileDescriptor_c490d680aa16af7e, []int{1} } func (m *EventDenominationTrace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -421,11 +131,6 @@ func (m *EventDenominationTrace) GetDenom() string { } func init() { - proto.RegisterType((*EventOnRecvPacket)(nil), "ibc.applications.transfer.v1.EventOnRecvPacket") - proto.RegisterType((*EventOnAcknowledgementPacket)(nil), "ibc.applications.transfer.v1.EventOnAcknowledgementPacket") - proto.RegisterType((*EventAcknowledgementSuccess)(nil), "ibc.applications.transfer.v1.EventAcknowledgementSuccess") - proto.RegisterType((*EventAcknowledgementError)(nil), "ibc.applications.transfer.v1.EventAcknowledgementError") - proto.RegisterType((*EventOnTimeoutPacket)(nil), "ibc.applications.transfer.v1.EventOnTimeoutPacket") proto.RegisterType((*EventTransfer)(nil), "ibc.applications.transfer.v1.EventTransfer") proto.RegisterType((*EventDenominationTrace)(nil), "ibc.applications.transfer.v1.EventDenominationTrace") } @@ -435,42 +140,30 @@ func init() { } var fileDescriptor_c490d680aa16af7e = []byte{ - // 512 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6f, 0xd3, 0x3e, - 0x14, 0xc7, 0x9b, 0xfd, 0xfa, 0x1b, 0x9b, 0xb7, 0x31, 0x11, 0x55, 0x53, 0x29, 0x53, 0xd6, 0x15, - 0x24, 0x7a, 0x21, 0x56, 0x01, 0x09, 0x4e, 0x48, 0x2b, 0x4c, 0xda, 0x0d, 0x14, 0x2a, 0x81, 0xb8, - 0x4c, 0x8e, 0xf3, 0xd6, 0x58, 0x6d, 0xec, 0xca, 0x76, 0xb2, 0xed, 0x2f, 0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a, 0x38, 0x65, 0xb1, 0xc2, 0xf1, 0xa5, - 0x06, 0x15, 0x9e, 0xc0, 0xc5, 0xd0, 0x04, 0xd1, 0xa6, 0xad, 0x75, 0x42, 0x54, 0x7a, 0xf7, 0x95, - 0x19, 0x7e, 0xbe, 0x9a, 0x07, 0xde, 0xf5, 0x3c, 0xf0, 0x7e, 0xce, 0x03, 0xef, 0xdb, 0x22, 0x68, - 0x5c, 0x2f, 0x82, 0xc6, 0x8f, 0x45, 0xd0, 0xf8, 0xf2, 0xa6, 0x66, 0x48, 0x85, 0xca, 0x84, 0x72, - 0x9f, 0x67, 0x2a, 0x99, 0xe0, 0x0b, 0xfc, 0xf7, 0x87, 0xab, 0x2f, 0x67, 0xa0, 0xe2, 0x75, 0xfb, - 0xbe, 0x5e, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xcd, 0x4b, 0x11, 0xe2, 0x03, 0x00, 0x00, + // 310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4b, 0x3b, 0x31, + 0x18, 0xc6, 0x9b, 0x3f, 0xfc, 0x8b, 0x0d, 0x3a, 0x78, 0x94, 0x52, 0x8a, 0xa4, 0x72, 0x53, 0x17, + 0x13, 0x8a, 0x4e, 0x0e, 0x0e, 0x55, 0xa1, 0x8b, 0x4b, 0xe9, 0x20, 0x2e, 0x92, 0xa4, 0xaf, 0xbd, + 0xe0, 0x5d, 0x72, 0x24, 0xf1, 0x68, 0xbf, 0x85, 0x1f, 0xc0, 0x0f, 0xe4, 0xd8, 0xd1, 0xa9, 0x48, + 0xfb, 0x0d, 0x1c, 0x9d, 0xe4, 0xd2, 0x53, 0x6f, 0x71, 0xca, 0xf3, 0xf0, 0x3e, 0xf9, 0x3d, 0x2f, + 0x2f, 0x1e, 0x28, 0x21, 0x19, 0xcf, 0xf3, 0x54, 0x49, 0xee, 0x95, 0xd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0xa8, 0x15, 0x4a, 0xe3, 0x32, 0xe3, 0xaa, 0xe7, 0xc4, 0xcd, 0x1e, 0xd9, 0x82, 0xfd, 0x7d, 0x7a, + 0xbf, 0xcc, 0xc1, 0x89, 0x66, 0x38, 0xe2, 0xe9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0xea, + 0xae, 0x19, 0xa4, 0x01, 0x00, 0x00, } -func (m *EventOnRecvPacket) Marshal() (dAtA []byte, err error) { +func (m *EventTransfer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -480,49 +173,34 @@ func (m *EventOnRecvPacket) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventOnRecvPacket) MarshalTo(dAtA []byte) (int, error) { +func (m *EventTransfer) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventOnRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Amount != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } if len(m.Receiver) > 0 { i -= len(m.Receiver) copy(dAtA[i:], m.Receiver) i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *EventOnAcknowledgementPacket) Marshal() (dAtA []byte, err error) { +func (m *EventDenominationTrace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -532,31 +210,16 @@ func (m *EventOnAcknowledgementPacket) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventOnAcknowledgementPacket) MarshalTo(dAtA []byte) (int, error) { +func (m *EventDenominationTrace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventOnAcknowledgementPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventDenominationTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Acknowledgement.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Amount != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 - } if len(m.Denom) > 0 { i -= len(m.Denom) copy(dAtA[i:], m.Denom) @@ -564,309 +227,42 @@ func (m *EventOnAcknowledgementPacket) MarshalToSizedBuffer(dAtA []byte) (int, e i-- dAtA[i] = 0x12 } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + if len(m.TraceHash) > 0 { + i -= len(m.TraceHash) + copy(dAtA[i:], m.TraceHash) + i = encodeVarintEvent(dAtA, i, uint64(len(m.TraceHash))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *EventAcknowledgementSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +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++ } - return dAtA[:n], nil -} - -func (m *EventAcknowledgementSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *EventAcknowledgementSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *EventTransfer) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Success) > 0 { - i -= len(m.Success) - copy(dAtA[i:], m.Success) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Success))) - i-- - dAtA[i] = 0xa + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *EventAcknowledgementError) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) } - return dAtA[:n], nil -} - -func (m *EventAcknowledgementError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAcknowledgementError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventOnTimeoutPacket) 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 *EventOnTimeoutPacket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventOnTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RefundAmount != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.RefundAmount)) - i-- - dAtA[i] = 0x18 - } - if len(m.RefundDenom) > 0 { - i -= len(m.RefundDenom) - copy(dAtA[i:], m.RefundDenom) - i = encodeVarintEvent(dAtA, i, uint64(len(m.RefundDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.RefundReceiver) > 0 { - i -= len(m.RefundReceiver) - copy(dAtA[i:], m.RefundReceiver) - i = encodeVarintEvent(dAtA, i, uint64(len(m.RefundReceiver))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDenominationTrace) 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 *EventDenominationTrace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDenominationTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceHash) > 0 { - i -= len(m.TraceHash) - copy(dAtA[i:], m.TraceHash) - i = encodeVarintEvent(dAtA, i, uint64(len(m.TraceHash))) - 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 *EventOnRecvPacket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEvent(uint64(m.Amount)) - } - if m.Success { - n += 2 - } - return n -} - -func (m *EventOnAcknowledgementPacket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEvent(uint64(m.Amount)) - } - l = m.Acknowledgement.Size() - n += 1 + l + sovEvent(uint64(l)) - return n -} - -func (m *EventAcknowledgementSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Success) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - -func (m *EventAcknowledgementError) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - -func (m *EventOnTimeoutPacket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RefundReceiver) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.RefundDenom) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - if m.RefundAmount != 0 { - n += 1 + sovEvent(uint64(m.RefundAmount)) - } - return n -} - -func (m *EventTransfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n + return n } func (m *EventDenominationTrace) Size() (n int) { @@ -892,639 +288,6 @@ func sovEvent(x uint64) (n int) { func sozEvent(x uint64) (n int) { return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *EventOnRecvPacket) 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: EventOnRecvPacket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventOnRecvPacket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventOnAcknowledgementPacket) 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: EventOnAcknowledgementPacket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventOnAcknowledgementPacket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Acknowledgement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAcknowledgementSuccess) 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: EventAcknowledgementSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAcknowledgementSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Success = append(m.Success[:0], dAtA[iNdEx:postIndex]...) - if m.Success == nil { - m.Success = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAcknowledgementError) 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: EventAcknowledgementError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAcknowledgementError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventOnTimeoutPacket) 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: EventOnTimeoutPacket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventOnTimeoutPacket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RefundReceiver", 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.RefundReceiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RefundDenom", 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.RefundDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RefundAmount", wireType) - } - m.RefundAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RefundAmount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *EventTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ibc/core/02-client/types/event.pb.go b/x/ibc/core/02-client/types/event.pb.go index da51540490ff..b9ee84d9a403 100644 --- a/x/ibc/core/02-client/types/event.pb.go +++ b/x/ibc/core/02-client/types/event.pb.go @@ -25,8 +25,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventCreateClient is a typed event emitted on creating client type EventCreateClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" yaml:"client_type"` ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } @@ -86,8 +86,8 @@ func (m *EventCreateClient) GetConsensusHeight() Height { // EventUpdateClient is a typed event emitted on updating client type EventUpdateClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" yaml:"client_type"` ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } @@ -147,8 +147,8 @@ func (m *EventUpdateClient) GetConsensusHeight() Height { // EventUpgradeClient is a typed event emitted on upgrading client type EventUpgradeClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" yaml:"client_type"` ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } @@ -208,8 +208,8 @@ func (m *EventUpgradeClient) GetConsensusHeight() Height { // EventUpdateClientProposal is a typed event emitted on updating client proposal type EventUpdateClientProposal struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" yaml:"client_type"` ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } @@ -269,8 +269,8 @@ func (m *EventUpdateClientProposal) GetConsensusHeight() Height { // EventClientMisbehaviour is a typed event emitted when misbehaviour is submitted type EventClientMisbehaviour struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" yaml:"client_type"` ConsensusHeight Height `protobuf:"bytes,3,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` } @@ -339,29 +339,30 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/event.proto", fileDescriptor_184b5eb6564931c0) } var fileDescriptor_184b5eb6564931c0 = []byte{ - // 346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x4c, 0x4a, 0xd6, - 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, - 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xca, 0x4c, 0x4a, 0xd6, - 0x03, 0xc9, 0xeb, 0x41, 0xe4, 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xd2, - 0xfa, 0x20, 0x16, 0x44, 0xa5, 0x94, 0x3c, 0x16, 0x93, 0xa0, 0x7a, 0xc0, 0x0a, 0x94, 0x76, 0x32, - 0x72, 0x09, 0xba, 0x82, 0x8c, 0x76, 0x2e, 0x4a, 0x4d, 0x2c, 0x49, 0x75, 0x06, 0xcb, 0x09, 0x49, - 0x73, 0x71, 0x42, 0x54, 0xc5, 0x67, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x71, 0x40, - 0x04, 0x3c, 0x53, 0x84, 0xe4, 0xb9, 0xb8, 0xa1, 0x92, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x4c, 0x60, - 0x69, 0x2e, 0x88, 0x50, 0x48, 0x65, 0x41, 0xaa, 0x50, 0x1a, 0x97, 0x40, 0x72, 0x7e, 0x5e, 0x71, - 0x6a, 0x5e, 0x71, 0x69, 0x71, 0x7c, 0x46, 0x6a, 0x66, 0x7a, 0x46, 0x89, 0x04, 0xb3, 0x02, 0xa3, - 0x06, 0xb7, 0x91, 0x94, 0x1e, 0xa6, 0xcb, 0xf5, 0x3c, 0xc0, 0x2a, 0x9c, 0xe4, 0x4f, 0xdc, 0x93, - 0x67, 0xf8, 0x74, 0x4f, 0x5e, 0xbc, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0xdd, 0x04, 0xa5, 0x20, - 0x7e, 0xb8, 0x10, 0x44, 0x07, 0xc2, 0xed, 0xa1, 0x05, 0x29, 0x43, 0xcd, 0xed, 0xbb, 0x18, 0xb9, - 0x84, 0xa0, 0x6e, 0x4f, 0x2f, 0x4a, 0x4c, 0x19, 0x5a, 0x8e, 0x3f, 0xc8, 0xc8, 0x25, 0x89, 0x11, - 0xf0, 0x01, 0x45, 0xf9, 0x05, 0xf9, 0xc5, 0x89, 0x39, 0x43, 0xc4, 0x0f, 0xfb, 0x19, 0xb9, 0xc4, - 0x21, 0x09, 0x1f, 0x6c, 0x96, 0x6f, 0x66, 0x71, 0x52, 0x6a, 0x46, 0x62, 0x59, 0x66, 0x7e, 0x69, - 0xd1, 0xd0, 0xf0, 0x81, 0x53, 0xe0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, - 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, - 0x99, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0xe7, 0x17, 0xe7, - 0xe6, 0x17, 0x43, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0x7d, 0x78, 0xa1, 0x60, 0x60, 0xa4, - 0x0b, 0x2d, 0x17, 0x40, 0x7e, 0x29, 0x4e, 0x62, 0x03, 0x17, 0x0a, 0xc6, 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x56, 0x7e, 0xbe, 0x9f, 0x81, 0x04, 0x00, 0x00, + // 367 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcd, 0x4a, 0xeb, 0x40, + 0x14, 0xc7, 0x33, 0xf7, 0xc2, 0xe5, 0x76, 0xba, 0xb8, 0xbd, 0xa1, 0xd8, 0xda, 0x45, 0x52, 0xb2, + 0xea, 0xa6, 0x33, 0xb6, 0x2e, 0x0a, 0x2e, 0x5b, 0x04, 0x5d, 0x08, 0x5a, 0x74, 0xe3, 0xa6, 0x24, + 0x93, 0x31, 0x19, 0x6c, 0x33, 0x21, 0x33, 0x0d, 0xf6, 0x2d, 0x7c, 0xac, 0x2e, 0xbb, 0x74, 0x15, + 0xa4, 0x5d, 0xe8, 0x46, 0x84, 0x3e, 0x81, 0x64, 0x26, 0x54, 0xb4, 0x3e, 0x41, 0x56, 0x39, 0x39, + 0xff, 0x0f, 0xf8, 0x11, 0x72, 0xa0, 0xc5, 0x3c, 0x82, 0x09, 0x4f, 0x28, 0x26, 0x53, 0x46, 0x23, + 0x89, 0xd3, 0x1e, 0xa6, 0x29, 0x8d, 0x24, 0x8a, 0x13, 0x2e, 0xb9, 0x69, 0x32, 0x8f, 0xa0, 0x5c, + 0x47, 0x5a, 0x47, 0x69, 0xaf, 0x55, 0x0f, 0x78, 0xc0, 0x95, 0x8c, 0xf3, 0x49, 0x3b, 0x5b, 0xf6, + 0x0f, 0x4d, 0x45, 0x46, 0x19, 0x9c, 0x17, 0x00, 0xff, 0x9f, 0xe6, 0xd5, 0xa3, 0x84, 0xba, 0x92, + 0x8e, 0x94, 0x66, 0xf6, 0x60, 0x45, 0xbb, 0x26, 0xcc, 0x6f, 0x82, 0x36, 0xe8, 0x54, 0x86, 0xf5, + 0x6d, 0x66, 0xd7, 0x16, 0xee, 0x6c, 0x7a, 0xe2, 0xec, 0x24, 0x67, 0xfc, 0x57, 0xcf, 0xe7, 0xbe, + 0x39, 0x80, 0xd5, 0x62, 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 0x14, 0x67, 0x05, 0x00, 0x00, } func (m *EventCreateClient) Marshal() (dAtA []byte, err error) { diff --git a/x/ibc/core/03-connection/types/event.pb.go b/x/ibc/core/03-connection/types/event.pb.go index 92022a7b48bb..0d28a0d4a8cd 100644 --- a/x/ibc/core/03-connection/types/event.pb.go +++ b/x/ibc/core/03-connection/types/event.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -24,10 +25,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventConnectionOpenInit is a typed event emitted on connection open init type EventConnectionOpenInit struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` - CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` } func (m *EventConnectionOpenInit) Reset() { *m = EventConnectionOpenInit{} } @@ -93,10 +94,10 @@ func (m *EventConnectionOpenInit) GetCounterpartyClientId() string { // EventConnectionOpenTry is a typed event emitted on connection open try type EventConnectionOpenTry struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` - CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` } func (m *EventConnectionOpenTry) Reset() { *m = EventConnectionOpenTry{} } @@ -162,10 +163,10 @@ func (m *EventConnectionOpenTry) GetCounterpartyClientId() string { // EventConnectionOpenAck is a typed event emitted on connection open acknowledgement type EventConnectionOpenAck struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` - CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` } func (m *EventConnectionOpenAck) Reset() { *m = EventConnectionOpenAck{} } @@ -231,10 +232,10 @@ func (m *EventConnectionOpenAck) GetCounterpartyClientId() string { // EventConnectionOpenConfirm is a typed event emitted on connection open init type EventConnectionOpenConfirm struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty"` - CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` } func (m *EventConnectionOpenConfirm) Reset() { *m = EventConnectionOpenConfirm{} } @@ -310,25 +311,30 @@ func init() { } var fileDescriptor_2c70aa78066bdd17 = []byte{ - // 288 bytes of a gzipped FileDescriptorProto + // 357 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x4c, 0x4a, 0xd6, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcb, 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, - 0xcb, 0x4c, 0x4a, 0xd6, 0x03, 0xa9, 0xd1, 0x43, 0xa8, 0xd1, 0x2b, 0x33, 0x54, 0x3a, 0xcf, 0xc8, - 0x25, 0xee, 0x0a, 0x52, 0xe7, 0x0c, 0x17, 0xf6, 0x2f, 0x48, 0xcd, 0xf3, 0xcc, 0xcb, 0x2c, 0x11, - 0x52, 0xe6, 0xe2, 0x45, 0x28, 0x8e, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, - 0x41, 0x08, 0x7a, 0xa6, 0x08, 0x49, 0x73, 0x71, 0x26, 0xe7, 0x64, 0xa6, 0xe6, 0x95, 0x80, 0x14, - 0x30, 0x81, 0x15, 0x70, 0x40, 0x04, 0x3c, 0x53, 0x84, 0x6c, 0xb8, 0xa4, 0x92, 0xf3, 0x4b, 0xf3, - 0x4a, 0x52, 0x8b, 0x0a, 0x12, 0x8b, 0x4a, 0x2a, 0xe3, 0x51, 0x8d, 0x63, 0x06, 0xab, 0x96, 0x40, - 0x56, 0xe1, 0x8c, 0x6c, 0xb4, 0x09, 0x97, 0x18, 0xaa, 0x6e, 0xb8, 0x3d, 0x2c, 0x60, 0x9d, 0x22, - 0x28, 0x3a, 0xa1, 0x76, 0x2a, 0x9d, 0x63, 0xe4, 0x12, 0xc3, 0xe2, 0xa3, 0x90, 0xa2, 0xca, 0xe1, -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a, 0x09, 0x45, 0x5a, 0x29, 0x88, 0x07, 0xc1, 0xf7, 0x4c, + 0x11, 0x32, 0xe4, 0xe2, 0x4c, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x01, 0x69, 0x65, 0x02, 0x6b, 0x15, + 0xf9, 0x74, 0x4f, 0x5e, 0x00, 0xaa, 0x15, 0x26, 0xa5, 0x14, 0xc4, 0x01, 0x61, 0x7b, 0xa6, 0x08, + 0x25, 0x73, 0x49, 0x25, 0xe7, 0x97, 0xe6, 0x95, 0xa4, 0x16, 0x15, 0x24, 0x16, 0x95, 0x54, 0xc6, + 0xa3, 0x5a, 0xcf, 0x0c, 0x36, 0x43, 0xf5, 0xd3, 0x3d, 0x79, 0x45, 0x98, 0xf5, 0xb8, 0xd4, 0x2a, + 0x05, 0x49, 0x20, 0x4b, 0x3a, 0x23, 0xbb, 0x2b, 0x9c, 0x4b, 0x0c, 0x55, 0x23, 0xdc, 0x91, 0x2c, + 0x60, 0x0b, 0x14, 0x3f, 0xdd, 0x93, 0x97, 0xc5, 0x66, 0x01, 0xc2, 0xc5, 0x22, 0x28, 0x86, 0x43, + 0x5d, 0xaf, 0x74, 0x82, 0x89, 0x4b, 0x0c, 0x4b, 0x58, 0x86, 0x14, 0x55, 0x8e, 0x06, 0x25, 0x75, + 0x82, 0xd2, 0x31, 0x39, 0x7b, 0x34, 0x28, 0x49, 0x0c, 0xca, 0x33, 0x4c, 0x5c, 0x52, 0x58, 0x82, + 0xd2, 0x39, 0x3f, 0x2f, 0x2d, 0xb3, 0x28, 0x77, 0x34, 0x38, 0x49, 0x0b, 0x4e, 0xa7, 0xd0, 0x13, + 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, + 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, + 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x86, 0x52, 0xba, 0xc5, 0x29, + 0xd9, 0xfa, 0x15, 0xfa, 0xf0, 0xb2, 0xdb, 0xc0, 0x58, 0x17, 0xa9, 0xf8, 0x2e, 0xa9, 0x2c, 0x48, + 0x2d, 0x4e, 0x62, 0x03, 0x17, 0xc7, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0xa2, 0xc3, + 0xc0, 0xe2, 0x05, 0x00, 0x00, } func (m *EventConnectionOpenInit) Marshal() (dAtA []byte, err error) { diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 96c635fe4515..ac8fa91d9bef 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -292,6 +292,7 @@ func (k Keeper) RecvPacket( DstPort: packet.GetDestPort(), DstChannel: packet.GetDestChannel(), ChannelOrdering: channel.Ordering, + Success: true, }, ); err != nil { return err @@ -508,6 +509,7 @@ func (k Keeper) AcknowledgePacket( // emit an event marking that we have processed the acknowledgement if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelAckPacket{ + Data: packet.GetData(), TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), @@ -516,6 +518,7 @@ func (k Keeper) AcknowledgePacket( DstPort: packet.GetDestPort(), DstChannel: packet.GetDestChannel(), ChannelOrdering: channel.Ordering, + Acknowledgement: acknowledgement, }, ); err != nil { return err diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index deea41adab02..6ea8fbddd186 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -154,6 +154,7 @@ func (k Keeper) TimeoutExecuted( // emit an event marking that we have processed the timeout if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelTimeoutPacket{ + Data: packet.GetData(), TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), TimeoutTimestamp: packet.GetTimeoutTimestamp(), Sequence: packet.GetSequence(), diff --git a/x/ibc/core/04-channel/types/event.pb.go b/x/ibc/core/04-channel/types/event.pb.go index 451a60fa7ec8..97d6130d59fa 100644 --- a/x/ibc/core/04-channel/types/event.pb.go +++ b/x/ibc/core/04-channel/types/event.pb.go @@ -26,11 +26,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventChannelOpenInit is a typed event emitted on channel open init type EventChannelOpenInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelOpenInit) Reset() { *m = EventChannelOpenInit{} } @@ -103,11 +103,11 @@ func (m *EventChannelOpenInit) GetConnectionId() string { // EventChannelOpenTry is a typed event emitted on channel open try type EventChannelOpenTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelOpenTry) Reset() { *m = EventChannelOpenTry{} } @@ -180,11 +180,11 @@ func (m *EventChannelOpenTry) GetConnectionId() string { // EventChannelOpenAck is a typed event emitted on channel open acknowledgement type EventChannelOpenAck struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelOpenAck) Reset() { *m = EventChannelOpenAck{} } @@ -257,11 +257,11 @@ func (m *EventChannelOpenAck) GetConnectionId() string { // EventChannelCloseInit is a typed event emitted on channel close init type EventChannelCloseInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelCloseInit) Reset() { *m = EventChannelCloseInit{} } @@ -334,11 +334,11 @@ func (m *EventChannelCloseInit) GetConnectionId() string { // EventChannelOpenConfirm is a typed event emitted on channel open confirm type EventChannelOpenConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelOpenConfirm) Reset() { *m = EventChannelOpenConfirm{} } @@ -411,11 +411,11 @@ func (m *EventChannelOpenConfirm) GetConnectionId() string { // EventChannelCloseConfirm is a typed event emitted on channel close confirm type EventChannelCloseConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelCloseConfirm) Reset() { *m = EventChannelCloseConfirm{} } @@ -490,13 +490,13 @@ func (m *EventChannelCloseConfirm) GetConnectionId() string { type EventChannelSendPacket struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty" yaml:"src_port"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty" yaml:"src_channel"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty" yaml:"channel_ordering"` } func (m *EventChannelSendPacket) Reset() { *m = EventChannelSendPacket{} } @@ -599,13 +599,14 @@ func (m *EventChannelSendPacket) GetChannelOrdering() Order { type EventChannelRecvPacket struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty" yaml:"src_port"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty" yaml:"src_channel"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty" yaml:"channel_ordering"` + Success bool `protobuf:"varint,10,opt,name=success,proto3" json:"success,omitempty"` } func (m *EventChannelRecvPacket) Reset() { *m = EventChannelRecvPacket{} } @@ -704,16 +705,23 @@ func (m *EventChannelRecvPacket) GetChannelOrdering() Order { return NONE } +func (m *EventChannelRecvPacket) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + // EventChannelWriteAck is a typed event emitted on write acknowledgement type EventChannelWriteAck struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty" yaml:"src_port"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty" yaml:"src_channel"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` Acknowledgement []byte `protobuf:"bytes,9,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` } @@ -815,14 +823,16 @@ func (m *EventChannelWriteAck) GetAcknowledgement() []byte { // EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed type EventChannelAckPacket struct { - TimeoutHeight types.Height `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty" yaml:"src_port"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty" yaml:"src_channel"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty" yaml:"channel_ordering"` + Acknowledgement []byte `protobuf:"bytes,10,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` } func (m *EventChannelAckPacket) Reset() { *m = EventChannelAckPacket{} } @@ -858,6 +868,13 @@ func (m *EventChannelAckPacket) XXX_DiscardUnknown() { var xxx_messageInfo_EventChannelAckPacket proto.InternalMessageInfo +func (m *EventChannelAckPacket) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + func (m *EventChannelAckPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight @@ -914,16 +931,24 @@ func (m *EventChannelAckPacket) GetChannelOrdering() Order { return NONE } +func (m *EventChannelAckPacket) GetAcknowledgement() []byte { + if m != nil { + return m.Acknowledgement + } + return nil +} + // EventChannelTimeoutPacket is a typed event emitted when packet is timeout type EventChannelTimeoutPacket struct { - TimeoutHeight types.Height `protobuf:"bytes,1,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,2,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - SrcPort string `protobuf:"bytes,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - SrcChannel string `protobuf:"bytes,5,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty"` - DstPort string `protobuf:"bytes,6,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - DstChannel string `protobuf:"bytes,7,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty"` - ChannelOrdering Order `protobuf:"varint,8,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TimeoutHeight types.Height `protobuf:"bytes,2,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` + TimeoutTimestamp uint64 `protobuf:"varint,3,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty" yaml:"timeout_timestamp"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + SrcPort string `protobuf:"bytes,5,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty" yaml:"src_port"` + SrcChannel string `protobuf:"bytes,6,opt,name=src_channel,json=srcChannel,proto3" json:"src_channel,omitempty" yaml:"src_channel"` + DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` + DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` + ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty" yaml:"channel_ordering"` } func (m *EventChannelTimeoutPacket) Reset() { *m = EventChannelTimeoutPacket{} } @@ -959,6 +984,13 @@ func (m *EventChannelTimeoutPacket) XXX_DiscardUnknown() { var xxx_messageInfo_EventChannelTimeoutPacket proto.InternalMessageInfo +func (m *EventChannelTimeoutPacket) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + func (m *EventChannelTimeoutPacket) GetTimeoutHeight() types.Height { if m != nil { return m.TimeoutHeight @@ -1015,6 +1047,96 @@ func (m *EventChannelTimeoutPacket) GetChannelOrdering() Order { return NONE } +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +type EventAcknowledgementSuccess struct { + Success []byte `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *EventAcknowledgementSuccess) Reset() { *m = EventAcknowledgementSuccess{} } +func (m *EventAcknowledgementSuccess) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementSuccess) ProtoMessage() {} +func (*EventAcknowledgementSuccess) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{11} +} +func (m *EventAcknowledgementSuccess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementSuccess.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 *EventAcknowledgementSuccess) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementSuccess.Merge(m, src) +} +func (m *EventAcknowledgementSuccess) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementSuccess) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementSuccess.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementSuccess proto.InternalMessageInfo + +func (m *EventAcknowledgementSuccess) GetSuccess() []byte { + if m != nil { + return m.Success + } + return nil +} + +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +type EventAcknowledgementError struct { + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *EventAcknowledgementError) Reset() { *m = EventAcknowledgementError{} } +func (m *EventAcknowledgementError) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementError) ProtoMessage() {} +func (*EventAcknowledgementError) Descriptor() ([]byte, []int) { + return fileDescriptor_a989ebecceb60589, []int{12} +} +func (m *EventAcknowledgementError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementError.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 *EventAcknowledgementError) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementError.Merge(m, src) +} +func (m *EventAcknowledgementError) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementError) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementError.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementError proto.InternalMessageInfo + +func (m *EventAcknowledgementError) GetError() string { + if m != nil { + return m.Error + } + return "" +} + func init() { proto.RegisterType((*EventChannelOpenInit)(nil), "ibc.core.channel.v1.EventChannelOpenInit") proto.RegisterType((*EventChannelOpenTry)(nil), "ibc.core.channel.v1.EventChannelOpenTry") @@ -1027,54 +1149,66 @@ func init() { proto.RegisterType((*EventChannelWriteAck)(nil), "ibc.core.channel.v1.EventChannelWriteAck") proto.RegisterType((*EventChannelAckPacket)(nil), "ibc.core.channel.v1.EventChannelAckPacket") proto.RegisterType((*EventChannelTimeoutPacket)(nil), "ibc.core.channel.v1.EventChannelTimeoutPacket") + proto.RegisterType((*EventAcknowledgementSuccess)(nil), "ibc.core.channel.v1.EventAcknowledgementSuccess") + proto.RegisterType((*EventAcknowledgementError)(nil), "ibc.core.channel.v1.EventAcknowledgementError") } func init() { proto.RegisterFile("ibc/core/channel/v1/event.proto", fileDescriptor_a989ebecceb60589) } var fileDescriptor_a989ebecceb60589 = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xbf, 0x4f, 0x1b, 0x3f, - 0x1c, 0xcd, 0x91, 0x90, 0x04, 0xf3, 0xf3, 0x6b, 0xe0, 0x4b, 0x88, 0x44, 0x42, 0xd3, 0x05, 0xa9, - 0xe2, 0x0e, 0xda, 0xaa, 0xaa, 0xba,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0xd7, 0x61, 0x11, 0xe4, 0x25, 0x79, 0xdb, 0x25, 0x0c, 0x11, 0xe3, 0x45, 0xc6, - 0x1f, 0xbc, 0xc3, 0x55, 0x90, 0x97, 0x02, 0x19, 0x7f, 0xad, 0xf2, 0x9c, 0x14, 0x48, 0x7b, 0x0a, - 0xcb, 0x60, 0x5a, 0xb7, 0xac, 0x91, 0x85, 0xac, 0xe9, 0x02, 0x29, 0x90, 0x35, 0x41, 0x73, 0xb1, - 0x54, 0x11, 0x37, 0x17, 0x71, 0xb1, 0x54, 0x31, 0x57, 0xb7, 0x62, 0x6e, 0x3e, 0xe2, 0x62, 0x19, - 0x1b, 0x08, 0xf7, 0xc0, 0x42, 0x9c, 0x10, 0x17, 0x98, 0x08, 0xca, 0x1a, 0x85, 0xa9, 0x75, 0x67, - 0x63, 0x6e, 0xc8, 0xa4, 0xc1, 0x09, 0xe9, 0xee, 0x6b, 0x90, 0x3f, 0x6f, 0x2b, 0xfb, 0x96, 0x72, - 0x2d, 0x18, 0x9f, 0xa0, 0xde, 0x5d, 0x30, 0xff, 0x40, 0x30, 0x3f, 0x27, 0x86, 0xff, 0x77, 0xbc, - 0x14, 0x54, 0x11, 0x7d, 0x72, 0xdd, 0xc5, 0xf2, 0x57, 0xb1, 0x6c, 0x80, 0xf9, 0x00, 0xb5, 0x18, - 0x7f, 0xd7, 0x26, 0xb8, 0x41, 0x42, 0xc2, 0x94, 0x49, 0x65, 0xc6, 0xbf, 0x5a, 0xae, 0x7c, 0x48, - 0x0f, 0x9f, 0xa9, 0x3b, 0xa8, 0x65, 0x7f, 0x11, 0xd7, 0x6d, 0x76, 0x6e, 0xc3, 0xe6, 0x89, 0x1b, - 0xd8, 0x9c, 0x1e, 0x61, 0x73, 0x66, 0xa4, 0xcd, 0x93, 0x23, 0x6d, 0xce, 0x8e, 0xb4, 0x39, 0x77, - 0xa3, 0xdd, 0x9f, 0xff, 0xf3, 0xdd, 0xff, 0x31, 0x0d, 0x56, 0x93, 0x19, 0x1c, 0x46, 0xda, 0xef, - 0x72, 0xb8, 0xdd, 0x1c, 0x76, 0xfd, 0xe3, 0xf3, 0x92, 0x73, 0x72, 0x5e, 0x72, 0xce, 0xce, 0x4b, - 0xce, 0xa7, 0x8b, 0x52, 0xea, 0xe4, 0xa2, 0x94, 0xfa, 0x72, 0x51, 0x4a, 0xbd, 0x7a, 0xda, 0xa0, - 0xaa, 0xd9, 0xad, 0xbb, 0x88, 0x87, 0x1e, 0xe2, 0x32, 0xe4, 0xd2, 0x3e, 0x36, 0x25, 0x6e, 0x79, - 0xef, 0xbd, 0xc1, 0xbd, 0x6a, 0xeb, 0xf1, 0x66, 0x7c, 0x27, 0x53, 0xfd, 0x0e, 0x91, 0xf5, 0xac, - 0xb9, 0x58, 0x3d, 0xfa, 0x15, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x29, 0xfb, 0x89, 0xea, 0x0d, 0x00, + // 833 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0x4e, 0xb2, 0xd9, 0x26, 0x9d, 0xed, 0xb6, 0xbb, 0xd3, 0x64, 0x6b, 0x52, 0x88, 0xcb, 0x9c, + 0x22, 0xa1, 0xb5, 0x09, 0xac, 0xb4, 0x08, 0x89, 0x43, 0x13, 0xad, 0x44, 0x4e, 0x5d, 0xa6, 0x95, + 0x90, 0x7a, 0x29, 0xce, 0x78, 0x48, 0xac, 0x24, 0x33, 0x61, 0x66, 0x12, 0xc8, 0xbf, 0xe0, 0x7f, + 0x20, 0xf1, 0x2f, 0x90, 0x7a, 0xec, 0x81, 0x03, 0x27, 0x0b, 0xb5, 0x12, 0x20, 0x38, 0x20, 0xf9, + 0x17, 0x20, 0x8f, 0xed, 0xc4, 0x0e, 0x3e, 0xb6, 0x48, 0x48, 0x3e, 0x65, 0xe6, 0xbd, 0xef, 0xbd, + 0x37, 0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f5, 0xdd, 0x0c, 0x83, 0xca, 0x14, 0x00, 0x00, } @@ -1529,6 +1663,16 @@ func (m *EventChannelRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } if m.ChannelOrdering != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) i-- @@ -1697,48 +1841,55 @@ func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Acknowledgement) > 0 { + i -= len(m.Acknowledgement) + copy(dAtA[i:], m.Acknowledgement) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Acknowledgement))) + i-- + dAtA[i] = 0x52 + } if m.ChannelOrdering != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if m.Sequence != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } { size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) @@ -1749,7 +1900,14 @@ func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvent(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1776,45 +1934,45 @@ func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, erro if m.ChannelOrdering != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if m.Sequence != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } { size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) @@ -1825,7 +1983,74 @@ func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, erro i = encodeVarintEvent(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementSuccess) 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 *EventAcknowledgementSuccess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + i -= len(m.Success) + copy(dAtA[i:], m.Success) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementError) 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 *EventAcknowledgementError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -2091,6 +2316,9 @@ func (m *EventChannelRecvPacket) Size() (n int) { if m.ChannelOrdering != 0 { n += 1 + sovEvent(uint64(m.ChannelOrdering)) } + if m.Success { + n += 2 + } return n } @@ -2141,6 +2369,10 @@ func (m *EventChannelAckPacket) Size() (n int) { } var l int _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } l = m.TimeoutHeight.Size() n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { @@ -2168,6 +2400,10 @@ func (m *EventChannelAckPacket) Size() (n int) { if m.ChannelOrdering != 0 { n += 1 + sovEvent(uint64(m.ChannelOrdering)) } + l = len(m.Acknowledgement) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } return n } @@ -2177,6 +2413,10 @@ func (m *EventChannelTimeoutPacket) Size() (n int) { } var l int _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } l = m.TimeoutHeight.Size() n += 1 + l + sovEvent(uint64(l)) if m.TimeoutTimestamp != 0 { @@ -2207,6 +2447,32 @@ func (m *EventChannelTimeoutPacket) Size() (n int) { return n } +func (m *EventAcknowledgementSuccess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Success) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventAcknowledgementError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + 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 } @@ -4077,6 +4343,26 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { break } } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) @@ -4452,9 +4738,9 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvent @@ -4464,30 +4750,31 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthEvent } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthEvent } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) } - m.TimeoutTimestamp = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvent @@ -4497,17 +4784,31 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeoutTimestamp |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + if msglen < 0 { + return ErrInvalidLengthEvent } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvent } @@ -4516,12 +4817,31 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift + m.TimeoutTimestamp |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", wireType) } @@ -4553,7 +4873,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } m.SrcPort = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", wireType) } @@ -4585,7 +4905,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } m.SrcChannel = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstPort", wireType) } @@ -4617,7 +4937,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } m.DstPort = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", wireType) } @@ -4649,7 +4969,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } m.DstChannel = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) } @@ -4668,6 +4988,40 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { break } } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Acknowledgement = append(m.Acknowledgement[:0], dAtA[iNdEx:postIndex]...) + if m.Acknowledgement == nil { + m.Acknowledgement = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) @@ -4722,6 +5076,40 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) } @@ -4754,7 +5142,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) } @@ -4773,7 +5161,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { break } } - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } @@ -4792,7 +5180,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcPort", wireType) } @@ -4824,7 +5212,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } m.SrcPort = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcChannel", wireType) } @@ -4856,7 +5244,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } m.SrcChannel = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstPort", wireType) } @@ -4888,7 +5276,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } m.DstPort = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstChannel", wireType) } @@ -4920,7 +5308,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } m.DstChannel = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ChannelOrdering", wireType) } @@ -4963,6 +5351,178 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventAcknowledgementSuccess) 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: EventAcknowledgementSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Success = append(m.Success[:0], dAtA[iNdEx:postIndex]...) + if m.Success == nil { + m.Success = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAcknowledgementError) 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: EventAcknowledgementError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvent + } + if (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 From c00f98daec87e30be866f4b85d22f47953ec2267 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Mon, 30 Nov 2020 17:33:34 +0530 Subject: [PATCH 23/24] Fix error --- x/ibc/core/04-channel/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/ibc/core/04-channel/handler.go b/x/ibc/core/04-channel/handler.go index 8cb987ff2273..9933bbf0c3fc 100644 --- a/x/ibc/core/04-channel/handler.go +++ b/x/ibc/core/04-channel/handler.go @@ -27,7 +27,7 @@ func HandleMsgChannelOpenInit(ctx sdk.Context, k keeper.Keeper, portCap *capabil ConnectionId: msg.Channel.ConnectionHops[0], }, ); err != nil { - return nil, nil, err + return nil, "", nil, err } ctx.EventManager().EmitEvent( @@ -60,7 +60,7 @@ func HandleMsgChannelOpenTry(ctx sdk.Context, k keeper.Keeper, portCap *capabili ConnectionId: msg.Channel.ConnectionHops[0], }, ); err != nil { - return nil, nil, err + return nil, "", nil, err } ctx.EventManager().EmitEvent( From 7e85d4ec34b7761c33d606b9ebc2b56dd9ae0685 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 1 Dec 2020 16:41:10 +0530 Subject: [PATCH 24/24] Address few PR comments --- .../transfer/v1/{event.proto => events.proto} | 15 +- .../channel/v1/{event.proto => events.proto} | 22 +- .../client/v1/{event.proto => events.proto} | 0 .../v1/{event.proto => events.proto} | 2 - types/query/query.pb.go | 2 +- x/ibc/applications/transfer/keeper/keeper.go | 5 - .../transfer/keeper/msg_server.go | 7 - x/ibc/applications/transfer/keeper/relay.go | 2 +- x/ibc/applications/transfer/module.go | 63 +- x/ibc/applications/transfer/spec/05_events.md | 44 +- x/ibc/applications/transfer/types/event.pb.go | 610 ------- .../applications/transfer/types/events.pb.go | 958 +++++++++++ x/ibc/core/02-client/keeper/proposal.go | 2 +- .../types/{event.pb.go => events.pb.go} | 272 +-- .../types/{event.pb.go => events.pb.go} | 329 ++-- x/ibc/core/04-channel/handler.go | 51 +- x/ibc/core/04-channel/keeper/packet.go | 29 - x/ibc/core/04-channel/keeper/timeout.go | 7 - .../types/{event.pb.go => events.pb.go} | 1510 ++++++----------- x/ibc/core/keeper/msg_server.go | 56 +- x/ibc/core/spec/06_events.md | 338 ++-- 21 files changed, 1978 insertions(+), 2346 deletions(-) rename proto/ibc/applications/transfer/v1/{event.proto => events.proto} (53%) rename proto/ibc/core/channel/v1/{event.proto => events.proto} (94%) rename proto/ibc/core/client/v1/{event.proto => events.proto} (100%) rename proto/ibc/core/connection/v1/{event.proto => events.proto} (94%) delete mode 100644 x/ibc/applications/transfer/types/event.pb.go create mode 100644 x/ibc/applications/transfer/types/events.pb.go rename x/ibc/core/02-client/types/{event.pb.go => events.pb.go} (83%) rename x/ibc/core/03-connection/types/{event.pb.go => events.pb.go} (77%) rename x/ibc/core/04-channel/types/{event.pb.go => events.pb.go} (76%) diff --git a/proto/ibc/applications/transfer/v1/event.proto b/proto/ibc/applications/transfer/v1/events.proto similarity index 53% rename from proto/ibc/applications/transfer/v1/event.proto rename to proto/ibc/applications/transfer/v1/events.proto index 03e956e71171..f5623c740f17 100644 --- a/proto/ibc/applications/transfer/v1/event.proto +++ b/proto/ibc/applications/transfer/v1/events.proto @@ -12,12 +12,19 @@ message EventTransfer { string receiver = 2; } +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +message EventAcknowledgementSuccess { + bytes success = 1; +} + +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +message EventAcknowledgementError { + string error = 1; +} + // EventDenominationTrace is a typed event for denomination trace message EventDenominationTrace { - bytes trace_hash = 1 [ - (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", - (gogoproto.moretags) = "yaml:\"trace_hash\"" - ]; + string trace_hash = 1 [(gogoproto.moretags) = "yaml:\"trace_hash\""]; string denom = 2; } diff --git a/proto/ibc/core/channel/v1/event.proto b/proto/ibc/core/channel/v1/events.proto similarity index 94% rename from proto/ibc/core/channel/v1/event.proto rename to proto/ibc/core/channel/v1/events.proto index 25982d17933e..8323c10f7b9b 100644 --- a/proto/ibc/core/channel/v1/event.proto +++ b/proto/ibc/core/channel/v1/events.proto @@ -15,8 +15,6 @@ message EventChannelOpenInit { string counterparty_port_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_port_id\""]; - string counterparty_channel_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } @@ -46,8 +44,8 @@ message EventChannelOpenAck { string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } -// EventChannelCloseInit is a typed event emitted on channel close init -message EventChannelCloseInit { +// EventChannelOpenConfirm is a typed event emitted on channel open confirm +message EventChannelOpenConfirm { string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; @@ -59,8 +57,8 @@ message EventChannelCloseInit { string connection_id = 5 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } -// EventChannelOpenConfirm is a typed event emitted on channel open confirm -message EventChannelOpenConfirm { +// EventChannelCloseInit is a typed event emitted on channel close init +message EventChannelCloseInit { string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; @@ -127,8 +125,6 @@ message EventChannelRecvPacket { string dst_channel = 8 [(gogoproto.moretags) = "yaml:\"dst_channel\""]; Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; - - bool success = 10; } // EventChannelWriteAck is a typed event emitted on write acknowledgement @@ -198,13 +194,3 @@ message EventChannelTimeoutPacket { Order channel_ordering = 9 [(gogoproto.moretags) = "yaml:\"channel_ordering\""]; } - -// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success -message EventAcknowledgementSuccess { - bytes success = 1; -} - -// EventAcknowledgementError is a typed event emitted on packet acknowledgement error -message EventAcknowledgementError { - string error = 1; -} diff --git a/proto/ibc/core/client/v1/event.proto b/proto/ibc/core/client/v1/events.proto similarity index 100% rename from proto/ibc/core/client/v1/event.proto rename to proto/ibc/core/client/v1/events.proto diff --git a/proto/ibc/core/connection/v1/event.proto b/proto/ibc/core/connection/v1/events.proto similarity index 94% rename from proto/ibc/core/connection/v1/event.proto rename to proto/ibc/core/connection/v1/events.proto index 4393eb53dd7f..471c154859f8 100644 --- a/proto/ibc/core/connection/v1/event.proto +++ b/proto/ibc/core/connection/v1/events.proto @@ -11,8 +11,6 @@ message EventConnectionOpenInit { string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string counterparty_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string counterparty_client_id = 4 [(gogoproto.moretags) = "yaml:\"counterparty_client_id\""]; } diff --git a/types/query/query.pb.go b/types/query/query.pb.go index c04a6bde32b6..266d337002e8 100644 --- a/types/query/query.pb.go +++ b/types/query/query.pb.go @@ -783,7 +783,7 @@ type Module struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // module version Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - //checksum + // checksum Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"` } diff --git a/x/ibc/applications/transfer/keeper/keeper.go b/x/ibc/applications/transfer/keeper/keeper.go index eea9cb28da6c..e1149ef9be49 100644 --- a/x/ibc/applications/transfer/keeper/keeper.go +++ b/x/ibc/applications/transfer/keeper/keeper.go @@ -169,8 +169,3 @@ func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Cap func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { return k.scopedKeeper.ClaimCapability(ctx, cap, name) } - -// GetChannel returns a channel with a particular identifier binded to a specific port -func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channeltypes.Channel, bool) { - return k.channelKeeper.GetChannel(ctx, portID, channelID) -} diff --git a/x/ibc/applications/transfer/keeper/msg_server.go b/x/ibc/applications/transfer/keeper/msg_server.go index 598c73360a30..1ae750064151 100644 --- a/x/ibc/applications/transfer/keeper/msg_server.go +++ b/x/ibc/applications/transfer/keeper/msg_server.go @@ -36,12 +36,5 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - ), - ) - return &types.MsgTransferResponse{}, nil } diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index d42032202df1..b7ab467086b3 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -267,7 +267,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t voucherDenom := denomTrace.IBCDenom() if err := ctx.EventManager().EmitTypedEvent( &types.EventDenominationTrace{ - TraceHash: traceHash, + TraceHash: traceHash.String(), Denom: voucherDenom, }, ); err != nil { diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index b935ca3b7ad9..57e2e6106297 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -26,7 +26,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper" "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/simulation" "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" - clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" @@ -335,27 +334,6 @@ func (am AppModule) OnRecvPacket( acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) } - channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) - - err = ctx.EventManager().EmitTypedEvent( - &channeltypes.EventChannelRecvPacket{ - Data: packet.GetData(), - TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), - TimeoutTimestamp: packet.GetTimeoutTimestamp(), - Sequence: packet.GetSequence(), - SrcPort: packet.GetSourcePort(), - SrcChannel: packet.GetSourceChannel(), - DstPort: packet.GetDestPort(), - DstChannel: packet.GetDestChannel(), - ChannelOrdering: channel.Ordering, - Success: err != nil, - }, - ) - - if err != nil { - acknowledgement = channeltypes.NewErrorAcknowledgement(err.Error()) - } - // NOTE: acknowledgement will be written synchronously during IBC handler execution. return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), @@ -381,29 +359,10 @@ func (am AppModule) OnAcknowledgementPacket( return nil, err } - channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) - - if err := ctx.EventManager().EmitTypedEvent( - &channeltypes.EventChannelAckPacket{ - Data: packet.GetData(), - TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), - TimeoutTimestamp: packet.GetTimeoutTimestamp(), - Sequence: packet.GetSequence(), - SrcPort: packet.GetSourcePort(), - SrcChannel: packet.GetSourceChannel(), - DstPort: packet.GetDestPort(), - DstChannel: packet.GetDestChannel(), - ChannelOrdering: channel.Ordering, - Acknowledgement: acknowledgement, - }, - ); err != nil { - return nil, err - } - switch resp := ack.Response.(type) { case *channeltypes.Acknowledgement_Result: if err := ctx.EventManager().EmitTypedEvent( - &channeltypes.EventAcknowledgementSuccess{ + &types.EventAcknowledgementSuccess{ Success: resp.Result, }, ); err != nil { @@ -411,7 +370,7 @@ func (am AppModule) OnAcknowledgementPacket( } case *channeltypes.Acknowledgement_Error: if err := ctx.EventManager().EmitTypedEvent( - &channeltypes.EventAcknowledgementError{ + &types.EventAcknowledgementError{ Error: resp.Error, }, ); err != nil { @@ -438,24 +397,6 @@ func (am AppModule) OnTimeoutPacket( return nil, err } - channel, _ := am.keeper.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) - - if err := ctx.EventManager().EmitTypedEvent( - &channeltypes.EventChannelTimeoutPacket{ - Data: packet.GetData(), - TimeoutHeight: packet.GetTimeoutHeight().(clienttypes.Height), - TimeoutTimestamp: packet.GetTimeoutTimestamp(), - Sequence: packet.GetSequence(), - SrcPort: packet.GetSourcePort(), - SrcChannel: packet.GetSourceChannel(), - DstPort: packet.GetDestPort(), - DstChannel: packet.GetDestChannel(), - ChannelOrdering: channel.Ordering, - }, - ); err != nil { - return nil, err - } - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil diff --git a/x/ibc/applications/transfer/spec/05_events.md b/x/ibc/applications/transfer/spec/05_events.md index 51b49da4602d..0850dbcd026c 100644 --- a/x/ibc/applications/transfer/spec/05_events.md +++ b/x/ibc/applications/transfer/spec/05_events.md @@ -6,39 +6,21 @@ order: 5 ## MsgTransfer -| Type | Attribute Key | Attribute Value | -|--------------|---------------|-----------------| -| ibc_transfer | sender | {sender} | -| ibc_transfer | receiver | {receiver} | -| message | action | transfer | -| message | module | transfer | +| Type | Attribute Key | Attribute Value | +|--------------------------------------------|---------------|-----------------| +| ibc-applications-transfer-v1-EventTransfer | sender | {sender} | +| ibc-applications-transfer-v1-EventTransfer | receiver | {receiver} | +| message | action | transfer | ## OnRecvPacket callback -| Type | Attribute Key | Attribute Value | -|-----------------------|---------------|-----------------| -| fungible_token_packet | module | transfer | -| fungible_token_packet | receiver | {receiver} | -| fungible_token_packet | denom | {denom} | -| fungible_token_packet | amount | {amount} | -| fungible_token_packet | success | {ackSuccess} | -| denomination_trace | trace_hash | {hex_hash} | +| Type | Attribute Key | Attribute Value | +|-----------------------------------------------------|---------------|-----------------| +| ibc-applications-transfer-v1-EventDenominationTrace | trace_hash | {hex_hash} | -## OnAcknowledgePacket callback +## OnAcknowledgePacket callback (emitted any one of the below events) -| Type | Attribute Key | Attribute Value | -|-----------------------|-----------------|-------------------| -| fungible_token_packet | module | transfer | -| fungible_token_packet | receiver | {receiver} | -| fungible_token_packet | denom | {denom} | -| fungible_token_packet | amount | {amount} | -| fungible_token_packet | success | error | {ack.Response} | - -## OnTimeoutPacket callback - -| Type | Attribute Key | Attribute Value | -|-----------------------|-----------------|-----------------| -| fungible_token_packet | module | transfer | -| fungible_token_packet | refund_receiver | {receiver} | -| fungible_token_packet | denom | {denom} | -| fungible_token_packet | amount | {amount} | +| Type | Attribute Key | Attribute Value | +|----------------------------------------------------------|---------------|-------------------| +| ibc-applications-transfer-v1-EventAcknowledgementSuccess | success | {ack.Response} | +| ibc-applications-transfer-v1-EventAcknowledgementError | error | {ack.Response} | diff --git a/x/ibc/applications/transfer/types/event.pb.go b/x/ibc/applications/transfer/types/event.pb.go deleted file mode 100644 index 359459b5569f..000000000000 --- a/x/ibc/applications/transfer/types/event.pb.go +++ /dev/null @@ -1,610 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/transfer/v1/event.proto - -package types - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" - 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 - -// EventTransfer is a typed event emitted on ibc transfer -type EventTransfer struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (m *EventTransfer) Reset() { *m = EventTransfer{} } -func (m *EventTransfer) String() string { return proto.CompactTextString(m) } -func (*EventTransfer) ProtoMessage() {} -func (*EventTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{0} -} -func (m *EventTransfer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventTransfer.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 *EventTransfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventTransfer.Merge(m, src) -} -func (m *EventTransfer) XXX_Size() int { - return m.Size() -} -func (m *EventTransfer) XXX_DiscardUnknown() { - xxx_messageInfo_EventTransfer.DiscardUnknown(m) -} - -var xxx_messageInfo_EventTransfer proto.InternalMessageInfo - -func (m *EventTransfer) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventTransfer) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -// EventDenominationTrace is a typed event for denomination trace -type EventDenominationTrace struct { - TraceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=trace_hash,json=traceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"trace_hash,omitempty" yaml:"trace_hash"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *EventDenominationTrace) Reset() { *m = EventDenominationTrace{} } -func (m *EventDenominationTrace) String() string { return proto.CompactTextString(m) } -func (*EventDenominationTrace) ProtoMessage() {} -func (*EventDenominationTrace) Descriptor() ([]byte, []int) { - return fileDescriptor_c490d680aa16af7e, []int{1} -} -func (m *EventDenominationTrace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDenominationTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDenominationTrace.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 *EventDenominationTrace) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDenominationTrace.Merge(m, src) -} -func (m *EventDenominationTrace) XXX_Size() int { - return m.Size() -} -func (m *EventDenominationTrace) XXX_DiscardUnknown() { - xxx_messageInfo_EventDenominationTrace.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDenominationTrace proto.InternalMessageInfo - -func (m *EventDenominationTrace) GetTraceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { - if m != nil { - return m.TraceHash - } - return nil -} - -func (m *EventDenominationTrace) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func init() { - proto.RegisterType((*EventTransfer)(nil), "ibc.applications.transfer.v1.EventTransfer") - proto.RegisterType((*EventDenominationTrace)(nil), "ibc.applications.transfer.v1.EventDenominationTrace") -} - -func init() { - proto.RegisterFile("ibc/applications/transfer/v1/event.proto", fileDescriptor_c490d680aa16af7e) -} - -var fileDescriptor_c490d680aa16af7e = []byte{ - // 310 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4b, 0x3b, 0x31, - 0x18, 0xc6, 0x9b, 0x3f, 0xfc, 0x8b, 0x0d, 0x3a, 0x78, 0x94, 0x52, 0x8a, 0xa4, 0x72, 0x53, 0x17, - 0x13, 0x8a, 0x4e, 0x0e, 0x0e, 0x55, 0xa1, 0x8b, 0x4b, 0xe9, 0x20, 0x2e, 0x92, 0xa4, 0xaf, 0xbd, - 0xe0, 0x5d, 0x72, 0x24, 0xf1, 0x68, 0xbf, 0x85, 0x1f, 0xc0, 0x0f, 0xe4, 0xd8, 0xd1, 0xa9, 0x48, - 0xfb, 0x0d, 0x1c, 0x9d, 0xe4, 0xd2, 0x53, 0x6f, 0x71, 0xca, 0xf3, 0xf0, 0x3e, 0xf9, 0x3d, 0x2f, - 0x2f, 0x1e, 0x28, 0x21, 0x19, 0xcf, 0xf3, 0x54, 0x49, 0xee, 0x95, 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, - 0xa8, 0x15, 0x4a, 0xe3, 0x32, 0xe3, 0xaa, 0xe7, 0xc4, 0xcd, 0x1e, 0xd9, 0x82, 0xfd, 0x7d, 0x7a, - 0xbf, 0xcc, 0xc1, 0x89, 0x66, 0x38, 0xe2, 0xe9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0xea, - 0xae, 0x19, 0xa4, 0x01, 0x00, 0x00, -} - -func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDenominationTrace) 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 *EventDenominationTrace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDenominationTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceHash) > 0 { - i -= len(m.TraceHash) - copy(dAtA[i:], m.TraceHash) - i = encodeVarintEvent(dAtA, i, uint64(len(m.TraceHash))) - 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 *EventTransfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - -func (m *EventDenominationTrace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TraceHash) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Denom) - 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 *EventTransfer) 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: EventTransfer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventTransfer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDenominationTrace) 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: EventDenominationTrace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDenominationTrace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceHash = append(m.TraceHash[:0], dAtA[iNdEx:postIndex]...) - if m.TraceHash == nil { - m.TraceHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (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/ibc/applications/transfer/types/events.pb.go b/x/ibc/applications/transfer/types/events.pb.go new file mode 100644 index 000000000000..cf96d525618d --- /dev/null +++ b/x/ibc/applications/transfer/types/events.pb.go @@ -0,0 +1,958 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/transfer/v1/events.proto + +package types + +import ( + fmt "fmt" + _ "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 + +// EventTransfer is a typed event emitted on ibc transfer +type EventTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (m *EventTransfer) Reset() { *m = EventTransfer{} } +func (m *EventTransfer) String() string { return proto.CompactTextString(m) } +func (*EventTransfer) ProtoMessage() {} +func (*EventTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_0d04a14abeba54b9, []int{0} +} +func (m *EventTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTransfer.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 *EventTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransfer.Merge(m, src) +} +func (m *EventTransfer) XXX_Size() int { + return m.Size() +} +func (m *EventTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransfer proto.InternalMessageInfo + +func (m *EventTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTransfer) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success +type EventAcknowledgementSuccess struct { + Success []byte `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *EventAcknowledgementSuccess) Reset() { *m = EventAcknowledgementSuccess{} } +func (m *EventAcknowledgementSuccess) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementSuccess) ProtoMessage() {} +func (*EventAcknowledgementSuccess) Descriptor() ([]byte, []int) { + return fileDescriptor_0d04a14abeba54b9, []int{1} +} +func (m *EventAcknowledgementSuccess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementSuccess.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 *EventAcknowledgementSuccess) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementSuccess.Merge(m, src) +} +func (m *EventAcknowledgementSuccess) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementSuccess) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementSuccess.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementSuccess proto.InternalMessageInfo + +func (m *EventAcknowledgementSuccess) GetSuccess() []byte { + if m != nil { + return m.Success + } + return nil +} + +// EventAcknowledgementError is a typed event emitted on packet acknowledgement error +type EventAcknowledgementError struct { + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *EventAcknowledgementError) Reset() { *m = EventAcknowledgementError{} } +func (m *EventAcknowledgementError) String() string { return proto.CompactTextString(m) } +func (*EventAcknowledgementError) ProtoMessage() {} +func (*EventAcknowledgementError) Descriptor() ([]byte, []int) { + return fileDescriptor_0d04a14abeba54b9, []int{2} +} +func (m *EventAcknowledgementError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAcknowledgementError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAcknowledgementError.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 *EventAcknowledgementError) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAcknowledgementError.Merge(m, src) +} +func (m *EventAcknowledgementError) XXX_Size() int { + return m.Size() +} +func (m *EventAcknowledgementError) XXX_DiscardUnknown() { + xxx_messageInfo_EventAcknowledgementError.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAcknowledgementError proto.InternalMessageInfo + +func (m *EventAcknowledgementError) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +// EventDenominationTrace is a typed event for denomination trace +type EventDenominationTrace struct { + TraceHash string `protobuf:"bytes,1,opt,name=trace_hash,json=traceHash,proto3" json:"trace_hash,omitempty" yaml:"trace_hash"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *EventDenominationTrace) Reset() { *m = EventDenominationTrace{} } +func (m *EventDenominationTrace) String() string { return proto.CompactTextString(m) } +func (*EventDenominationTrace) ProtoMessage() {} +func (*EventDenominationTrace) Descriptor() ([]byte, []int) { + return fileDescriptor_0d04a14abeba54b9, []int{3} +} +func (m *EventDenominationTrace) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDenominationTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDenominationTrace.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 *EventDenominationTrace) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDenominationTrace.Merge(m, src) +} +func (m *EventDenominationTrace) XXX_Size() int { + return m.Size() +} +func (m *EventDenominationTrace) XXX_DiscardUnknown() { + xxx_messageInfo_EventDenominationTrace.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDenominationTrace proto.InternalMessageInfo + +func (m *EventDenominationTrace) GetTraceHash() string { + if m != nil { + return m.TraceHash + } + return "" +} + +func (m *EventDenominationTrace) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func init() { + proto.RegisterType((*EventTransfer)(nil), "ibc.applications.transfer.v1.EventTransfer") + proto.RegisterType((*EventAcknowledgementSuccess)(nil), "ibc.applications.transfer.v1.EventAcknowledgementSuccess") + proto.RegisterType((*EventAcknowledgementError)(nil), "ibc.applications.transfer.v1.EventAcknowledgementError") + proto.RegisterType((*EventDenominationTrace)(nil), "ibc.applications.transfer.v1.EventDenominationTrace") +} + +func init() { + proto.RegisterFile("ibc/applications/transfer/v1/events.proto", fileDescriptor_0d04a14abeba54b9) +} + +var fileDescriptor_0d04a14abeba54b9 = []byte{ + // 329 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x30, + 0x18, 0x86, 0x57, 0xc1, 0xe9, 0x82, 0x1e, 0x2c, 0x73, 0xcc, 0x29, 0x55, 0x7a, 0xd2, 0x83, 0x0d, + 0x43, 0x41, 0xf0, 0x20, 0x38, 0x1d, 0x78, 0x9e, 0x3b, 0x88, 0x17, 0x49, 0xd3, 0xcf, 0x36, 0x6c, + 0x4d, 0x4a, 0xbe, 0xac, 0xba, 0x7f, 0xe1, 0xcf, 0xf2, 0xb8, 0xa3, 0x27, 0x91, 0xed, 0x1f, 0xf8, + 0x0b, 0xa4, 0x69, 0xa7, 0x1e, 0xf4, 0xd4, 0xf7, 0xe1, 0x7b, 0xdf, 0xb7, 0xf9, 0x12, 0x72, 0x24, + 0x42, 0x4e, 0x59, 0x96, 0x8d, 0x05, 0x67, 0x46, 0x28, 0x89, 0xd4, 0x68, 0x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0xf0, 0x6a, 0xb3, 0x85, 0x57, 0x7b, 0x5b, 0x78, 0xb5, 0xfb, 0x8b, 0x58, 0x98, + 0x64, 0x12, 0x06, 0x5c, 0xa5, 0x94, 0x2b, 0x4c, 0x15, 0x56, 0x9f, 0x63, 0x8c, 0x46, 0xf4, 0x99, + 0xfe, 0xff, 0x5c, 0x66, 0x9a, 0x01, 0x86, 0x75, 0x7b, 0xef, 0x27, 0x5f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xba, 0x67, 0xe5, 0xac, 0xd8, 0x01, 0x00, 0x00, +} + +func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementSuccess) 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 *EventAcknowledgementSuccess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + i -= len(m.Success) + copy(dAtA[i:], m.Success) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAcknowledgementError) 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 *EventAcknowledgementError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAcknowledgementError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDenominationTrace) 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 *EventDenominationTrace) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDenominationTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.TraceHash) > 0 { + i -= len(m.TraceHash) + copy(dAtA[i:], m.TraceHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TraceHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventAcknowledgementSuccess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Success) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventAcknowledgementError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventDenominationTrace) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TraceHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventTransfer) 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 ErrIntOverflowEvents + } + 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: EventTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAcknowledgementSuccess) 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 ErrIntOverflowEvents + } + 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: EventAcknowledgementSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Success = append(m.Success[:0], dAtA[iNdEx:postIndex]...) + if m.Success == nil { + m.Success = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAcknowledgementError) 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 ErrIntOverflowEvents + } + 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: EventAcknowledgementError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAcknowledgementError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDenominationTrace) 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 ErrIntOverflowEvents + } + 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: EventDenominationTrace: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDenominationTrace: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ibc/core/02-client/keeper/proposal.go b/x/ibc/core/02-client/keeper/proposal.go index aeaba8815c43..9c1b8aa2e9da 100644 --- a/x/ibc/core/02-client/keeper/proposal.go +++ b/x/ibc/core/02-client/keeper/proposal.go @@ -51,7 +51,7 @@ func (k Keeper) ClientUpdateProposal(ctx sdk.Context, p *types.ClientUpdatePropo // emitting events in the keeper for proposal updates to clients if err := ctx.EventManager().EmitTypedEvent( - &types.EventUpgradeClient{ + &types.EventUpdateClientProposal{ ClientId: p.ClientId, ClientType: clientState.ClientType(), ConsensusHeight: header.GetHeight().(types.Height), diff --git a/x/ibc/core/02-client/types/event.pb.go b/x/ibc/core/02-client/types/events.pb.go similarity index 83% rename from x/ibc/core/02-client/types/event.pb.go rename to x/ibc/core/02-client/types/events.pb.go index b9ee84d9a403..f1353e4958e9 100644 --- a/x/ibc/core/02-client/types/event.pb.go +++ b/x/ibc/core/02-client/types/events.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/core/client/v1/event.proto +// source: ibc/core/client/v1/events.proto package types @@ -34,7 +34,7 @@ func (m *EventCreateClient) Reset() { *m = EventCreateClient{} } func (m *EventCreateClient) String() string { return proto.CompactTextString(m) } func (*EventCreateClient) ProtoMessage() {} func (*EventCreateClient) Descriptor() ([]byte, []int) { - return fileDescriptor_184b5eb6564931c0, []int{0} + return fileDescriptor_3279dcdded75b691, []int{0} } func (m *EventCreateClient) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -95,7 +95,7 @@ func (m *EventUpdateClient) Reset() { *m = EventUpdateClient{} } func (m *EventUpdateClient) String() string { return proto.CompactTextString(m) } func (*EventUpdateClient) ProtoMessage() {} func (*EventUpdateClient) Descriptor() ([]byte, []int) { - return fileDescriptor_184b5eb6564931c0, []int{1} + return fileDescriptor_3279dcdded75b691, []int{1} } func (m *EventUpdateClient) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,7 +156,7 @@ func (m *EventUpgradeClient) Reset() { *m = EventUpgradeClient{} } func (m *EventUpgradeClient) String() string { return proto.CompactTextString(m) } func (*EventUpgradeClient) ProtoMessage() {} func (*EventUpgradeClient) Descriptor() ([]byte, []int) { - return fileDescriptor_184b5eb6564931c0, []int{2} + return fileDescriptor_3279dcdded75b691, []int{2} } func (m *EventUpgradeClient) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ func (m *EventUpdateClientProposal) Reset() { *m = EventUpdateClientProp func (m *EventUpdateClientProposal) String() string { return proto.CompactTextString(m) } func (*EventUpdateClientProposal) ProtoMessage() {} func (*EventUpdateClientProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_184b5eb6564931c0, []int{3} + return fileDescriptor_3279dcdded75b691, []int{3} } func (m *EventUpdateClientProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -278,7 +278,7 @@ func (m *EventClientMisbehaviour) Reset() { *m = EventClientMisbehaviour func (m *EventClientMisbehaviour) String() string { return proto.CompactTextString(m) } func (*EventClientMisbehaviour) ProtoMessage() {} func (*EventClientMisbehaviour) Descriptor() ([]byte, []int) { - return fileDescriptor_184b5eb6564931c0, []int{4} + return fileDescriptor_3279dcdded75b691, []int{4} } func (m *EventClientMisbehaviour) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -336,33 +336,33 @@ func init() { proto.RegisterType((*EventClientMisbehaviour)(nil), "ibc.core.client.v1.EventClientMisbehaviour") } -func init() { proto.RegisterFile("ibc/core/client/v1/event.proto", fileDescriptor_184b5eb6564931c0) } +func init() { proto.RegisterFile("ibc/core/client/v1/events.proto", fileDescriptor_3279dcdded75b691) } -var fileDescriptor_184b5eb6564931c0 = []byte{ +var fileDescriptor_3279dcdded75b691 = []byte{ // 367 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcd, 0x4a, 0xeb, 0x40, 0x14, 0xc7, 0x33, 0xf7, 0xc2, 0xe5, 0x76, 0xba, 0xb8, 0xbd, 0xa1, 0xd8, 0xda, 0x45, 0x52, 0xb2, 0xea, 0xa6, 0x33, 0xb6, 0x2e, 0x0a, 0x2e, 0x5b, 0x04, 0x5d, 0x08, 0x5a, 0x74, 0xe3, 0xa6, 0x24, 0x93, 0x31, 0x19, 0x6c, 0x33, 0x21, 0x33, 0x0d, 0xf6, 0x2d, 0x7c, 0xac, 0x2e, 0xbb, 0x74, 0x15, 0xa4, 0x5d, 0xe8, 0x46, 0x84, 0x3e, 0x81, 0x64, 0x26, 0x54, 0xb4, 0x3e, 0x41, 0x56, 0x39, 0x39, -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 0xa3, 0x7e, 0xb7, 0xb8, 0x7e, 0x39, 0x86, 0xf0, 0xfe, 0xa8, 0xd3, + 0x77, 0xfc, 0x11, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xa8, 0x1e, 0x9f, 0x68, 0x05, 0x00, 0x00, } func (m *EventCreateClient) Marshal() (dAtA []byte, err error) { @@ -391,21 +391,21 @@ func (m *EventCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientType))) i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -438,21 +438,21 @@ func (m *EventUpdateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientType))) i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -485,21 +485,21 @@ func (m *EventUpgradeClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientType))) i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -532,21 +532,21 @@ func (m *EventUpdateClientProposal) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientType))) i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -579,29 +579,29 @@ func (m *EventClientMisbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if len(m.ClientType) > 0 { i -= len(m.ClientType) copy(dAtA[i:], m.ClientType) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientType))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientType))) i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { - offset -= sovEvent(v) +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -619,14 +619,14 @@ func (m *EventCreateClient) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientType) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) return n } @@ -638,14 +638,14 @@ func (m *EventUpdateClient) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientType) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) return n } @@ -657,14 +657,14 @@ func (m *EventUpgradeClient) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientType) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) return n } @@ -676,14 +676,14 @@ func (m *EventUpdateClientProposal) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientType) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) return n } @@ -695,22 +695,22 @@ func (m *EventClientMisbehaviour) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientType) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.ConsensusHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) return n } -func sovEvent(x uint64) (n int) { +func sovEvents(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 sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *EventCreateClient) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -720,7 +720,7 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -748,7 +748,7 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -762,11 +762,11 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -780,7 +780,7 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -794,11 +794,11 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -812,7 +812,7 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -825,11 +825,11 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -840,15 +840,15 @@ func (m *EventCreateClient) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -870,7 +870,7 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -898,7 +898,7 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -912,11 +912,11 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -930,7 +930,7 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -944,11 +944,11 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -962,7 +962,7 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -975,11 +975,11 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -990,15 +990,15 @@ func (m *EventUpdateClient) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1020,7 +1020,7 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1048,7 +1048,7 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1062,11 +1062,11 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1080,7 +1080,7 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1094,11 +1094,11 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1112,7 +1112,7 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1125,11 +1125,11 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1140,15 +1140,15 @@ func (m *EventUpgradeClient) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1170,7 +1170,7 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1198,7 +1198,7 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1212,11 +1212,11 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1230,7 +1230,7 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1244,11 +1244,11 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1262,7 +1262,7 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1275,11 +1275,11 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1290,15 +1290,15 @@ func (m *EventUpdateClientProposal) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1320,7 +1320,7 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1348,7 +1348,7 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1362,11 +1362,11 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1380,7 +1380,7 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1394,11 +1394,11 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1412,7 +1412,7 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1425,11 +1425,11 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1440,15 +1440,15 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1462,7 +1462,7 @@ func (m *EventClientMisbehaviour) Unmarshal(dAtA []byte) error { } return nil } -func skipEvent(dAtA []byte) (n int, err error) { +func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1470,7 +1470,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1487,7 +1487,7 @@ func skipEvent(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1503,7 +1503,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1516,14 +1516,14 @@ func skipEvent(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvent + return 0, ErrUnexpectedEndOfGroupEvents } depth-- case 5: @@ -1532,7 +1532,7 @@ func skipEvent(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } if depth == 0 { return iNdEx, nil @@ -1542,7 +1542,7 @@ func skipEvent(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/ibc/core/03-connection/types/event.pb.go b/x/ibc/core/03-connection/types/events.pb.go similarity index 77% rename from x/ibc/core/03-connection/types/event.pb.go rename to x/ibc/core/03-connection/types/events.pb.go index 0d28a0d4a8cd..6ee2b7d0abd3 100644 --- a/x/ibc/core/03-connection/types/event.pb.go +++ b/x/ibc/core/03-connection/types/events.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/core/connection/v1/event.proto +// source: ibc/core/connection/v1/events.proto package types @@ -25,17 +25,16 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventConnectionOpenInit is a typed event emitted on connection open init type EventConnectionOpenInit struct { - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - CounterpartyConnectionId string `protobuf:"bytes,3,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` - CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + CounterpartyClientId string `protobuf:"bytes,4,opt,name=counterparty_client_id,json=counterpartyClientId,proto3" json:"counterparty_client_id,omitempty" yaml:"counterparty_client_id"` } func (m *EventConnectionOpenInit) Reset() { *m = EventConnectionOpenInit{} } func (m *EventConnectionOpenInit) String() string { return proto.CompactTextString(m) } func (*EventConnectionOpenInit) ProtoMessage() {} func (*EventConnectionOpenInit) Descriptor() ([]byte, []int) { - return fileDescriptor_2c70aa78066bdd17, []int{0} + return fileDescriptor_407d31e4511baa72, []int{0} } func (m *EventConnectionOpenInit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,13 +77,6 @@ func (m *EventConnectionOpenInit) GetClientId() string { return "" } -func (m *EventConnectionOpenInit) GetCounterpartyConnectionId() string { - if m != nil { - return m.CounterpartyConnectionId - } - return "" -} - func (m *EventConnectionOpenInit) GetCounterpartyClientId() string { if m != nil { return m.CounterpartyClientId @@ -104,7 +96,7 @@ func (m *EventConnectionOpenTry) Reset() { *m = EventConnectionOpenTry{} func (m *EventConnectionOpenTry) String() string { return proto.CompactTextString(m) } func (*EventConnectionOpenTry) ProtoMessage() {} func (*EventConnectionOpenTry) Descriptor() ([]byte, []int) { - return fileDescriptor_2c70aa78066bdd17, []int{1} + return fileDescriptor_407d31e4511baa72, []int{1} } func (m *EventConnectionOpenTry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -173,7 +165,7 @@ func (m *EventConnectionOpenAck) Reset() { *m = EventConnectionOpenAck{} func (m *EventConnectionOpenAck) String() string { return proto.CompactTextString(m) } func (*EventConnectionOpenAck) ProtoMessage() {} func (*EventConnectionOpenAck) Descriptor() ([]byte, []int) { - return fileDescriptor_2c70aa78066bdd17, []int{2} + return fileDescriptor_407d31e4511baa72, []int{2} } func (m *EventConnectionOpenAck) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +234,7 @@ func (m *EventConnectionOpenConfirm) Reset() { *m = EventConnectionOpenC func (m *EventConnectionOpenConfirm) String() string { return proto.CompactTextString(m) } func (*EventConnectionOpenConfirm) ProtoMessage() {} func (*EventConnectionOpenConfirm) Descriptor() ([]byte, []int) { - return fileDescriptor_2c70aa78066bdd17, []int{3} + return fileDescriptor_407d31e4511baa72, []int{3} } func (m *EventConnectionOpenConfirm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -307,34 +299,34 @@ func init() { } func init() { - proto.RegisterFile("ibc/core/connection/v1/event.proto", fileDescriptor_2c70aa78066bdd17) + proto.RegisterFile("ibc/core/connection/v1/events.proto", fileDescriptor_407d31e4511baa72) } -var fileDescriptor_2c70aa78066bdd17 = []byte{ - // 357 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x4c, 0x4a, 0xd6, +var fileDescriptor_407d31e4511baa72 = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0x4c, 0x4a, 0xd6, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcb, 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, - 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, - 0xcb, 0x4c, 0x4a, 0xd6, 0x03, 0xa9, 0xd1, 0x43, 0xa8, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, - 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0x95, 0x4e, 0x32, 0x71, 0x89, 0xbb, 0x82, - 0x74, 0x3b, 0xc3, 0x15, 0xfb, 0x17, 0xa4, 0xe6, 0x79, 0xe6, 0x65, 0x96, 0x08, 0xd9, 0x72, 0xf1, - 0x22, 0x8c, 0x88, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xf8, 0x74, 0x4f, - 0x5e, 0xa4, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x45, 0x5a, 0x29, 0x88, 0x07, 0xc1, 0xf7, 0x4c, - 0x11, 0x32, 0xe4, 0xe2, 0x4c, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x01, 0x69, 0x65, 0x02, 0x6b, 0x15, - 0xf9, 0x74, 0x4f, 0x5e, 0x00, 0xaa, 0x15, 0x26, 0xa5, 0x14, 0xc4, 0x01, 0x61, 0x7b, 0xa6, 0x08, - 0x25, 0x73, 0x49, 0x25, 0xe7, 0x97, 0xe6, 0x95, 0xa4, 0x16, 0x15, 0x24, 0x16, 0x95, 0x54, 0xc6, - 0xa3, 0x5a, 0xcf, 0x0c, 0x36, 0x43, 0xf5, 0xd3, 0x3d, 0x79, 0x45, 0x98, 0xf5, 0xb8, 0xd4, 0x2a, - 0x05, 0x49, 0x20, 0x4b, 0x3a, 0x23, 0xbb, 0x2b, 0x9c, 0x4b, 0x0c, 0x55, 0x23, 0xdc, 0x91, 0x2c, - 0x60, 0x0b, 0x14, 0x3f, 0xdd, 0x93, 0x97, 0xc5, 0x66, 0x01, 0xc2, 0xc5, 0x22, 0x28, 0x86, 0x43, - 0x5d, 0xaf, 0x74, 0x82, 0x89, 0x4b, 0x0c, 0x4b, 0x58, 0x86, 0x14, 0x55, 0x8e, 0x06, 0x25, 0x75, - 0x82, 0xd2, 0x31, 0x39, 0x7b, 0x34, 0x28, 0x49, 0x0c, 0xca, 0x33, 0x4c, 0x5c, 0x52, 0x58, 0x82, - 0xd2, 0x39, 0x3f, 0x2f, 0x2d, 0xb3, 0x28, 0x77, 0x34, 0x38, 0x49, 0x0b, 0x4e, 0xa7, 0xd0, 0x13, - 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, - 0x0b, 0x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0x4f, 0x5e, 0x00, 0xaa, 0x15, 0x26, 0xa5, 0x14, 0xc4, 0x01, 0x61, 0x7b, 0xa6, + 0x08, 0x85, 0x73, 0x89, 0x25, 0xe7, 0x97, 0xe6, 0x95, 0xa4, 0x16, 0x15, 0x24, 0x16, 0x95, 0x54, + 0xc6, 0x23, 0xf4, 0xb3, 0x80, 0xf5, 0x2b, 0x7e, 0xba, 0x27, 0x2f, 0x0b, 0xb3, 0x1a, 0x9b, 0x3a, + 0xa5, 0x20, 0x11, 0x64, 0x09, 0x67, 0xa8, 0xc1, 0x4a, 0x27, 0x98, 0xb8, 0xc4, 0xb0, 0x78, 0x33, + 0xa4, 0xa8, 0x72, 0x00, 0x7c, 0x99, 0xcc, 0x25, 0x85, 0xea, 0x7a, 0x14, 0xeb, 0x99, 0xc1, 0x66, + 0xa8, 0x7e, 0xba, 0x27, 0xaf, 0x88, 0xcd, 0xa7, 0xa8, 0x6e, 0x91, 0x40, 0xf1, 0x2d, 0xb2, 0xbb, + 0xe8, 0x1d, 0x94, 0x8e, 0xc9, 0xd9, 0xa3, 0x41, 0x49, 0x62, 0x50, 0x9e, 0x61, 0xe2, 0x92, 0xc2, + 0x12, 0x94, 0xce, 0xf9, 0x79, 0x69, 0x99, 0x45, 0xb9, 0xa3, 0xc1, 0x49, 0x5a, 0x70, 0x3a, 0x85, + 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, 0x75, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x31, 0x94, 0xd2, 0x2d, + 0x4e, 0xc9, 0xd6, 0xaf, 0xd0, 0x87, 0x97, 0xab, 0x06, 0xc6, 0xba, 0x48, 0x45, 0x6b, 0x49, 0x65, + 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xb8, 0xa4, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x31, 0xb5, + 0x86, 0xfd, 0x7e, 0x05, 0x00, 0x00, } func (m *EventConnectionOpenInit) Marshal() (dAtA []byte, err error) { @@ -360,28 +352,21 @@ func (m *EventConnectionOpenInit) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.CounterpartyClientId) > 0 { i -= len(m.CounterpartyClientId) copy(dAtA[i:], m.CounterpartyClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyClientId))) i-- dAtA[i] = 0x22 } - if len(m.CounterpartyConnectionId) > 0 { - i -= len(m.CounterpartyConnectionId) - copy(dAtA[i:], m.CounterpartyConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) - i-- - dAtA[i] = 0x1a - } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0x12 } if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0xa } @@ -411,28 +396,28 @@ func (m *EventConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.CounterpartyClientId) > 0 { i -= len(m.CounterpartyClientId) copy(dAtA[i:], m.CounterpartyClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyClientId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyConnectionId) > 0 { i -= len(m.CounterpartyConnectionId) copy(dAtA[i:], m.CounterpartyConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyConnectionId))) i-- dAtA[i] = 0x1a } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0x12 } if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0xa } @@ -462,28 +447,28 @@ func (m *EventConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.CounterpartyClientId) > 0 { i -= len(m.CounterpartyClientId) copy(dAtA[i:], m.CounterpartyClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyClientId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyConnectionId) > 0 { i -= len(m.CounterpartyConnectionId) copy(dAtA[i:], m.CounterpartyConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyConnectionId))) i-- dAtA[i] = 0x1a } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0x12 } if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0xa } @@ -513,36 +498,36 @@ func (m *EventConnectionOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, err if len(m.CounterpartyClientId) > 0 { i -= len(m.CounterpartyClientId) copy(dAtA[i:], m.CounterpartyClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyClientId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyConnectionId) > 0 { i -= len(m.CounterpartyConnectionId) copy(dAtA[i:], m.CounterpartyConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyConnectionId))) i-- dAtA[i] = 0x1a } if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0x12 } if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { - offset -= sovEvent(v) +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -560,19 +545,15 @@ func (m *EventConnectionOpenInit) Size() (n int) { _ = l l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.CounterpartyConnectionId) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -585,19 +566,19 @@ func (m *EventConnectionOpenTry) Size() (n int) { _ = l l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -610,19 +591,19 @@ func (m *EventConnectionOpenAck) Size() (n int) { _ = l l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -635,28 +616,28 @@ func (m *EventConnectionOpenConfirm) Size() (n int) { _ = l l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyClientId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } -func sovEvent(x uint64) (n int) { +func sovEvents(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 sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -666,7 +647,7 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -694,7 +675,7 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -708,11 +689,11 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -726,7 +707,7 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -740,49 +721,17 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.ClientId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyConnectionId", 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.CounterpartyConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyClientId", wireType) @@ -790,7 +739,7 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -804,11 +753,11 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -817,15 +766,15 @@ func (m *EventConnectionOpenInit) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -847,7 +796,7 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -875,7 +824,7 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -889,11 +838,11 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -907,7 +856,7 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -921,11 +870,11 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -939,7 +888,7 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -953,11 +902,11 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -971,7 +920,7 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -985,11 +934,11 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -998,15 +947,15 @@ func (m *EventConnectionOpenTry) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1028,7 +977,7 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1056,7 +1005,7 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1070,11 +1019,11 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1088,7 +1037,7 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1102,11 +1051,11 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1120,7 +1069,7 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1134,11 +1083,11 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1152,7 +1101,7 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1166,11 +1115,11 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1179,15 +1128,15 @@ func (m *EventConnectionOpenAck) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1209,7 +1158,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1237,7 +1186,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1251,11 +1200,11 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1269,7 +1218,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1283,11 +1232,11 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1301,7 +1250,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1315,11 +1264,11 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1333,7 +1282,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1347,11 +1296,11 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -1360,15 +1309,15 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1382,7 +1331,7 @@ func (m *EventConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } return nil } -func skipEvent(dAtA []byte) (n int, err error) { +func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1390,7 +1339,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1407,7 +1356,7 @@ func skipEvent(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1423,7 +1372,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1436,14 +1385,14 @@ func skipEvent(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvent + return 0, ErrUnexpectedEndOfGroupEvents } depth-- case 5: @@ -1452,7 +1401,7 @@ func skipEvent(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } if depth == 0 { return iNdEx, nil @@ -1462,7 +1411,7 @@ func skipEvent(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/ibc/core/04-channel/handler.go b/x/ibc/core/04-channel/handler.go index 9933bbf0c3fc..2b9b3c2a72ee 100644 --- a/x/ibc/core/04-channel/handler.go +++ b/x/ibc/core/04-channel/handler.go @@ -20,23 +20,15 @@ func HandleMsgChannelOpenInit(ctx sdk.Context, k keeper.Keeper, portCap *capabil if err := ctx.EventManager().EmitTypedEvent( &types.EventChannelOpenInit{ - PortId: msg.PortId, - ChannelId: channelID, - CounterpartyPortId: msg.Channel.Counterparty.PortId, - CounterpartyChannelId: msg.Channel.Counterparty.ChannelId, - ConnectionId: msg.Channel.ConnectionHops[0], + PortId: msg.PortId, + ChannelId: channelID, + CounterpartyPortId: msg.Channel.Counterparty.PortId, + ConnectionId: msg.Channel.ConnectionHops[0], }, ); err != nil { return nil, "", nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, channelID, capKey, nil @@ -63,13 +55,6 @@ func HandleMsgChannelOpenTry(ctx sdk.Context, k keeper.Keeper, portCap *capabili return nil, "", nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, channelID, capKey, nil @@ -98,13 +83,6 @@ func HandleMsgChannelOpenAck(ctx sdk.Context, k keeper.Keeper, channelCap *capab return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -131,13 +109,6 @@ func HandleMsgChannelOpenConfirm(ctx sdk.Context, k keeper.Keeper, channelCap *c return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -164,13 +135,6 @@ func HandleMsgChannelCloseInit(ctx sdk.Context, k keeper.Keeper, channelCap *cap return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil @@ -197,13 +161,6 @@ func HandleMsgChannelCloseConfirm(ctx sdk.Context, k keeper.Keeper, channelCap * return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return &sdk.Result{ Events: ctx.EventManager().Events().ToABCIEvents(), }, nil diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index ac8fa91d9bef..67cf042c2e37 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -133,13 +133,6 @@ func (k Keeper) SendPacket( return err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - k.Logger(ctx).Info("packet sent", "packet", fmt.Sprintf("%v", packet)) return nil } @@ -292,19 +285,11 @@ func (k Keeper) RecvPacket( DstPort: packet.GetDestPort(), DstChannel: packet.GetDestChannel(), ChannelOrdering: channel.Ordering, - Success: true, }, ); err != nil { return err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return nil } @@ -383,13 +368,6 @@ func (k Keeper) WriteAcknowledgement( return err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return nil } @@ -524,12 +502,5 @@ func (k Keeper) AcknowledgePacket( return err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return nil } diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index 6ea8fbddd186..223a68608fbc 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -168,13 +168,6 @@ func (k Keeper) TimeoutExecuted( return err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - return nil } diff --git a/x/ibc/core/04-channel/types/event.pb.go b/x/ibc/core/04-channel/types/events.pb.go similarity index 76% rename from x/ibc/core/04-channel/types/event.pb.go rename to x/ibc/core/04-channel/types/events.pb.go index 97d6130d59fa..f93466f3a0a5 100644 --- a/x/ibc/core/04-channel/types/event.pb.go +++ b/x/ibc/core/04-channel/types/events.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/core/channel/v1/event.proto +// source: ibc/core/channel/v1/events.proto package types @@ -26,18 +26,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventChannelOpenInit is a typed event emitted on channel open init type EventChannelOpenInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` - CounterpartyChannelId string `protobuf:"bytes,4,opt,name=counterparty_channel_id,json=counterpartyChannelId,proto3" json:"counterparty_channel_id,omitempty" yaml:"counterparty_channel_id"` - ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` + ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } func (m *EventChannelOpenInit) Reset() { *m = EventChannelOpenInit{} } func (m *EventChannelOpenInit) String() string { return proto.CompactTextString(m) } func (*EventChannelOpenInit) ProtoMessage() {} func (*EventChannelOpenInit) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{0} + return fileDescriptor_d050c542de417654, []int{0} } func (m *EventChannelOpenInit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,13 +86,6 @@ func (m *EventChannelOpenInit) GetCounterpartyPortId() string { return "" } -func (m *EventChannelOpenInit) GetCounterpartyChannelId() string { - if m != nil { - return m.CounterpartyChannelId - } - return "" -} - func (m *EventChannelOpenInit) GetConnectionId() string { if m != nil { return m.ConnectionId @@ -114,7 +106,7 @@ func (m *EventChannelOpenTry) Reset() { *m = EventChannelOpenTry{} } func (m *EventChannelOpenTry) String() string { return proto.CompactTextString(m) } func (*EventChannelOpenTry) ProtoMessage() {} func (*EventChannelOpenTry) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{1} + return fileDescriptor_d050c542de417654, []int{1} } func (m *EventChannelOpenTry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +183,7 @@ func (m *EventChannelOpenAck) Reset() { *m = EventChannelOpenAck{} } func (m *EventChannelOpenAck) String() string { return proto.CompactTextString(m) } func (*EventChannelOpenAck) ProtoMessage() {} func (*EventChannelOpenAck) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{2} + return fileDescriptor_d050c542de417654, []int{2} } func (m *EventChannelOpenAck) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -255,8 +247,8 @@ func (m *EventChannelOpenAck) GetConnectionId() string { return "" } -// EventChannelCloseInit is a typed event emitted on channel close init -type EventChannelCloseInit struct { +// EventChannelOpenConfirm is a typed event emitted on channel open confirm +type EventChannelOpenConfirm struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` @@ -264,18 +256,18 @@ type EventChannelCloseInit struct { ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } -func (m *EventChannelCloseInit) Reset() { *m = EventChannelCloseInit{} } -func (m *EventChannelCloseInit) String() string { return proto.CompactTextString(m) } -func (*EventChannelCloseInit) ProtoMessage() {} -func (*EventChannelCloseInit) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{3} +func (m *EventChannelOpenConfirm) Reset() { *m = EventChannelOpenConfirm{} } +func (m *EventChannelOpenConfirm) String() string { return proto.CompactTextString(m) } +func (*EventChannelOpenConfirm) ProtoMessage() {} +func (*EventChannelOpenConfirm) Descriptor() ([]byte, []int) { + return fileDescriptor_d050c542de417654, []int{3} } -func (m *EventChannelCloseInit) XXX_Unmarshal(b []byte) error { +func (m *EventChannelOpenConfirm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventChannelCloseInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventChannelOpenConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventChannelCloseInit.Marshal(b, m, deterministic) + return xxx_messageInfo_EventChannelOpenConfirm.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -285,55 +277,55 @@ func (m *EventChannelCloseInit) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *EventChannelCloseInit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventChannelCloseInit.Merge(m, src) +func (m *EventChannelOpenConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelOpenConfirm.Merge(m, src) } -func (m *EventChannelCloseInit) XXX_Size() int { +func (m *EventChannelOpenConfirm) XXX_Size() int { return m.Size() } -func (m *EventChannelCloseInit) XXX_DiscardUnknown() { - xxx_messageInfo_EventChannelCloseInit.DiscardUnknown(m) +func (m *EventChannelOpenConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelOpenConfirm.DiscardUnknown(m) } -var xxx_messageInfo_EventChannelCloseInit proto.InternalMessageInfo +var xxx_messageInfo_EventChannelOpenConfirm proto.InternalMessageInfo -func (m *EventChannelCloseInit) GetPortId() string { +func (m *EventChannelOpenConfirm) GetPortId() string { if m != nil { return m.PortId } return "" } -func (m *EventChannelCloseInit) GetChannelId() string { +func (m *EventChannelOpenConfirm) GetChannelId() string { if m != nil { return m.ChannelId } return "" } -func (m *EventChannelCloseInit) GetCounterpartyPortId() string { +func (m *EventChannelOpenConfirm) GetCounterpartyPortId() string { if m != nil { return m.CounterpartyPortId } return "" } -func (m *EventChannelCloseInit) GetCounterpartyChannelId() string { +func (m *EventChannelOpenConfirm) GetCounterpartyChannelId() string { if m != nil { return m.CounterpartyChannelId } return "" } -func (m *EventChannelCloseInit) GetConnectionId() string { +func (m *EventChannelOpenConfirm) GetConnectionId() string { if m != nil { return m.ConnectionId } return "" } -// EventChannelOpenConfirm is a typed event emitted on channel open confirm -type EventChannelOpenConfirm struct { +// EventChannelCloseInit is a typed event emitted on channel close init +type EventChannelCloseInit struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` CounterpartyPortId string `protobuf:"bytes,3,opt,name=counterparty_port_id,json=counterpartyPortId,proto3" json:"counterparty_port_id,omitempty" yaml:"counterparty_port_id"` @@ -341,18 +333,18 @@ type EventChannelOpenConfirm struct { ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` } -func (m *EventChannelOpenConfirm) Reset() { *m = EventChannelOpenConfirm{} } -func (m *EventChannelOpenConfirm) String() string { return proto.CompactTextString(m) } -func (*EventChannelOpenConfirm) ProtoMessage() {} -func (*EventChannelOpenConfirm) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{4} +func (m *EventChannelCloseInit) Reset() { *m = EventChannelCloseInit{} } +func (m *EventChannelCloseInit) String() string { return proto.CompactTextString(m) } +func (*EventChannelCloseInit) ProtoMessage() {} +func (*EventChannelCloseInit) Descriptor() ([]byte, []int) { + return fileDescriptor_d050c542de417654, []int{4} } -func (m *EventChannelOpenConfirm) XXX_Unmarshal(b []byte) error { +func (m *EventChannelCloseInit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventChannelOpenConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventChannelCloseInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventChannelOpenConfirm.Marshal(b, m, deterministic) + return xxx_messageInfo_EventChannelCloseInit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -362,47 +354,47 @@ func (m *EventChannelOpenConfirm) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *EventChannelOpenConfirm) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventChannelOpenConfirm.Merge(m, src) +func (m *EventChannelCloseInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventChannelCloseInit.Merge(m, src) } -func (m *EventChannelOpenConfirm) XXX_Size() int { +func (m *EventChannelCloseInit) XXX_Size() int { return m.Size() } -func (m *EventChannelOpenConfirm) XXX_DiscardUnknown() { - xxx_messageInfo_EventChannelOpenConfirm.DiscardUnknown(m) +func (m *EventChannelCloseInit) XXX_DiscardUnknown() { + xxx_messageInfo_EventChannelCloseInit.DiscardUnknown(m) } -var xxx_messageInfo_EventChannelOpenConfirm proto.InternalMessageInfo +var xxx_messageInfo_EventChannelCloseInit proto.InternalMessageInfo -func (m *EventChannelOpenConfirm) GetPortId() string { +func (m *EventChannelCloseInit) GetPortId() string { if m != nil { return m.PortId } return "" } -func (m *EventChannelOpenConfirm) GetChannelId() string { +func (m *EventChannelCloseInit) GetChannelId() string { if m != nil { return m.ChannelId } return "" } -func (m *EventChannelOpenConfirm) GetCounterpartyPortId() string { +func (m *EventChannelCloseInit) GetCounterpartyPortId() string { if m != nil { return m.CounterpartyPortId } return "" } -func (m *EventChannelOpenConfirm) GetCounterpartyChannelId() string { +func (m *EventChannelCloseInit) GetCounterpartyChannelId() string { if m != nil { return m.CounterpartyChannelId } return "" } -func (m *EventChannelOpenConfirm) GetConnectionId() string { +func (m *EventChannelCloseInit) GetConnectionId() string { if m != nil { return m.ConnectionId } @@ -422,7 +414,7 @@ func (m *EventChannelCloseConfirm) Reset() { *m = EventChannelCloseConfi func (m *EventChannelCloseConfirm) String() string { return proto.CompactTextString(m) } func (*EventChannelCloseConfirm) ProtoMessage() {} func (*EventChannelCloseConfirm) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{5} + return fileDescriptor_d050c542de417654, []int{5} } func (m *EventChannelCloseConfirm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -503,7 +495,7 @@ func (m *EventChannelSendPacket) Reset() { *m = EventChannelSendPacket{} func (m *EventChannelSendPacket) String() string { return proto.CompactTextString(m) } func (*EventChannelSendPacket) ProtoMessage() {} func (*EventChannelSendPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{6} + return fileDescriptor_d050c542de417654, []int{6} } func (m *EventChannelSendPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,14 +598,13 @@ type EventChannelRecvPacket struct { DstPort string `protobuf:"bytes,7,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty" yaml:"dst_port"` DstChannel string `protobuf:"bytes,8,opt,name=dst_channel,json=dstChannel,proto3" json:"dst_channel,omitempty" yaml:"dst_channel"` ChannelOrdering Order `protobuf:"varint,9,opt,name=channel_ordering,json=channelOrdering,proto3,enum=ibc.core.channel.v1.Order" json:"channel_ordering,omitempty" yaml:"channel_ordering"` - Success bool `protobuf:"varint,10,opt,name=success,proto3" json:"success,omitempty"` } func (m *EventChannelRecvPacket) Reset() { *m = EventChannelRecvPacket{} } func (m *EventChannelRecvPacket) String() string { return proto.CompactTextString(m) } func (*EventChannelRecvPacket) ProtoMessage() {} func (*EventChannelRecvPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{7} + return fileDescriptor_d050c542de417654, []int{7} } func (m *EventChannelRecvPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -705,13 +696,6 @@ func (m *EventChannelRecvPacket) GetChannelOrdering() Order { return NONE } -func (m *EventChannelRecvPacket) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - // EventChannelWriteAck is a typed event emitted on write acknowledgement type EventChannelWriteAck struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` @@ -729,7 +713,7 @@ func (m *EventChannelWriteAck) Reset() { *m = EventChannelWriteAck{} } func (m *EventChannelWriteAck) String() string { return proto.CompactTextString(m) } func (*EventChannelWriteAck) ProtoMessage() {} func (*EventChannelWriteAck) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{8} + return fileDescriptor_d050c542de417654, []int{8} } func (m *EventChannelWriteAck) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -839,7 +823,7 @@ func (m *EventChannelAckPacket) Reset() { *m = EventChannelAckPacket{} } func (m *EventChannelAckPacket) String() string { return proto.CompactTextString(m) } func (*EventChannelAckPacket) ProtoMessage() {} func (*EventChannelAckPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{9} + return fileDescriptor_d050c542de417654, []int{9} } func (m *EventChannelAckPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -955,7 +939,7 @@ func (m *EventChannelTimeoutPacket) Reset() { *m = EventChannelTimeoutPa func (m *EventChannelTimeoutPacket) String() string { return proto.CompactTextString(m) } func (*EventChannelTimeoutPacket) ProtoMessage() {} func (*EventChannelTimeoutPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{10} + return fileDescriptor_d050c542de417654, []int{10} } func (m *EventChannelTimeoutPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1047,169 +1031,73 @@ func (m *EventChannelTimeoutPacket) GetChannelOrdering() Order { return NONE } -// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success -type EventAcknowledgementSuccess struct { - Success []byte `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *EventAcknowledgementSuccess) Reset() { *m = EventAcknowledgementSuccess{} } -func (m *EventAcknowledgementSuccess) String() string { return proto.CompactTextString(m) } -func (*EventAcknowledgementSuccess) ProtoMessage() {} -func (*EventAcknowledgementSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{11} -} -func (m *EventAcknowledgementSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAcknowledgementSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAcknowledgementSuccess.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 *EventAcknowledgementSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAcknowledgementSuccess.Merge(m, src) -} -func (m *EventAcknowledgementSuccess) XXX_Size() int { - return m.Size() -} -func (m *EventAcknowledgementSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_EventAcknowledgementSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAcknowledgementSuccess proto.InternalMessageInfo - -func (m *EventAcknowledgementSuccess) GetSuccess() []byte { - if m != nil { - return m.Success - } - return nil -} - -// EventAcknowledgementError is a typed event emitted on packet acknowledgement error -type EventAcknowledgementError struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *EventAcknowledgementError) Reset() { *m = EventAcknowledgementError{} } -func (m *EventAcknowledgementError) String() string { return proto.CompactTextString(m) } -func (*EventAcknowledgementError) ProtoMessage() {} -func (*EventAcknowledgementError) Descriptor() ([]byte, []int) { - return fileDescriptor_a989ebecceb60589, []int{12} -} -func (m *EventAcknowledgementError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAcknowledgementError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAcknowledgementError.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 *EventAcknowledgementError) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAcknowledgementError.Merge(m, src) -} -func (m *EventAcknowledgementError) XXX_Size() int { - return m.Size() -} -func (m *EventAcknowledgementError) XXX_DiscardUnknown() { - xxx_messageInfo_EventAcknowledgementError.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAcknowledgementError proto.InternalMessageInfo - -func (m *EventAcknowledgementError) GetError() string { - if m != nil { - return m.Error - } - return "" -} - func init() { proto.RegisterType((*EventChannelOpenInit)(nil), "ibc.core.channel.v1.EventChannelOpenInit") proto.RegisterType((*EventChannelOpenTry)(nil), "ibc.core.channel.v1.EventChannelOpenTry") proto.RegisterType((*EventChannelOpenAck)(nil), "ibc.core.channel.v1.EventChannelOpenAck") - proto.RegisterType((*EventChannelCloseInit)(nil), "ibc.core.channel.v1.EventChannelCloseInit") proto.RegisterType((*EventChannelOpenConfirm)(nil), "ibc.core.channel.v1.EventChannelOpenConfirm") + proto.RegisterType((*EventChannelCloseInit)(nil), "ibc.core.channel.v1.EventChannelCloseInit") proto.RegisterType((*EventChannelCloseConfirm)(nil), "ibc.core.channel.v1.EventChannelCloseConfirm") proto.RegisterType((*EventChannelSendPacket)(nil), "ibc.core.channel.v1.EventChannelSendPacket") proto.RegisterType((*EventChannelRecvPacket)(nil), "ibc.core.channel.v1.EventChannelRecvPacket") proto.RegisterType((*EventChannelWriteAck)(nil), "ibc.core.channel.v1.EventChannelWriteAck") proto.RegisterType((*EventChannelAckPacket)(nil), "ibc.core.channel.v1.EventChannelAckPacket") proto.RegisterType((*EventChannelTimeoutPacket)(nil), "ibc.core.channel.v1.EventChannelTimeoutPacket") - proto.RegisterType((*EventAcknowledgementSuccess)(nil), "ibc.core.channel.v1.EventAcknowledgementSuccess") - proto.RegisterType((*EventAcknowledgementError)(nil), "ibc.core.channel.v1.EventAcknowledgementError") -} - -func init() { proto.RegisterFile("ibc/core/channel/v1/event.proto", fileDescriptor_a989ebecceb60589) } - -var fileDescriptor_a989ebecceb60589 = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x4e, 0xb2, 0xd9, 0x26, 0x9d, 0xed, 0xb6, 0xbb, 0xd3, 0x64, 0x6b, 0x52, 0x88, 0xcb, 0x9c, - 0x22, 0xa1, 0xb5, 0x09, 0xac, 0xb4, 0x08, 0x89, 0x43, 0x13, 0xad, 0x44, 0x4e, 0x5d, 0xa6, 0x95, - 0x90, 0x7a, 0x29, 0xce, 0x78, 0x48, 0xac, 0x24, 0x33, 0x61, 0x66, 0x12, 0xc8, 0xbf, 0xe0, 0x7f, - 0x20, 0xf1, 0x2f, 0x90, 0x7a, 0xec, 0x81, 0x03, 0x27, 0x0b, 0xb5, 0x12, 0x20, 0x38, 0x20, 0xf9, - 0x17, 0x20, 0x8f, 0xed, 0xc4, 0x0e, 0x3e, 0xb6, 0x48, 0x48, 0x3e, 0x65, 0xe6, 0xbd, 0xef, 0xbd, - 0x37, 0xfa, 0xde, 0x97, 0xf1, 0xb3, 0x81, 0xe9, 0x0d, 0x89, 0x4d, 0xb8, 0xa0, 0x36, 0x19, 0x3b, - 0x8c, 0xd1, 0xa9, 0xbd, 0xec, 0xda, 0x74, 0x49, 0x99, 0xb2, 0xe6, 0x82, 0x2b, 0x0e, 0x0f, 0xbd, - 0x21, 0xb1, 0x42, 0x80, 0x15, 0x03, 0xac, 0x65, 0xb7, 0xf5, 0x7e, 0x5e, 0x54, 0xe2, 0xd7, 0x71, - 0xad, 0xc6, 0x88, 0x8f, 0xb8, 0x5e, 0xda, 0xe1, 0x2a, 0xb6, 0xa6, 0xca, 0x4d, 0x3d, 0xca, 0x94, - 0x8e, 0xd3, 0xab, 0x08, 0x80, 0x7e, 0xaf, 0x80, 0xc6, 0x9b, 0xb0, 0x7c, 0x3f, 0xca, 0x76, 0x36, - 0xa7, 0x6c, 0xc0, 0x3c, 0x05, 0x3f, 0x00, 0xb5, 0x39, 0x17, 0xea, 0xca, 0x73, 0x8d, 0xf2, 0x49, - 0xb9, 0xb3, 0xdb, 0x83, 0x81, 0x6f, 0xee, 0xaf, 0x9c, 0xd9, 0xf4, 0x53, 0x14, 0x3b, 0x10, 0xde, - 0x09, 0x57, 0x03, 0x17, 0xbe, 0x02, 0x20, 0x3e, 0x4d, 0x88, 0xaf, 0x68, 0x7c, 0x33, 0xf0, 0xcd, - 0xe7, 0x11, 0x7e, 0xe3, 0x43, 0x78, 0x37, 0xde, 0x0c, 0x5c, 0xf8, 0x05, 0x68, 0x10, 0xbe, 0x60, - 0x8a, 0x8a, 0xb9, 0x23, 0xd4, 0xea, 0x2a, 0xa9, 0xf7, 0x48, 0xc7, 0x9b, 0x81, 0x6f, 0x1e, 0xc7, - 0xf1, 0x39, 0x28, 0x84, 0x61, 0xda, 0xfc, 0x36, 0x3a, 0xc8, 0x25, 0x38, 0xca, 0x80, 0x53, 0xa7, - 0xaa, 0xea, 0xac, 0x28, 0xf0, 0xcd, 0x76, 0x4e, 0xd6, 0xf4, 0x11, 0x9b, 0x69, 0x4f, 0x7f, 0x7d, - 0xdc, 0xcf, 0xc0, 0x53, 0xc2, 0x19, 0xa3, 0x44, 0x79, 0x9c, 0x85, 0x19, 0x1f, 0xeb, 0x8c, 0x46, - 0xe0, 0x9b, 0x8d, 0x24, 0x63, 0xca, 0x8d, 0xf0, 0xde, 0x66, 0x3f, 0x70, 0xd1, 0x6f, 0x15, 0x70, - 0xb8, 0xcd, 0xf4, 0x85, 0x58, 0x15, 0x44, 0xff, 0x17, 0x44, 0x9f, 0x92, 0x49, 0x41, 0xf4, 0x7d, - 0x13, 0xfd, 0x47, 0x05, 0x34, 0xd3, 0x44, 0xf7, 0xa7, 0x5c, 0xd2, 0xe2, 0xf2, 0x78, 0x08, 0xaa, - 0xff, 0xac, 0x80, 0xa3, 0x6d, 0x4d, 0xf7, 0x39, 0xfb, 0xda, 0x13, 0xb3, 0x82, 0xec, 0xfb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0xf5, 0x23, 0xab, 0x1b, 0x0b, - 0x6d, 0x2b, 0xf0, 0x8d, 0x10, 0x5c, 0xc0, 0x06, 0x78, 0x4c, 0xc3, 0x45, 0xf4, 0x52, 0x82, 0xa3, - 0x4d, 0x0f, 0x5f, 0xdf, 0xb6, 0xcb, 0x37, 0xb7, 0xed, 0xf2, 0xaf, 0xb7, 0xed, 0xf2, 0xf7, 0x77, - 0xed, 0xd2, 0xcd, 0x5d, 0xbb, 0xf4, 0xcb, 0x5d, 0xbb, 0x74, 0xf9, 0xc9, 0xc8, 0x53, 0xe3, 0xc5, - 0xd0, 0x22, 0x7c, 0x66, 0x13, 0x2e, 0x67, 0x5c, 0xc6, 0x3f, 0x2f, 0xa5, 0x3b, 0xb1, 0xbf, 0xb3, - 0xd7, 0xdf, 0x0d, 0x3f, 0x7c, 0xf5, 0x32, 0xf9, 0xe6, 0xa8, 0x56, 0x73, 0x2a, 0x87, 0x3b, 0xfa, - 0xc3, 0xe1, 0xc7, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xdd, 0x0c, 0x83, 0xca, 0x14, 0x00, - 0x00, +} + +func init() { proto.RegisterFile("ibc/core/channel/v1/events.proto", fileDescriptor_d050c542de417654) } + +var fileDescriptor_d050c542de417654 = []byte{ + // 774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0x6e, 0xbb, 0xb2, 0x6e, 0xde, 0xb7, 0xd7, 0x6e, 0xa5, 0x83, 0x66, 0xf8, 0x34, 0x09, 0x2d, + 0x61, 0x30, 0x09, 0x84, 0xc4, 0x61, 0xad, 0x90, 0xe8, 0x69, 0xc3, 0x4c, 0x42, 0xda, 0x65, 0xa4, + 0x8e, 0x69, 0xa3, 0xb6, 0x76, 0x49, 0xdc, 0x42, 0x7f, 0x03, 0x17, 0xfe, 0x07, 0x12,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x7a, 0x33, 0x32, 0x5e, 0x71, 0x1d, 0x65, 0x2b, 0x88, 0x4f, 0x40, 0x21, + 0x0c, 0xa3, 0xe6, 0x23, 0xbf, 0x91, 0x67, 0x60, 0x89, 0x70, 0xc6, 0x28, 0x11, 0x26, 0x67, 0x5e, + 0xae, 0x5b, 0x32, 0x57, 0xd9, 0x75, 0x94, 0x62, 0x98, 0x2b, 0xe2, 0x46, 0x78, 0x71, 0xb2, 0x6f, + 0x18, 0xe8, 0x47, 0x0e, 0xac, 0x4f, 0xb3, 0x71, 0x6c, 0x8d, 0x6e, 0x28, 0x19, 0x27, 0x60, 0x33, + 0x06, 0x8e, 0x74, 0x95, 0x97, 0x59, 0x91, 0xeb, 0x28, 0xd5, 0x84, 0xac, 0xd1, 0x16, 0x4b, 0x51, + 0x4f, 0x7d, 0xdc, 0xee, 0x35, 0x10, 0x7d, 0x40, 0x3a, 0x29, 0xd1, 0x57, 0x4d, 0xf4, 0xaf, 0x1c, + 0xd8, 0x9c, 0x26, 0xba, 0xce, 0xd9, 0x5b, 0xd3, 0xea, 0xa5, 0x64, 0x5f, 0x35, 0xd9, 0x3f, 0x73, + 0xa0, 0x14, 0x25, 0xbb, 0xde, 0xe5, 0x36, 0xbd, 0xc1, 0xa7, 0xe9, 0x7f, 0x4c, 0xf5, 0xef, 0x1c, + 0x28, 0xff, 0x43, 0x75, 0x2a, 0xec, 0x6b, 0x62, 0xfb, 0x73, 0x1e, 0x6c, 0x44, 0xd9, 0x7e, 0x45, + 0x99, 0x71, 0xa4, 0x93, 0x0e, 0x15, 0x10, 0x82, 0xbc, 0xa1, 0x0b, 0x5d, 0x12, 0xbd, 0x88, 0xe5, + 0x1a, 0xbe, 0x01, 0xcb, 0xc2, 0xec, 0x51, 0x3e, 0x10, 0xa7, 0x6d, 0x6a, 0xb6, 0xda, 0x42, 0xd2, + 0xba, 0xf0, 0xb0, 0xa2, 0x4e, 0x2e, 0x37, 0xfe, 0x25, 0x64, 0xb8, 0xa7, 0x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ab, 0x05, 0x53, 0x32, 0x4c, 0xd5, 0x92, 0xaa, 0x25, 0x59, 0x2d, 0x7f, 0x66, + 0xe2, 0xff, 0x40, 0x5e, 0x5b, 0xa6, 0xa0, 0xde, 0x5d, 0x30, 0xd5, 0xca, 0x8d, 0xd2, 0xca, 0x0e, + 0x58, 0xd1, 0x49, 0x87, 0xf1, 0xf7, 0x5d, 0x6a, 0xb4, 0x68, 0x8f, 0x32, 0x21, 0xa5, 0xb2, 0x88, + 0xa7, 0xcd, 0xe8, 0x6b, 0x3e, 0x7e, 0x4d, 0x3a, 0x20, 0x9d, 0xf4, 0x78, 0x48, 0x8f, 0x87, 0xc4, + 0xe3, 0x21, 0x49, 0x56, 0x20, 0x59, 0x56, 0x5f, 0xf2, 0xe0, 0x76, 0x54, 0x56, 0xc7, 0xfe, 0x70, + 0x52, 0x69, 0xa5, 0xd2, 0x4a, 0x94, 0x56, 0x0d, 0x9f, 0x5d, 0x54, 0xb3, 0xe7, 0x17, 0xd5, 0xec, + 0xf7, 0x8b, 0x6a, 0xf6, 0xd3, 0x65, 0x35, 0x73, 0x7e, 0x59, 0xcd, 0x7c, 0xbb, 0xac, 0x66, 0x4e, + 0x9e, 0xb4, 0x4c, 0xd1, 0x1e, 0x34, 0x55, 0xc2, 0x7b, 0x1a, 0xe1, 0x76, 0x8f, 0xdb, 0xc1, 0x67, + 0xd7, 0x36, 0x3a, 0xda, 0x07, 0x6d, 0xfc, 0xaa, 0xf6, 0x60, 0x7f, 0x37, 0x7c, 0x91, 0x13, 0xa3, + 0x3e, 0xb5, 0x9b, 0xb3, 0xf2, 0x59, 0xed, 0xd1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xbf, + 0x65, 0x34, 0xe9, 0x13, 0x00, 0x00, } func (m *EventChannelOpenInit) Marshal() (dAtA []byte, err error) { @@ -1235,35 +1123,28 @@ func (m *EventChannelOpenInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } - if len(m.CounterpartyChannelId) > 0 { - i -= len(m.CounterpartyChannelId) - copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) - i-- - dAtA[i] = 0x22 - } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } @@ -1293,35 +1174,35 @@ func (m *EventChannelOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } if len(m.CounterpartyChannelId) > 0 { i -= len(m.CounterpartyChannelId) copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyChannelId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } @@ -1351,42 +1232,42 @@ func (m *EventChannelOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } if len(m.CounterpartyChannelId) > 0 { i -= len(m.CounterpartyChannelId) copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyChannelId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *EventChannelCloseInit) Marshal() (dAtA []byte, err error) { +func (m *EventChannelOpenConfirm) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1396,12 +1277,12 @@ func (m *EventChannelCloseInit) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventChannelCloseInit) MarshalTo(dAtA []byte) (int, error) { +func (m *EventChannelOpenConfirm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventChannelCloseInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1409,42 +1290,42 @@ func (m *EventChannelCloseInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } if len(m.CounterpartyChannelId) > 0 { i -= len(m.CounterpartyChannelId) copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyChannelId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *EventChannelOpenConfirm) Marshal() (dAtA []byte, err error) { +func (m *EventChannelCloseInit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1454,12 +1335,12 @@ func (m *EventChannelOpenConfirm) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventChannelOpenConfirm) MarshalTo(dAtA []byte) (int, error) { +func (m *EventChannelCloseInit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventChannelCloseInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1467,35 +1348,35 @@ func (m *EventChannelOpenConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } if len(m.CounterpartyChannelId) > 0 { i -= len(m.CounterpartyChannelId) copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyChannelId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } @@ -1525,35 +1406,35 @@ func (m *EventChannelCloseConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.ConnectionId) > 0 { i -= len(m.ConnectionId) copy(dAtA[i:], m.ConnectionId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ConnectionId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ConnectionId))) i-- dAtA[i] = 0x2a } if len(m.CounterpartyChannelId) > 0 { i -= len(m.CounterpartyChannelId) copy(dAtA[i:], m.CounterpartyChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyChannelId))) i-- dAtA[i] = 0x22 } if len(m.CounterpartyPortId) > 0 { i -= len(m.CounterpartyPortId) copy(dAtA[i:], m.CounterpartyPortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CounterpartyPortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.CounterpartyPortId))) i-- dAtA[i] = 0x1a } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ChannelId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) - i = encodeVarintEvent(dAtA, i, uint64(len(m.PortId))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } @@ -1581,45 +1462,45 @@ func (m *EventChannelSendPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) var l int _ = l if m.ChannelOrdering != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i = encodeVarintEvents(dAtA, i, uint64(m.ChannelOrdering)) i-- dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstChannel))) i-- dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstPort))) i-- dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcChannel))) i-- dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcPort))) i-- dAtA[i] = 0x2a } if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i = encodeVarintEvents(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i = encodeVarintEvents(dAtA, i, uint64(m.TimeoutTimestamp)) i-- dAtA[i] = 0x18 } @@ -1629,14 +1510,14 @@ func (m *EventChannelSendPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0xa } @@ -1663,56 +1544,46 @@ func (m *EventChannelRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } if m.ChannelOrdering != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i = encodeVarintEvents(dAtA, i, uint64(m.ChannelOrdering)) i-- dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstChannel))) i-- dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstPort))) i-- dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcChannel))) i-- dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcPort))) i-- dAtA[i] = 0x2a } if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i = encodeVarintEvents(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i = encodeVarintEvents(dAtA, i, uint64(m.TimeoutTimestamp)) i-- dAtA[i] = 0x18 } @@ -1722,14 +1593,14 @@ func (m *EventChannelRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0xa } @@ -1759,45 +1630,45 @@ func (m *EventChannelWriteAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Acknowledgement) > 0 { i -= len(m.Acknowledgement) copy(dAtA[i:], m.Acknowledgement) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Acknowledgement))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Acknowledgement))) i-- dAtA[i] = 0x4a } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstChannel))) i-- dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstPort))) i-- dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcChannel))) i-- dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcPort))) i-- dAtA[i] = 0x2a } if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i = encodeVarintEvents(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i = encodeVarintEvents(dAtA, i, uint64(m.TimeoutTimestamp)) i-- dAtA[i] = 0x18 } @@ -1807,14 +1678,14 @@ func (m *EventChannelWriteAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0xa } @@ -1844,50 +1715,50 @@ func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Acknowledgement) > 0 { i -= len(m.Acknowledgement) copy(dAtA[i:], m.Acknowledgement) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Acknowledgement))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Acknowledgement))) i-- dAtA[i] = 0x52 } if m.ChannelOrdering != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i = encodeVarintEvents(dAtA, i, uint64(m.ChannelOrdering)) i-- dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstChannel))) i-- dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstPort))) i-- dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcChannel))) i-- dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcPort))) i-- dAtA[i] = 0x2a } if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i = encodeVarintEvents(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i = encodeVarintEvents(dAtA, i, uint64(m.TimeoutTimestamp)) i-- dAtA[i] = 0x18 } @@ -1897,14 +1768,14 @@ func (m *EventChannelAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0xa } @@ -1932,45 +1803,45 @@ func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, erro var l int _ = l if m.ChannelOrdering != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.ChannelOrdering)) + i = encodeVarintEvents(dAtA, i, uint64(m.ChannelOrdering)) i-- dAtA[i] = 0x48 } if len(m.DstChannel) > 0 { i -= len(m.DstChannel) copy(dAtA[i:], m.DstChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstChannel))) i-- dAtA[i] = 0x42 } if len(m.DstPort) > 0 { i -= len(m.DstPort) copy(dAtA[i:], m.DstPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.DstPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstPort))) i-- dAtA[i] = 0x3a } if len(m.SrcChannel) > 0 { i -= len(m.SrcChannel) copy(dAtA[i:], m.SrcChannel) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcChannel))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcChannel))) i-- dAtA[i] = 0x32 } if len(m.SrcPort) > 0 { i -= len(m.SrcPort) copy(dAtA[i:], m.SrcPort) - i = encodeVarintEvent(dAtA, i, uint64(len(m.SrcPort))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcPort))) i-- dAtA[i] = 0x2a } if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) + i = encodeVarintEvents(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x20 } if m.TimeoutTimestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.TimeoutTimestamp)) + i = encodeVarintEvents(dAtA, i, uint64(m.TimeoutTimestamp)) i-- dAtA[i] = 0x18 } @@ -1980,82 +1851,22 @@ func (m *EventChannelTimeoutPacket) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAcknowledgementSuccess) 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 *EventAcknowledgementSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAcknowledgementSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Success) > 0 { - i -= len(m.Success) - copy(dAtA[i:], m.Success) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Success))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAcknowledgementError) 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 *EventAcknowledgementError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAcknowledgementError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Error))) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { - offset -= sovEvent(v) +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -2073,23 +1884,19 @@ func (m *EventChannelOpenInit) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.CounterpartyChannelId) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2102,23 +1909,23 @@ func (m *EventChannelOpenTry) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2131,28 +1938,28 @@ func (m *EventChannelOpenAck) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } -func (m *EventChannelCloseInit) Size() (n int) { +func (m *EventChannelOpenConfirm) Size() (n int) { if m == nil { return 0 } @@ -2160,28 +1967,28 @@ func (m *EventChannelCloseInit) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } -func (m *EventChannelOpenConfirm) Size() (n int) { +func (m *EventChannelCloseInit) Size() (n int) { if m == nil { return 0 } @@ -2189,23 +1996,23 @@ func (m *EventChannelOpenConfirm) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2218,23 +2025,23 @@ func (m *EventChannelCloseConfirm) Size() (n int) { _ = l l = len(m.PortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyPortId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.CounterpartyChannelId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.ConnectionId) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2247,34 +2054,34 @@ func (m *EventChannelSendPacket) Size() (n int) { _ = l l = len(m.Data) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) if m.TimeoutTimestamp != 0 { - n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + n += 1 + sovEvents(uint64(m.TimeoutTimestamp)) } if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) + n += 1 + sovEvents(uint64(m.Sequence)) } l = len(m.SrcPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.SrcChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } if m.ChannelOrdering != 0 { - n += 1 + sovEvent(uint64(m.ChannelOrdering)) + n += 1 + sovEvents(uint64(m.ChannelOrdering)) } return n } @@ -2287,37 +2094,34 @@ func (m *EventChannelRecvPacket) Size() (n int) { _ = l l = len(m.Data) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) if m.TimeoutTimestamp != 0 { - n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + n += 1 + sovEvents(uint64(m.TimeoutTimestamp)) } if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) + n += 1 + sovEvents(uint64(m.Sequence)) } l = len(m.SrcPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.SrcChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } if m.ChannelOrdering != 0 { - n += 1 + sovEvent(uint64(m.ChannelOrdering)) - } - if m.Success { - n += 2 + n += 1 + sovEvents(uint64(m.ChannelOrdering)) } return n } @@ -2330,35 +2134,35 @@ func (m *EventChannelWriteAck) Size() (n int) { _ = l l = len(m.Data) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) if m.TimeoutTimestamp != 0 { - n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + n += 1 + sovEvents(uint64(m.TimeoutTimestamp)) } if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) + n += 1 + sovEvents(uint64(m.Sequence)) } l = len(m.SrcPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.SrcChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.Acknowledgement) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2371,38 +2175,38 @@ func (m *EventChannelAckPacket) Size() (n int) { _ = l l = len(m.Data) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) if m.TimeoutTimestamp != 0 { - n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + n += 1 + sovEvents(uint64(m.TimeoutTimestamp)) } if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) + n += 1 + sovEvents(uint64(m.Sequence)) } l = len(m.SrcPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.SrcChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } if m.ChannelOrdering != 0 { - n += 1 + sovEvent(uint64(m.ChannelOrdering)) + n += 1 + sovEvents(uint64(m.ChannelOrdering)) } l = len(m.Acknowledgement) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } return n } @@ -2415,69 +2219,43 @@ func (m *EventChannelTimeoutPacket) Size() (n int) { _ = l l = len(m.Data) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = m.TimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) if m.TimeoutTimestamp != 0 { - n += 1 + sovEvent(uint64(m.TimeoutTimestamp)) + n += 1 + sovEvents(uint64(m.TimeoutTimestamp)) } if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) + n += 1 + sovEvents(uint64(m.Sequence)) } l = len(m.SrcPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.SrcChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstPort) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } l = len(m.DstChannel) if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + l + sovEvents(uint64(l)) } if m.ChannelOrdering != 0 { - n += 1 + sovEvent(uint64(m.ChannelOrdering)) - } - return n -} - -func (m *EventAcknowledgementSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Success) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - -func (m *EventAcknowledgementError) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) + n += 1 + sovEvents(uint64(m.ChannelOrdering)) } return n } -func sovEvent(x uint64) (n int) { +func sovEvents(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 sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2487,7 +2265,7 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2515,7 +2293,7 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2529,11 +2307,11 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2547,7 +2325,7 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2561,11 +2339,11 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2579,7 +2357,7 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2593,49 +2371,17 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF } m.CounterpartyPortId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannelId", 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.CounterpartyChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) @@ -2643,7 +2389,7 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2657,11 +2403,11 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2670,15 +2416,15 @@ func (m *EventChannelOpenInit) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2700,7 +2446,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2728,7 +2474,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2742,11 +2488,11 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2760,7 +2506,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2774,11 +2520,11 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2792,7 +2538,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2806,11 +2552,11 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2824,7 +2570,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2838,11 +2584,11 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2856,7 +2602,7 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2870,11 +2616,11 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2883,15 +2629,15 @@ func (m *EventChannelOpenTry) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2913,7 +2659,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2941,7 +2687,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2955,11 +2701,11 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -2973,7 +2719,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2987,11 +2733,11 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3005,7 +2751,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3019,11 +2765,11 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3037,7 +2783,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3051,11 +2797,11 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3069,7 +2815,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3083,11 +2829,11 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3096,15 +2842,15 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3118,7 +2864,7 @@ func (m *EventChannelOpenAck) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { +func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3126,7 +2872,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3141,10 +2887,10 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventChannelCloseInit: wiretype end group for non-group") + return fmt.Errorf("proto: EventChannelOpenConfirm: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventChannelCloseInit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventChannelOpenConfirm: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3154,7 +2900,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3168,11 +2914,11 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3186,7 +2932,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3200,11 +2946,11 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3218,7 +2964,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3232,11 +2978,11 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3250,7 +2996,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3264,11 +3010,11 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3282,7 +3028,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3296,11 +3042,11 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3309,15 +3055,15 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3331,7 +3077,7 @@ func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { +func (m *EventChannelCloseInit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3339,7 +3085,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3354,10 +3100,10 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventChannelOpenConfirm: wiretype end group for non-group") + return fmt.Errorf("proto: EventChannelCloseInit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventChannelOpenConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventChannelCloseInit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3367,7 +3113,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3381,11 +3127,11 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3399,7 +3145,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3413,11 +3159,11 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3431,7 +3177,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3445,11 +3191,11 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3463,7 +3209,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3477,11 +3223,11 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3495,7 +3241,7 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3509,11 +3255,11 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3522,15 +3268,15 @@ func (m *EventChannelOpenConfirm) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3552,7 +3298,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3580,7 +3326,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3594,11 +3340,11 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3612,7 +3358,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3626,11 +3372,11 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3644,7 +3390,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3658,11 +3404,11 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3676,7 +3422,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3690,11 +3436,11 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3708,7 +3454,7 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3722,11 +3468,11 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3735,15 +3481,15 @@ func (m *EventChannelCloseConfirm) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3765,7 +3511,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3793,7 +3539,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3806,11 +3552,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3827,7 +3573,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3840,11 +3586,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3860,7 +3606,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3879,7 +3625,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3898,7 +3644,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3912,11 +3658,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3930,7 +3676,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3944,11 +3690,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3962,7 +3708,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3976,11 +3722,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -3994,7 +3740,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4008,11 +3754,11 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4026,7 +3772,7 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { m.ChannelOrdering = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4040,15 +3786,15 @@ func (m *EventChannelSendPacket) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4070,7 +3816,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4098,7 +3844,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4111,11 +3857,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4132,7 +3878,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4145,11 +3891,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4165,7 +3911,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4184,7 +3930,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4203,7 +3949,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4217,11 +3963,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4235,7 +3981,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4249,11 +3995,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4267,7 +4013,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4281,11 +4027,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4299,7 +4045,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4313,11 +4059,11 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4331,7 +4077,7 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { m.ChannelOrdering = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4343,37 +4089,17 @@ func (m *EventChannelRecvPacket) Unmarshal(dAtA []byte) error { break } } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4395,7 +4121,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4423,7 +4149,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4436,11 +4162,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4457,7 +4183,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4470,11 +4196,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4490,7 +4216,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4509,7 +4235,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4528,7 +4254,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4542,11 +4268,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4560,7 +4286,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4574,11 +4300,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4592,7 +4318,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4606,11 +4332,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4624,7 +4350,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4638,11 +4364,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4656,7 +4382,7 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4669,11 +4395,11 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4685,15 +4411,15 @@ func (m *EventChannelWriteAck) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4715,7 +4441,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4743,7 +4469,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4756,11 +4482,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4777,7 +4503,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4790,11 +4516,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4810,7 +4536,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4829,7 +4555,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4848,7 +4574,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4862,11 +4588,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4880,7 +4606,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4894,11 +4620,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4912,7 +4638,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4926,11 +4652,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4944,7 +4670,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4958,11 +4684,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -4976,7 +4702,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { m.ChannelOrdering = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4995,7 +4721,7 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5008,11 +4734,11 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5024,15 +4750,15 @@ func (m *EventChannelAckPacket) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5054,7 +4780,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5082,7 +4808,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5095,11 +4821,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5116,7 +4842,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5129,11 +4855,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5149,7 +4875,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5168,7 +4894,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5187,7 +4913,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5201,11 +4927,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5219,7 +4945,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5233,11 +4959,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5251,7 +4977,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5265,11 +4991,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5283,7 +5009,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5297,11 +5023,11 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if postIndex > l { return io.ErrUnexpectedEOF @@ -5315,7 +5041,7 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { m.ChannelOrdering = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEvent + return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5329,187 +5055,15 @@ func (m *EventChannelTimeoutPacket) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAcknowledgementSuccess) 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: EventAcknowledgementSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAcknowledgementSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Success = append(m.Success[:0], dAtA[iNdEx:postIndex]...) - if m.Success == nil { - m.Success = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAcknowledgementError) 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: EventAcknowledgementError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAcknowledgementError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) + skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEvent + return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5523,7 +5077,7 @@ func (m *EventAcknowledgementError) Unmarshal(dAtA []byte) error { } return nil } -func skipEvent(dAtA []byte) (n int, err error) { +func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -5531,7 +5085,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -5548,7 +5102,7 @@ func skipEvent(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -5564,7 +5118,7 @@ func skipEvent(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEvent + return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -5577,14 +5131,14 @@ func skipEvent(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvent + return 0, ErrUnexpectedEndOfGroupEvents } depth-- case 5: @@ -5593,7 +5147,7 @@ func skipEvent(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthEvent + return 0, ErrInvalidLengthEvents } if depth == 0 { return iNdEx, nil @@ -5603,7 +5157,7 @@ func skipEvent(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index 9f42f7aac92c..46a83eb19bbf 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -46,13 +46,6 @@ func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateCl return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - ) - return &clienttypes.MsgCreateClientResponse{}, nil } @@ -69,13 +62,6 @@ func (k Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateCl return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - ) - return &clienttypes.MsgUpdateClientResponse{}, nil } @@ -97,13 +83,6 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, clienttypes.AttributeValueCategory), - ), - ) - return &clienttypes.MsgUpgradeClientResponse{}, nil } @@ -144,22 +123,14 @@ func (k Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.M if err := ctx.EventManager().EmitTypedEvent( &connectiontypes.EventConnectionOpenInit{ - ConnectionId: connectionID, - ClientId: msg.ClientId, - CounterpartyClientId: msg.Counterparty.ClientId, - CounterpartyConnectionId: msg.Counterparty.ConnectionId, + ConnectionId: connectionID, + ClientId: msg.ClientId, + CounterpartyClientId: msg.Counterparty.ClientId, }, ); err != nil { return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - ) - return &connectiontypes.MsgConnectionOpenInitResponse{}, nil } @@ -192,13 +163,6 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - ) - return &connectiontypes.MsgConnectionOpenTryResponse{}, nil } @@ -231,13 +195,6 @@ func (k Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.Ms return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - ) - return &connectiontypes.MsgConnectionOpenAckResponse{}, nil } @@ -264,13 +221,6 @@ func (k Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontype return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, connectiontypes.AttributeValueCategory), - ), - ) - return &connectiontypes.MsgConnectionOpenConfirmResponse{}, nil } diff --git a/x/ibc/core/spec/06_events.md b/x/ibc/core/spec/06_events.md index 528a30cffa41..af92ad727e94 100644 --- a/x/ibc/core/spec/06_events.md +++ b/x/ibc/core/spec/06_events.md @@ -6,8 +6,7 @@ order: 6 The IBC module emits the following events. It can be expected that the type `message`, with an attirbute key of `action` will represent the first event for each message -being processed as emitted by the SDK's baseapp. Each IBC TAO message will -also emit its module name in the format 'ibc_sub-modulename'. +being processed as emitted by the SDK's baseapp. All the events for the Channel handshakes, `SendPacket`, `RecvPacket`, `AcknowledgePacket`, `TimeoutPacket` and `TimeoutOnClose` will emit additional events not specified here due to @@ -17,43 +16,50 @@ callbacks to IBC applications. ### MsgCreateClient -| Type | Attribute Key | Attribute Value | -|---------------|------------------|-------------------| -| create_client | client_id | {clientId} | -| create_client | client_type | {clientType} | -| create_client | consensus_height | {consensusHeight} | -| message | action | create_client | -| message | module | ibc_client | +| Type | Attribute Key | Attribute Value | +|--------------------------------------|------------------|-------------------| +| ibc-core-client-v1-EventCreateClient | client_id | {clientId} | +| ibc-core-client-v1-EventCreateClient | client_type | {clientType} | +| ibc-core-client-v1-EventCreateClient | consensus_height | {consensusHeight} | +| message | action | create_client | ### MsgUpdateClient -| Type | Attribute Key | Attribute Value | -|---------------|------------------|-------------------| -| update_client | client_id | {clientId} | -| update_client | client_type | {clientType} | -| update_client | consensus_height | {consensusHeight} | -| message | action | update_client | -| message | module | ibc_client | +| Type | Attribute Key | Attribute Value | +|--------------------------------------|------------------|-------------------| +| ibc-core-client-v1-EventUpdateClient | client_id | {clientId} | +| ibc-core-client-v1-EventUpdateClient | client_type | {clientType} | +| ibc-core-client-v1-EventUpdateClient | consensus_height | {consensusHeight} | +| message | action | update_client | + +### MsgUpgradeClient + +| Type | Attribute Key | Attribute Value | +|---------------------------------------|------------------|-------------------| +| ibc-core-client-v1-EventUpgradeClient | client_id | {clientId} | +| ibc-core-client-v1-EventUpgradeClient | client_type | {clientType} | +| ibc-core-client-v1-EventUpgradeClient | consensus_height | {consensusHeight} | +| message | action | upgrade_client | ### MsgSubmitMisbehaviour -| Type | Attribute Key | Attribute Value | -|---------------------|------------------|---------------------| -| client_misbehaviour | client_id | {clientId} | -| client_misbehaviour | client_type | {clientType} | -| client_misbehaviour | consensus_height | {consensusHeight} | -| message | action | client_misbehaviour | -| message | module | evidence | -| message | sender | {senderAddress} | -| submit_evidence | evidence_hash | {evidenceHash} | +| Type | Attribute Key | Attribute Value | +|--------------------------------------------|------------------|---------------------| +| ibc-core-client-v1-EventClientMisbehaviour | client_id | {clientId} | +| ibc-core-client-v1-EventClientMisbehaviour | client_type | {clientType} | +| ibc-core-client-v1-EventClientMisbehaviour | consensus_height | {consensusHeight} | +| message | action | client_misbehaviour | +| message | module | evidence | +| message | sender | {senderAddress} | +| submit_evidence | evidence_hash | {evidenceHash} | ### UpdateClientProposal -| Type | Attribute Key | Attribute Value | -|------------------------|------------------|-------------------| -| update_client_proposal | client_id | {clientId} | -| update_client_proposal | client_type | {clientType} | -| update_client_proposal | consensus_height | {consensusHeight} | +| Type | Attribute Key | Attribute Value | +|----------------------------------------------|------------------|-------------------| +| ibc-core-client-v1-EventUpdateClientProposal | client_id | {clientId} | +| ibc-core-client-v1-EventUpdateClientProposal | client_type | {clientType} | +| ibc-core-client-v1-EventUpdateClientProposal | consensus_height | {consensusHeight} | @@ -61,181 +67,183 @@ callbacks to IBC applications. ### MsgConnectionOpenInit -| Type | Attribute Key | Attribute Value | -|----------------------|----------------------------|-----------------------------| -| connection_open_init | connection_id | {connectionId} | -| connection_open_init | client_id | {clientId} | -| connection_open_init | counterparty_client_id | {counterparty.clientId} | -| message | action | connection_open_init | -| message | module | ibc_connection | +| Type | Attribute Key | Attribute Value | +|------------------------------------------------|----------------------------|-----------------------------| +| ibc-core-connection-v1-EventConnectionOpenInit | connection_id | {connectionId} | +| ibc-core-connection-v1-EventConnectionOpenInit | client_id | {clientId} | +| ibc-core-connection-v1-EventConnectionOpenInit | counterparty_client_id | {counterparty.clientId} | +| message | action | connection_open_init | ### MsgConnectionOpenTry -| Type | Attribute Key | Attribute Value | -|---------------------|----------------------------|-----------------------------| -| connection_open_try | connection_id | {connectionId} | -| connection_open_try | client_id | {clientId} | -| connection_open_try | counterparty_client_id | {counterparty.clientId | -| connection_open_try | counterparty_connection_id | {counterparty.connectionId} | -| message | action | connection_open_try | -| message | module | ibc_connection | +| Type | Attribute Key | Attribute Value | +|-----------------------------------------------|----------------------------|-----------------------------| +| ibc-core-connection-v1-EventConnectionOpenTry | connection_id | {connectionId} | +| ibc-core-connection-v1-EventConnectionOpenTry | client_id | {clientId} | +| ibc-core-connection-v1-EventConnectionOpenTry | counterparty_client_id | {counterparty.clientId | +| ibc-core-connection-v1-EventConnectionOpenTry | counterparty_connection_id | {counterparty.connectionId} | +| message | action | connection_open_try | ### MsgConnectionOpenAck -| Type | Attribute Key | Attribute Value | -|----------------------|----------------------------|-----------------------------| -| connection_open_ack | connection_id | {connectionId} | -| connection_open_ack | client_id | {clientId} | -| connection_open_ack | counterparty_client_id | {counterparty.clientId} | -| connection_open_ack | counterparty_connection_id | {counterparty.connectionId} | -| message | module | ibc_connection | -| message | action | connection_open_ack | +| Type | Attribute Key | Attribute Value | +|------------------------------------------------|----------------------------|-----------------------------| +| ibc-core-connection-v1-EventConnectionOpenAck | connection_id | {connectionId} | +| ibc-core-connection-v1-EventConnectionOpenAck | client_id | {clientId} | +| ibc-core-connection-v1-EventConnectionOpenAck | counterparty_client_id | {counterparty.clientId} | +| ibc-core-connection-v1-EventConnectionOpenAck | counterparty_connection_id | {counterparty.connectionId} | +| message | action | connection_open_ack | ### MsgConnectionOpenConfirm -| Type | Attribute Key | Attribute Value | -|-------------------------|----------------------------|-----------------------------| -| connection_open_confirm | connection_id | {connectionId} | -| connection_open_confirm | client_id | {clientId} | -| connection_open_confirm | counterparty_client_id | {counterparty.clientId} | -| connection_open_confirm | counterparty_connection_id | {counterparty.connectionId} | -| message | action | connection_open_confirm | -| message | module | ibc_connection | +| Type | Attribute Key | Attribute Value | +|---------------------------------------------------|----------------------------|-----------------------------| +| ibc-core-connection-v1-EventConnectionOpenConfirm | connection_id | {connectionId} | +| ibc-core-connection-v1-EventConnectionOpenConfirm | client_id | {clientId} | +| ibc-core-connection-v1-EventConnectionOpenConfirm | counterparty_client_id | {counterparty.clientId} | +| ibc-core-connection-v1-EventConnectionOpenConfirm | counterparty_connection_id | {counterparty.connectionId} | +| message | action | connection_open_confirm | ## ICS 04 - Channel ### MsgChannelOpenInit -| Type | Attribute Key | Attribute Value | -|-------------------|-------------------------|----------------------------------| -| channel_open_init | port_id | {portId} | -| channel_open_init | channel_id | {channelId} | -| channel_open_init | counterparty_port_id | {channel.counterparty.portId} | -| channel_open_init | connection_id | {channel.connectionHops} | -| message | action | channel_open_init | -| message | module | ibc_channel | +| Type | Attribute Key | Attribute Value | +|------------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelOpenInit | port_id | {portId} | +| ibc-core-channel-v1-EventChannelOpenInit | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelOpenInit | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelOpenInit | connection_id | {channel.connectionHops} | +| message | action | channel_open_init | ### MsgChannelOpenTry -| Type | Attribute Key | Attribute Value | -|------------------|-------------------------|----------------------------------| -| channel_open_try | port_id | {portId} | -| channel_open_try | channel_id | {channelId} | -| channel_open_try | counterparty_port_id | {channel.counterparty.portId} | -| channel_open_try | counterparty_channel_id | {channel.counterparty.channelId} | -| channel_open_try | connection_id | {channel.connectionHops} | -| message | action | channel_open_try | -| message | module | ibc_channel | +| Type | Attribute Key | Attribute Value | +|-----------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelOpenTry | port_id | {portId} | +| ibc-core-channel-v1-EventChannelOpenTry | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelOpenTry | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelOpenTry | counterparty_channel_id | {channel.counterparty.channelId} | +| ibc-core-channel-v1-EventChannelOpenTry | connection_id | {channel.connectionHops} | +| message | action | channel_open_try | ### MsgChannelOpenAck -| Type | Attribute Key | Attribute Value | -|------------------|-------------------------|----------------------------------| -| channel_open_ack | port_id | {portId} | -| channel_open_ack | channel_id | {channelId} | -| channel_open_ack | counterparty_port_id | {channel.counterparty.portId} | -| channel_open_ack | counterparty_channel_id | {channel.counterparty.channelId} | -| channel_open_ack | connection_id | {channel.connectionHops} | -| message | action | channel_open_ack | -| message | module | ibc_channel | +| Type | Attribute Key | Attribute Value | +|-----------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelOpenAck | port_id | {portId} | +| ibc-core-channel-v1-EventChannelOpenAck | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelOpenAck | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelOpenAck | counterparty_channel_id | {channel.counterparty.channelId} | +| ibc-core-channel-v1-EventChannelOpenAck | connection_id | {channel.connectionHops} | +| message | action | channel_open_ack | ### MsgChannelOpenConfirm -| Type | Attribute Key | Attribute Value | -|----------------------|-------------------------|----------------------------------| -| channel_open_confirm | port_id | {portId} | -| channel_open_confirm | channel_id | {channelId} | -| channel_open_confirm | counterparty_port_id | {channel.counterparty.portId} | -| channel_open_confirm | counterparty_channel_id | {channel.counterparty.channelId} | -| channel_open_confirm | connection_id | {channel.connectionHops} | -| message | module | ibc_channel | -| message | action | channel_open_confirm | +| Type | Attribute Key | Attribute Value | +|---------------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelOpenConfirm | port_id | {portId} | +| ibc-core-channel-v1-EventChannelOpenConfirm | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelOpenConfirm | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelOpenConfirm | counterparty_channel_id | {channel.counterparty.channelId} | +| ibc-core-channel-v1-EventChannelOpenConfirm | connection_id | {channel.connectionHops} | +| message | action | channel_open_confirm | ### MsgChannelCloseInit -| Type | Attribute Key | Attribute Value | -|--------------------|-------------------------|----------------------------------| -| channel_close_init | port_id | {portId} | -| channel_close_init | channel_id | {channelId} | -| channel_close_init | counterparty_port_id | {channel.counterparty.portId} | -| channel_close_init | counterparty_channel_id | {channel.counterparty.channelId} | -| channel_close_init | connection_id | {channel.connectionHops} | -| message | action | channel_close_init | -| message | module | ibc_channel | +| Type | Attribute Key | Attribute Value | +|-------------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelCloseInit | port_id | {portId} | +| ibc-core-channel-v1-EventChannelCloseInit | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelCloseInit | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelCloseInit | counterparty_channel_id | {channel.counterparty.channelId} | +| ibc-core-channel-v1-EventChannelCloseInit | connection_id | {channel.connectionHops} | +| message | action | channel_close_init | ### MsgChannelCloseConfirm -| Type | Attribute Key | Attribute Value | -|-----------------------|-------------------------|----------------------------------| -| channel_close_confirm | port_id | {portId} | -| channel_close_confirm | channel_id | {channelId} | -| channel_close_confirm | counterparty_port_id | {channel.counterparty.portId} | -| channel_close_confirm | counterparty_channel_id | {channel.counterparty.channelId} | -| channel_close_confirm | connection_id | {channel.connectionHops} | -| message | action | channel_close_confirm | -| message | module | ibc_channel | +| Type | Attribute Key | Attribute Value | +|----------------------------------------------|-------------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelCloseConfirm | port_id | {portId} | +| ibc-core-channel-v1-EventChannelCloseConfirm | channel_id | {channelId} | +| ibc-core-channel-v1-EventChannelCloseConfirm | counterparty_port_id | {channel.counterparty.portId} | +| ibc-core-channel-v1-EventChannelCloseConfirm | counterparty_channel_id | {channel.counterparty.channelId} | +| ibc-core-channel-v1-EventChannelCloseConfirm | connection_id | {channel.connectionHops} | +| message | action | channel_close_confirm | ### SendPacket (application module call) -| Type | Attribute Key | Attribute Value | -|-------------|--------------------------|----------------------------------| -| send_packet | packet_data | {data} | -| send_packet | packet_timeout_height | {timeoutHeight} | -| send_packet | packet_timeout_timestamp | {timeoutTimestamp} | -| send_packet | packet_sequence | {sequence} | -| send_packet | packet_src_port | {sourcePort} | -| send_packet | packet_src_channel | {sourceChannel} | -| send_packet | packet_dst_port | {destinationPort} | -| send_packet | packet_dst_channel | {destinationChannel} | -| send_packet | packet_channel_ordering | {channel.Ordering} | -| message | action | application-module-defined-field | -| message | module | ibc-channel | +| Type | Attribute Key | Attribute Value | +|--------------------------------------------|-------------------|----------------------------------| +| ibc-core-channel-v1-EventChannelSendPacket | data | {data} | +| ibc-core-channel-v1-EventChannelSendPacket | timeout_height | {timeoutHeight} | +| ibc-core-channel-v1-EventChannelSendPacket | timeout_timestamp | {timeoutTimestamp} | +| ibc-core-channel-v1-EventChannelSendPacket | sequence | {sequence} | +| ibc-core-channel-v1-EventChannelSendPacket | src_port | {sourcePort} | +| ibc-core-channel-v1-EventChannelSendPacket | src_channel | {sourceChannel} | +| ibc-core-channel-v1-EventChannelSendPacket | dst_port | {destinationPort} | +| ibc-core-channel-v1-EventChannelSendPacket | dst_channel | {destinationChannel} | +| ibc-core-channel-v1-EventChannelSendPacket | channel_ordering | {channel.Ordering} | +| message | action | application-module-defined-field | ### MsgRecvPacket -| Type | Attribute Key | Attribute Value | -|-------------|--------------------------|----------------------| -| recv_packet | packet_data | {data} | -| recv_packet | packet_ack | {acknowledgement} | -| recv_packet | packet_timeout_height | {timeoutHeight} | -| recv_packet | packet_timeout_timestamp | {timeoutTimestamp} | -| recv_packet | packet_sequence | {sequence} | -| recv_packet | packet_src_port | {sourcePort} | -| recv_packet | packet_src_channel | {sourceChannel} | -| recv_packet | packet_dst_port | {destinationPort} | -| recv_packet | packet_dst_channel | {destinationChannel} | -| recv_packet | packet_channel_ordering | {channel.Ordering} | -| message | action | recv_packet | -| message | module | ibc-channel | +| Type | Attribute Key | Attribute Value | +|--------------------------------------------|-------------------|----------------------| +| ibc-core-channel-v1-EventChannelRecvPacket | data | {data} | +| ibc-core-channel-v1-EventChannelRecvPacket | timeout_height | {timeoutHeight} | +| ibc-core-channel-v1-EventChannelRecvPacket | timeout_timestamp | {timeoutTimestamp} | +| ibc-core-channel-v1-EventChannelRecvPacket | sequence | {sequence} | +| ibc-core-channel-v1-EventChannelRecvPacket | src_port | {sourcePort} | +| ibc-core-channel-v1-EventChannelRecvPacket | src_channel | {sourceChannel} | +| ibc-core-channel-v1-EventChannelRecvPacket | dst_port | {destinationPort} | +| ibc-core-channel-v1-EventChannelRecvPacket | dst_channel | {destinationChannel} | +| ibc-core-channel-v1-EventChannelRecvPacket | channel_ordering | {channel.Ordering} | +| message | action | recv_packet | ### MsgAcknowledgePacket -| Type | Attribute Key | Attribute Value | -|--------------------|--------------------------|----------------------| -| acknowledge_packet | packet_timeout_height | {timeoutHeight} | -| acknowledge_packet | packet_timeout_timestamp | {timeoutTimestamp} | -| acknowledge_packet | packet_sequence | {sequence} | -| acknowledge_packet | packet_src_port | {sourcePort} | -| acknowledge_packet | packet_src_channel | {sourceChannel} | -| acknowledge_packet | packet_dst_port | {destinationPort} | -| acknowledge_packet | packet_dst_channel | {destinationChannel} | -| acknowledge_packet | packet_channel_ordering | {channel.Ordering} | -| message | action | acknowledge_packet | -| message | module | ibc-channel | +| Type | Attribute Key | Attribute Value | +|-------------------------------------------|-------------------|----------------------| +| ibc-core-channel-v1-EventChannelAckPacket | data | {data} | +| ibc-core-channel-v1-EventChannelAckPacket | timeout_height | {timeoutHeight} | +| ibc-core-channel-v1-EventChannelAckPacket | timeout_timestamp | {timeoutTimestamp} | +| ibc-core-channel-v1-EventChannelAckPacket | sequence | {sequence} | +| ibc-core-channel-v1-EventChannelAckPacket | src_port | {sourcePort} | +| ibc-core-channel-v1-EventChannelAckPacket | src_channel | {sourceChannel} | +| ibc-core-channel-v1-EventChannelAckPacket | dst_port | {destinationPort} | +| ibc-core-channel-v1-EventChannelAckPacket | dst_channel | {destinationChannel} | +| ibc-core-channel-v1-EventChannelAckPacket | channel_ordering | {channel.Ordering} | +| ibc-core-channel-v1-EventChannelAckPacket | acknowledgement | {acknowledgement} | +| message | action | acknowledge_packet | ### MsgTimeoutPacket & MsgTimeoutOnClose -| Type | Attribute Key | Attribute Value | -|----------------|--------------------------|----------------------| -| timeout_packet | packet_timeout_height | {timeoutHeight} | -| timeout_packet | packet_timeout_timestamp | {timeoutTimestamp} | -| timeout_packet | packet_sequence | {sequence} | -| timeout_packet | packet_src_port | {sourcePort} | -| timeout_packet | packet_src_channel | {sourceChannel} | -| timeout_packet | packet_dst_port | {destinationPort} | -| timeout_packet | packet_dst_channel | {destinationChannel} | -| timeout_packet | packet_channel_ordering | {channel.Ordering} | -| message | action | timeout_packet | -| message | module | ibc-channel | +| Type | Attribute Key | Attribute Value | +|-----------------------------------------------|-------------------|----------------------| +| ibc-core-channel-v1-EventChannelTimeoutPacket | data | {data} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | timeout_height | {timeoutHeight} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | timeout_timestamp | {timeoutTimestamp} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | sequence | {sequence} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | src_port | {sourcePort} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | src_channel | {sourceChannel} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | dst_port | {destinationPort} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | dst_channel | {destinationChannel} | +| ibc-core-channel-v1-EventChannelTimeoutPacket | channel_ordering | {channel.Ordering} | +| message | action | timeout_packet | + +### WriteAcknowledgement + +| Type | Attribute Key | Attribute Value | +|------------------------------------------|-------------------|----------------------| +| ibc-core-channel-v1-EventChannelWriteAck | data | {data} | +| ibc-core-channel-v1-EventChannelWriteAck | timeout_height | {timeoutHeight} | +| ibc-core-channel-v1-EventChannelWriteAck | timeout_timestamp | {timeoutTimestamp} | +| ibc-core-channel-v1-EventChannelWriteAck | sequence | {sequence} | +| ibc-core-channel-v1-EventChannelWriteAck | src_port | {sourcePort} | +| ibc-core-channel-v1-EventChannelWriteAck | src_channel | {sourceChannel} | +| ibc-core-channel-v1-EventChannelWriteAck | dst_port | {destinationPort} | +| ibc-core-channel-v1-EventChannelWriteAck | dst_channel | {destinationChannel} | +| ibc-core-channel-v1-EventChannelWriteAck | acknowledgement | {acknowledgement} |