diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 7407247..83dcbf0 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -4,95 +4,102 @@ ## Table of Contents -- [hyperlane/announce/v1/types.proto](#hyperlane/announce/v1/types.proto) - - [GenesisAnnouncement](#hyperlane.announce.v1.GenesisAnnouncement) - - [StorageMetadata](#hyperlane.announce.v1.StorageMetadata) - - [StoredAnnouncement](#hyperlane.announce.v1.StoredAnnouncement) - - [StoredAnnouncements](#hyperlane.announce.v1.StoredAnnouncements) +- [hyperlane/mailbox/v1/types.proto](#hyperlane/mailbox/v1/types.proto) + - [MessageDelivered](#hyperlane.mailbox.v1.MessageDelivered) + - [Tree](#hyperlane.mailbox.v1.Tree) -- [hyperlane/announce/v1/genesis.proto](#hyperlane/announce/v1/genesis.proto) - - [GenesisState](#hyperlane.announce.v1.GenesisState) +- [hyperlane/mailbox/v1/genesis.proto](#hyperlane/mailbox/v1/genesis.proto) + - [GenesisState](#hyperlane.mailbox.v1.GenesisState) -- [hyperlane/announce/v1/query.proto](#hyperlane/announce/v1/query.proto) - - [GetAnnouncedStorageLocationsRequest](#hyperlane.announce.v1.GetAnnouncedStorageLocationsRequest) - - [GetAnnouncedStorageLocationsResponse](#hyperlane.announce.v1.GetAnnouncedStorageLocationsResponse) - - [GetAnnouncedValidatorsRequest](#hyperlane.announce.v1.GetAnnouncedValidatorsRequest) - - [GetAnnouncedValidatorsResponse](#hyperlane.announce.v1.GetAnnouncedValidatorsResponse) +- [hyperlane/mailbox/v1/query.proto](#hyperlane/mailbox/v1/query.proto) + - [QueryCurrentTreeMetadataRequest](#hyperlane.mailbox.v1.QueryCurrentTreeMetadataRequest) + - [QueryCurrentTreeMetadataResponse](#hyperlane.mailbox.v1.QueryCurrentTreeMetadataResponse) + - [QueryCurrentTreeRequest](#hyperlane.mailbox.v1.QueryCurrentTreeRequest) + - [QueryCurrentTreeResponse](#hyperlane.mailbox.v1.QueryCurrentTreeResponse) + - [QueryDomainRequest](#hyperlane.mailbox.v1.QueryDomainRequest) + - [QueryDomainResponse](#hyperlane.mailbox.v1.QueryDomainResponse) + - [QueryMsgDeliveredRequest](#hyperlane.mailbox.v1.QueryMsgDeliveredRequest) + - [QueryMsgDeliveredResponse](#hyperlane.mailbox.v1.QueryMsgDeliveredResponse) - - [Query](#hyperlane.announce.v1.Query) + - [Query](#hyperlane.mailbox.v1.Query) -- [hyperlane/announce/v1/tx.proto](#hyperlane/announce/v1/tx.proto) - - [MsgAnnouncement](#hyperlane.announce.v1.MsgAnnouncement) - - [MsgAnnouncementResponse](#hyperlane.announce.v1.MsgAnnouncementResponse) +- [hyperlane/mailbox/v1/tx.proto](#hyperlane/mailbox/v1/tx.proto) + - [MsgDispatch](#hyperlane.mailbox.v1.MsgDispatch) + - [MsgDispatchResponse](#hyperlane.mailbox.v1.MsgDispatchResponse) + - [MsgProcess](#hyperlane.mailbox.v1.MsgProcess) + - [MsgProcessResponse](#hyperlane.mailbox.v1.MsgProcessResponse) - - [Msg](#hyperlane.announce.v1.Msg) + - [Msg](#hyperlane.mailbox.v1.Msg) - [Scalar Value Types](#scalar-value-types) - +

Top

-## hyperlane/announce/v1/types.proto +## hyperlane/mailbox/v1/types.proto - + -### GenesisAnnouncement -Genesis helper type for Hyperlane's Announcement. +### MessageDelivered +Mailbox delivered message | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `announcement` | [StoredAnnouncement](#hyperlane.announce.v1.StoredAnnouncement) | | | -| `validator` | [bytes](#bytes) | | The validator (in eth address format) that announced | +| `id` | [string](#string) | | Message id (hash) | - + -### StorageMetadata -Helper type for Hyperlane's getAnnouncedStorageLocations. +### Tree +Hyperlane's tree | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `metadata` | [string](#string) | repeated | | +| `count` | [uint32](#uint32) | | Count of items inserted to tree | +| `branch` | [bytes](#bytes) | repeated | Each item inserted | + - + -### StoredAnnouncement -Helper type for Hyperlane's Announcement. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `storage_location` | [string](#string) | | location where signatures will be stored | + +

Top

+## hyperlane/mailbox/v1/genesis.proto - + -### StoredAnnouncements -Helper type for Hyperlane's Announcement. +### GenesisState +Hyperlane mailbox's keeper genesis state | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `announcement` | [StoredAnnouncement](#hyperlane.announce.v1.StoredAnnouncement) | repeated | | +| `tree` | [Tree](#hyperlane.mailbox.v1.Tree) | | Each genesis tree entry | +| `delivered_messages` | [MessageDelivered](#hyperlane.mailbox.v1.MessageDelivered) | repeated | Each message that has been delivered | +| `domain` | [uint32](#uint32) | | The domain of this chain module, assigned by hyperlane | @@ -108,97 +115,118 @@ Helper type for Hyperlane's Announcement. - +

Top

-## hyperlane/announce/v1/genesis.proto +## hyperlane/mailbox/v1/query.proto - + -### GenesisState -Hyperlane Announce's keeper genesis state +### QueryCurrentTreeMetadataRequest +QueryCurrentTreeMetadataRequest is the request type for the Query/Tree +metadata RPC method. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `announcements` | [GenesisAnnouncement](#hyperlane.announce.v1.GenesisAnnouncement) | repeated | | + - +### QueryCurrentTreeMetadataResponse +QueryCurrentTreeResponseResponse is the response type for the Query/Tree +metadata RPC method. - - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `root` | [bytes](#bytes) | | | +| `count` | [uint32](#uint32) | | | - - -

Top

-## hyperlane/announce/v1/query.proto + + + +### QueryCurrentTreeRequest +QueryCurrentTreeRequest is the request type for the Query/Tree RPC method + + - -### GetAnnouncedStorageLocationsRequest -GetAnnouncedStorageLocationsRequest is the request type for the -GetAnnouncedStorageLocations RPC method. + + +### QueryCurrentTreeResponse +QueryCurrentTreeResponse is the response type for the Query/Tree RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [bytes](#bytes) | repeated | list of validators where each validator is in hex-encoded eth address format (20 bytes) | +| `branches` | [bytes](#bytes) | repeated | | +| `count` | [uint32](#uint32) | | | + + + + + + + +### QueryDomainRequest +QueryDomain is the request type for the Query/Domain RPC +method. - -### GetAnnouncedStorageLocationsResponse -GetAnnouncedStorageLocationsResponse is the response type for the -GetAnnouncedStorageLocations RPC method. + + +### QueryDomainResponse +QueryDomainResponse is the response type for the Query/Domain RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `metadata` | [StorageMetadata](#hyperlane.announce.v1.StorageMetadata) | repeated | | +| `domain` | [uint32](#uint32) | | | + + - +### QueryMsgDeliveredRequest +QueryMsgDeliveredRequest is the request type to check if message was +delivered -### GetAnnouncedValidatorsRequest -GetAnnouncedValidatorsRequest is the request type for the -GetAnnouncedValidators RPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `message_id` | [bytes](#bytes) | | | - -### GetAnnouncedValidatorsResponse -GetAnnouncedValidatorsResponse is the response type for the -GetAnnouncedValidators RPC method. + + +### QueryMsgDeliveredResponse +QueryMsgDeliveredResponse is the response type if message was delivered | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [string](#string) | repeated | list of validators where each validator is in hex-encoded eth address format (20 bytes) | +| `delivered` | [bool](#bool) | | | @@ -211,49 +239,83 @@ GetAnnouncedValidators RPC method. - + ### Query -Query service for hyperlane announce module +Query service for hyperlane mailbox module | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GetAnnouncedStorageLocations` | [GetAnnouncedStorageLocationsRequest](#hyperlane.announce.v1.GetAnnouncedStorageLocationsRequest) | [GetAnnouncedStorageLocationsResponse](#hyperlane.announce.v1.GetAnnouncedStorageLocationsResponse) | Gets the announced storage locations (where signatures are stored) for the requested validators | GET|/hyperlane/announce/v1/get_announced_storage_locations| -| `GetAnnouncedValidators` | [GetAnnouncedValidatorsRequest](#hyperlane.announce.v1.GetAnnouncedValidatorsRequest) | [GetAnnouncedValidatorsResponse](#hyperlane.announce.v1.GetAnnouncedValidatorsResponse) | Gets a list of validators that have made announcements | GET|/hyperlane/announce/v1/get_announced_validators| +| `CurrentTreeMetadata` | [QueryCurrentTreeMetadataRequest](#hyperlane.mailbox.v1.QueryCurrentTreeMetadataRequest) | [QueryCurrentTreeMetadataResponse](#hyperlane.mailbox.v1.QueryCurrentTreeMetadataResponse) | Get current tree metadata | GET|/hyperlane/mailbox/v1/tree_metadata| +| `Domain` | [QueryDomainRequest](#hyperlane.mailbox.v1.QueryDomainRequest) | [QueryDomainResponse](#hyperlane.mailbox.v1.QueryDomainResponse) | Get domain | GET|/hyperlane/mailbox/v1/domain| +| `CurrentTree` | [QueryCurrentTreeRequest](#hyperlane.mailbox.v1.QueryCurrentTreeRequest) | [QueryCurrentTreeResponse](#hyperlane.mailbox.v1.QueryCurrentTreeResponse) | Get current tree | GET|/hyperlane/mailbox/v1/tree| +| `MsgDelivered` | [QueryMsgDeliveredRequest](#hyperlane.mailbox.v1.QueryMsgDeliveredRequest) | [QueryMsgDeliveredResponse](#hyperlane.mailbox.v1.QueryMsgDeliveredResponse) | Check if message was delivered | GET|/hyperlane/mailbox/v1/delivered| - +

Top

-## hyperlane/announce/v1/tx.proto +## hyperlane/mailbox/v1/tx.proto + + + + + +### MsgDispatch +MsgDispatch defines the request type for the Dispatch rpc. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `destination_domain` | [uint32](#uint32) | | | +| `recipient_address` | [string](#string) | | | +| `message_body` | [string](#string) | | | + + + + + + + + +### MsgDispatchResponse +MsgDispatchResponse defines the Dispatch response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `message_id` | [string](#string) | | | + + + - + -### MsgAnnouncement -MsgAnnouncement Announces a validator signature storage location +### MsgProcess +MsgProcess defines the request type for the Process rpc. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `sender` | [string](#string) | | | -| `validator` | [bytes](#bytes) | | The validator (in eth address format) that is announcing its storage location | -| `storage_location` | [string](#string) | | location where signatures will be stored | -| `signature` | [bytes](#bytes) | | signed validator announcement | +| `metadata` | [string](#string) | | | +| `message` | [string](#string) | | | - + -### MsgAnnouncementResponse -MsgAnnouncementResponse defines the MsgAnnouncementResponse response type. +### MsgProcessResponse +MsgProcessResponse defines the Process response type. @@ -266,14 +328,15 @@ MsgAnnouncementResponse defines the MsgAnnouncementResponse response type. - + ### Msg -Msg defines the hyperlane announce Msg service. +Msg defines the hyperlane mailbox Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Announcement` | [MsgAnnouncement](#hyperlane.announce.v1.MsgAnnouncement) | [MsgAnnouncementResponse](#hyperlane.announce.v1.MsgAnnouncementResponse) | Announces a validator signature storage location | | +| `Dispatch` | [MsgDispatch](#hyperlane.mailbox.v1.MsgDispatch) | [MsgDispatchResponse](#hyperlane.mailbox.v1.MsgDispatchResponse) | Dispatch sends interchain messages | | +| `Process` | [MsgProcess](#hyperlane.mailbox.v1.MsgProcess) | [MsgProcessResponse](#hyperlane.mailbox.v1.MsgProcessResponse) | Process delivers interchain messages | | diff --git a/interchaintest/tests/cosmos_e2e_test.go b/interchaintest/tests/cosmos_e2e_test.go index d1b5624..84bc234 100644 --- a/interchaintest/tests/cosmos_e2e_test.go +++ b/interchaintest/tests/cosmos_e2e_test.go @@ -470,7 +470,8 @@ func processMsg( dispatchedRecipientAddrHex, dispatchedMsgBody, dispatchSender, - dispatchedMsgId string) error { + dispatchedMsgId string, +) error { // Find the message ID of the dispatched message and wait for the message to be processed on the destination. dispatchedRecipientAddr := hexutil.MustDecode(dispatchedRecipientAddrHex) bech32Recipient := sdk.MustBech32ifyAddressBytes(sdk.GetConfig().GetBech32AccountAddrPrefix(), dispatchedRecipientAddr) diff --git a/proto/hyperlane/announce/v1/types.proto b/proto/hyperlane/announce/v1/types.proto index 09cd1dd..33146cb 100644 --- a/proto/hyperlane/announce/v1/types.proto +++ b/proto/hyperlane/announce/v1/types.proto @@ -28,7 +28,7 @@ message StoredAnnouncements { // Genesis helper type for Hyperlane's Announcement. message GenesisAnnouncement { option (gogoproto.goproto_getters) = false; - StoredAnnouncement announcement = 1; + StoredAnnouncements announcements = 1; // The validator (in eth address format) that announced bytes validator = 2; } diff --git a/x/announce/keeper/genesis.go b/x/announce/keeper/genesis.go index 9f2bccf..f5ebf71 100644 --- a/x/announce/keeper/genesis.go +++ b/x/announce/keeper/genesis.go @@ -11,29 +11,8 @@ import ( // InitGenesis initializes the hyperlane announce module's state from a provided genesis // state. func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) error { - var storedAnnouncements *types.StoredAnnouncements - var err error - for _, announcement := range gs.Announcements { - storedAnnouncements, err = k.getAnnouncements(ctx, announcement.Validator) - if err != nil { - storedAnnouncements = &types.StoredAnnouncements{ - Announcement: []*types.StoredAnnouncement{}, - } - } else { - // Check for replays since there were existing announcements for this validator - for _, existingAnnouncement := range storedAnnouncements.Announcement { - if existingAnnouncement.StorageLocation == announcement.Announcement.StorageLocation { - return types.ErrReplayAnnouncement - } - } - } - - storedAnnouncements.Announcement = append(storedAnnouncements.Announcement, &types.StoredAnnouncement{ - StorageLocation: announcement.Announcement.StorageLocation, - }) - - err = k.setAnnouncements(ctx, announcement.Validator, storedAnnouncements) + err := k.setAnnouncements(ctx, announcement.Validator, announcement.Announcements) if err != nil { return err } @@ -69,13 +48,12 @@ func ExportAnnouncements(store sdk.KVStore) ([]*types.GenesisAnnouncement, error if err != nil { return nil, err } - for _, curr := range storedAnnouncements.Announcement { - currAnnouncement := &types.GenesisAnnouncement{ - Announcement: curr, - Validator: validator, - } - announcements = append(announcements, currAnnouncement) + + currAnnouncement := &types.GenesisAnnouncement{ + Announcements: storedAnnouncements, + Validator: validator, } + announcements = append(announcements, currAnnouncement) } return announcements, nil } diff --git a/x/announce/keeper/genesis_test.go b/x/announce/keeper/genesis_test.go index f21ebd2..d9ac6d4 100644 --- a/x/announce/keeper/genesis_test.go +++ b/x/announce/keeper/genesis_test.go @@ -1,33 +1,39 @@ package keeper_test import ( - "bytes" + "fmt" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/strangelove-ventures/hyperlane-cosmos/x/announce/types" ) func (suite *KeeperTestSuite) TestGenesis() { var err error valPrivKey := "8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61" // Testing only, do NOT use - storageLocation1 := "file:///tmp//signatures-simd1" - storageLocation2 := "file:///tmp//signatures-simd2" + storageLocation := "file:///tmp//signatures-simd" + numMsgs := 5 mailbox := suite.mailboxKeeper.GetMailboxAddress() - msg, _, err := suite.mockAnnounce(valPrivKey, storageLocation1, mailbox) - suite.Require().NoError(err) - msg2, _, err := suite.mockAnnounce(valPrivKey, storageLocation2, mailbox) - suite.Require().NoError(err) - announcementMap := map[int]*types.MsgAnnouncement{} - announcementMap[0] = msg - announcementMap[1] = msg2 + announcementMap := map[string][]string{} + + for i := 0; i < numMsgs; i++ { + msg, _, err := suite.mockAnnounce(valPrivKey, fmt.Sprintf("%s%d", storageLocation, i), mailbox) + suite.Require().NoError(err) + valAddrHex := hexutil.Encode(msg.Validator) + announcementMap[valAddrHex] = append(announcementMap[valAddrHex], msg.StorageLocation) + } // Export genesis gs := suite.keeper.ExportGenesis(suite.ctx) - for i, announcement := range gs.Announcements { - suite.Require().Equal(announcementMap[i].Validator, announcement.Validator) - suite.Require().Equal(announcementMap[i].StorageLocation, announcement.Announcement.StorageLocation) + for _, gsAnnouncement := range gs.Announcements { + valHex := hexutil.Encode(gsAnnouncement.Validator) + expectedAnnouncements, ok := announcementMap[valHex] + suite.Require().True(ok) + for _, curr := range gsAnnouncement.Announcements.Announcement { + suite.Require().Contains(expectedAnnouncements, curr.StorageLocation) + } } // Resetting suite @@ -38,23 +44,9 @@ func (suite *KeeperTestSuite) TestGenesis() { suite.Require().NoError(err) announcedAddresses := [][]byte{} - // key is the hex encoded bytes of the validator address, value is []storageLocations - expectedStorageLocations := map[string][]string{} - - for _, announcement := range announcementMap { - inArr := false - for _, curr := range announcedAddresses { - if bytes.Equal(curr, announcement.Validator) { - inArr = true - } - } - if !inArr { - announcedAddresses = append(announcedAddresses, announcement.Validator) - expectedStorageLocations[hexutil.Encode(announcement.Validator)] = []string{announcement.StorageLocation} - } else { - expectedStorageLocations[hexutil.Encode(announcement.Validator)] = append(expectedStorageLocations[hexutil.Encode(announcement.Validator)], announcement.StorageLocation) - } + for val := range announcementMap { + announcedAddresses = append(announcedAddresses, hexutil.MustDecode(val)) } // Format the announced storage locations request @@ -68,7 +60,9 @@ func (suite *KeeperTestSuite) TestGenesis() { suite.Require().NoError(err) for i, announcedAddress := range announcedAddresses { - locations := expectedStorageLocations[hexutil.Encode(announcedAddress)] + locations, ok := announcementMap[hexutil.Encode(announcedAddress)] + suite.Require().True(ok) + for _, location := range locations { suite.Require().Contains(announcedLocationsResp.Metadata[i].Metadata, location) } diff --git a/x/announce/types/types.pb.go b/x/announce/types/types.pb.go index 1e8d9a6..7f9a789 100644 --- a/x/announce/types/types.pb.go +++ b/x/announce/types/types.pb.go @@ -158,7 +158,7 @@ var xxx_messageInfo_StoredAnnouncements proto.InternalMessageInfo // Genesis helper type for Hyperlane's Announcement. type GenesisAnnouncement struct { - Announcement *StoredAnnouncement `protobuf:"bytes,1,opt,name=announcement,proto3" json:"announcement,omitempty"` + Announcements *StoredAnnouncements `protobuf:"bytes,1,opt,name=announcements,proto3" json:"announcements,omitempty"` // The validator (in eth address format) that announced Validator []byte `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` } @@ -211,28 +211,28 @@ func init() { func init() { proto.RegisterFile("hyperlane/announce/v1/types.proto", fileDescriptor_26474efeff56f239) } var fileDescriptor_26474efeff56f239 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0x4e, 0x02, 0x41, - 0x10, 0x86, 0x6f, 0xd5, 0x18, 0x59, 0x49, 0x30, 0x87, 0x26, 0x84, 0x98, 0x15, 0xa9, 0xa0, 0x60, - 0x37, 0x48, 0x67, 0x87, 0x89, 0xb1, 0x91, 0xe6, 0xec, 0xb4, 0x30, 0xcb, 0x31, 0x39, 0xce, 0xdc, - 0xed, 0x90, 0xdd, 0xe5, 0x22, 0x6f, 0x40, 0xe9, 0x23, 0xf8, 0x38, 0x96, 0x94, 0x96, 0x06, 0x5e, - 0xc4, 0x70, 0xac, 0x20, 0xc1, 0xce, 0x6e, 0xee, 0xcf, 0x3f, 0xdf, 0xff, 0x5f, 0x76, 0xe8, 0xe5, - 0x70, 0x32, 0x02, 0x9d, 0x48, 0x05, 0x42, 0x2a, 0x85, 0x63, 0x15, 0x82, 0xc8, 0xda, 0xc2, 0x4e, - 0x46, 0x60, 0xf8, 0x48, 0xa3, 0x45, 0xff, 0x6c, 0x6d, 0xe1, 0x3f, 0x16, 0x9e, 0xb5, 0xab, 0xa7, - 0x11, 0x46, 0x98, 0x3b, 0xc4, 0x72, 0x5a, 0x99, 0xeb, 0x1d, 0x5a, 0x7a, 0xb0, 0xa8, 0x65, 0x04, - 0x3d, 0xb0, 0x72, 0x20, 0xad, 0xf4, 0xab, 0xf4, 0x28, 0x75, 0x73, 0x85, 0xd4, 0xf6, 0x1b, 0x85, - 0x60, 0xfd, 0x7d, 0x7d, 0x30, 0x7d, 0xbf, 0xf0, 0xea, 0xb7, 0xd4, 0x5f, 0x2e, 0xc1, 0xa0, 0xeb, - 0xf8, 0x29, 0x28, 0xeb, 0x37, 0xe9, 0x89, 0x59, 0xa1, 0x9e, 0x13, 0x0c, 0xa5, 0x8d, 0x51, 0x55, - 0x48, 0x8d, 0x34, 0x0a, 0x41, 0xc9, 0xe9, 0xf7, 0x4e, 0x76, 0x98, 0x17, 0x5a, 0xde, 0xc5, 0x18, - 0xbf, 0x47, 0x8b, 0xf2, 0x97, 0x90, 0x77, 0x38, 0xbe, 0x6a, 0xf2, 0x3f, 0x7f, 0x8b, 0xef, 0x12, - 0x82, 0xad, 0x75, 0x97, 0x35, 0x25, 0xb4, 0x7c, 0x07, 0x0a, 0x4c, 0x6c, 0xb6, 0x4a, 0xef, 0x86, - 0x91, 0x7f, 0x84, 0xf9, 0xe7, 0xb4, 0x90, 0xc9, 0x24, 0x1e, 0x48, 0x8b, 0xba, 0xb2, 0x57, 0x23, - 0x8d, 0x62, 0xb0, 0x11, 0x56, 0x55, 0x6e, 0x9e, 0x3e, 0xe6, 0x8c, 0xcc, 0xe6, 0x8c, 0x7c, 0xcd, - 0x19, 0x79, 0x5b, 0x30, 0x6f, 0xb6, 0x60, 0xde, 0xe7, 0x82, 0x79, 0x8f, 0xdd, 0x28, 0xb6, 0xc3, - 0x71, 0x9f, 0x87, 0x98, 0x0a, 0x63, 0xb5, 0x54, 0x11, 0x24, 0x98, 0x41, 0x2b, 0x03, 0x65, 0xc7, - 0x1a, 0x8c, 0x58, 0xb7, 0x6a, 0x85, 0x68, 0x52, 0x34, 0xe2, 0x75, 0x73, 0x05, 0xf9, 0x09, 0xf4, - 0x0f, 0xf3, 0x67, 0xed, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xd6, 0xdd, 0x09, 0x28, 0x02, - 0x00, 0x00, + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0x02, 0x41, + 0x14, 0xc7, 0x77, 0x2a, 0x22, 0x47, 0xc3, 0x58, 0x0b, 0x44, 0x62, 0x33, 0x4f, 0x1a, 0xb8, 0x83, + 0x7a, 0xeb, 0x66, 0x10, 0x5d, 0x12, 0x62, 0xbb, 0xd5, 0x21, 0xc6, 0xf5, 0xb1, 0x6e, 0xec, 0xce, + 0x93, 0x99, 0x71, 0xc9, 0x6f, 0x10, 0x74, 0xe9, 0x23, 0xf4, 0x71, 0x3a, 0x7a, 0xec, 0x18, 0xfa, + 0x45, 0xc2, 0x75, 0x52, 0x17, 0x3b, 0x74, 0x7b, 0xf3, 0xe7, 0xff, 0x7e, 0xef, 0x3f, 0xbc, 0x47, + 0xcf, 0x87, 0x93, 0x11, 0xc8, 0x88, 0x0b, 0x60, 0x5c, 0x08, 0x1c, 0x0b, 0x1f, 0x58, 0xd2, 0x62, + 0x7a, 0x32, 0x02, 0xe5, 0x8e, 0x24, 0x6a, 0xb4, 0x4f, 0x56, 0x16, 0xf7, 0xd7, 0xe2, 0x26, 0xad, + 0xca, 0x71, 0x80, 0x01, 0xa6, 0x0e, 0xb6, 0xa8, 0x96, 0xe6, 0x5a, 0x87, 0x16, 0xef, 0x35, 0x4a, + 0x1e, 0x40, 0x0f, 0x34, 0x1f, 0x70, 0xcd, 0xed, 0x0a, 0x3d, 0x88, 0x4d, 0x5d, 0x26, 0xd5, 0xdd, + 0x7a, 0xce, 0x5b, 0xbd, 0x2f, 0xf7, 0x5e, 0x3f, 0xce, 0xac, 0xda, 0x35, 0xb5, 0x17, 0x4d, 0x30, + 0xe8, 0x1a, 0x7e, 0x0c, 0x42, 0xdb, 0x0d, 0x7a, 0xa4, 0x96, 0xa8, 0xa7, 0x08, 0x7d, 0xae, 0x43, + 0x14, 0x65, 0x52, 0x25, 0xf5, 0x9c, 0x57, 0x34, 0xfa, 0xad, 0x91, 0x0d, 0xe6, 0x99, 0x96, 0xb6, + 0x31, 0xca, 0xee, 0xd1, 0x02, 0xdf, 0x10, 0xd2, 0x0c, 0xf9, 0x76, 0xc3, 0xfd, 0xf3, 0x5b, 0xee, + 0x36, 0xc1, 0xcb, 0xb4, 0x9b, 0x59, 0x6f, 0x84, 0x96, 0x6e, 0x40, 0x80, 0x0a, 0x55, 0x26, 0xf4, + 0x1d, 0x3d, 0xdc, 0x74, 0xab, 0x34, 0x71, 0xbe, 0x7d, 0xf1, 0xef, 0x69, 0xca, 0xcb, 0x02, 0xec, + 0x53, 0x9a, 0x4b, 0x78, 0x14, 0x0e, 0xb8, 0x46, 0x59, 0xde, 0xa9, 0x92, 0x7a, 0xc1, 0x5b, 0x0b, + 0xcb, 0x34, 0x57, 0x8f, 0x9f, 0x33, 0x87, 0x4c, 0x67, 0x0e, 0xf9, 0x9e, 0x39, 0xe4, 0x7d, 0xee, + 0x58, 0xd3, 0xb9, 0x63, 0x7d, 0xcd, 0x1d, 0xeb, 0xa1, 0x1b, 0x84, 0x7a, 0x38, 0xee, 0xbb, 0x3e, + 0xc6, 0x4c, 0x69, 0xc9, 0x45, 0x00, 0x11, 0x26, 0xd0, 0x4c, 0x40, 0xe8, 0xb1, 0x04, 0xc5, 0x56, + 0xb9, 0x9a, 0x3e, 0xaa, 0x18, 0x15, 0x7b, 0x59, 0x1f, 0x42, 0x7a, 0x05, 0xfd, 0xfd, 0x74, 0xb3, + 0x9d, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x5c, 0x2d, 0x4b, 0x2b, 0x02, 0x00, 0x00, } func (m *StorageMetadata) Marshal() (dAtA []byte, err error) { @@ -361,9 +361,9 @@ func (m *GenesisAnnouncement) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.Announcement != nil { + if m.Announcements != nil { { - size, err := m.Announcement.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Announcements.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -437,8 +437,8 @@ func (m *GenesisAnnouncement) Size() (n int) { } var l int _ = l - if m.Announcement != nil { - l = m.Announcement.Size() + if m.Announcements != nil { + l = m.Announcements.Size() n += 1 + l + sovTypes(uint64(l)) } l = len(m.Validator) @@ -738,7 +738,7 @@ func (m *GenesisAnnouncement) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Announcement", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Announcements", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -765,10 +765,10 @@ func (m *GenesisAnnouncement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Announcement == nil { - m.Announcement = &StoredAnnouncement{} + if m.Announcements == nil { + m.Announcements = &StoredAnnouncements{} } - if err := m.Announcement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Announcements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex