diff --git a/.gitignore b/.gitignore index c19e1a65..825834d1 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ go.work.sum # Depinject debug file debug_container.dot +.DS_Store .idea /release/ **/node_modules diff --git a/proto/hyperlane/core/post_dispatch/v1/events.proto b/proto/hyperlane/core/post_dispatch/v1/events.proto index 878b475a..4f7c5ea7 100644 --- a/proto/hyperlane/core/post_dispatch/v1/events.proto +++ b/proto/hyperlane/core/post_dispatch/v1/events.proto @@ -87,6 +87,27 @@ message EventCreateNoopHook { string owner = 2; } +// EventCreateAggregationHook ... +message EventCreateAggregationHook { + + // id ... + string aggregation_hook_id = 1 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; + + // owner ... + string owner = 2; + + // hooks ... + repeated string hooks = 3 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; +} + // EventCreateIgp ... message EventCreateIgp { string igp_id = 1 [ diff --git a/proto/hyperlane/core/post_dispatch/v1/genesis.proto b/proto/hyperlane/core/post_dispatch/v1/genesis.proto index 6bc1333b..cd4484aa 100644 --- a/proto/hyperlane/core/post_dispatch/v1/genesis.proto +++ b/proto/hyperlane/core/post_dispatch/v1/genesis.proto @@ -14,6 +14,8 @@ message GenesisState { repeated MerkleTreeHook merkle_tree_hooks = 3 [ (gogoproto.nullable) = false ]; repeated NoopHook noop_hooks = 4 [ (gogoproto.nullable) = false ]; + repeated AggregationHook aggregation_hooks = 5 + [ (gogoproto.nullable) = false ]; } // GenesisDestinationGasConfigWrapper ... @@ -32,4 +34,4 @@ message GenesisDestinationGasConfigWrapper { // igp_id is required for the Genesis handling. uint64 igp_id = 4; -} \ No newline at end of file +} diff --git a/proto/hyperlane/core/post_dispatch/v1/query.proto b/proto/hyperlane/core/post_dispatch/v1/query.proto index 926b6f8f..f4d7f55e 100644 --- a/proto/hyperlane/core/post_dispatch/v1/query.proto +++ b/proto/hyperlane/core/post_dispatch/v1/query.proto @@ -58,6 +58,18 @@ service Query { rpc NoopHook(QueryNoopHookRequest) returns (QueryNoopHookResponse) { option (google.api.http).get = "/hyperlane/v1/noop_hooks/{id}"; } + + // AggregationHooks ... + rpc AggregationHooks(QueryAggregationHooksRequest) + returns (QueryAggregationHooksResponse) { + option (google.api.http).get = "/hyperlane/v1/aggregation_hooks"; + } + + // AggregationHook ... + rpc AggregationHook(QueryAggregationHookRequest) + returns (QueryAggregationHookResponse) { + option (google.api.http).get = "/hyperlane/v1/aggregation_hooks/{id}"; + } } // QueryIgpsRequest ... @@ -174,3 +186,21 @@ message QueryNoopHooksResponse { [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +// QueryAggregationHookRequest ... +message QueryAggregationHookRequest { string id = 1; } + +// QueryAggregationHookResponse ... +message QueryAggregationHookResponse { AggregationHook aggregation_hook = 1; } + +// QueryAggregationHooksRequest ... +message QueryAggregationHooksRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAggregationHooksResponse ... +message QueryAggregationHooksResponse { + repeated AggregationHook aggregation_hooks = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/hyperlane/core/post_dispatch/v1/tx.proto b/proto/hyperlane/core/post_dispatch/v1/tx.proto index 5c281ef7..167fc010 100644 --- a/proto/hyperlane/core/post_dispatch/v1/tx.proto +++ b/proto/hyperlane/core/post_dispatch/v1/tx.proto @@ -36,6 +36,10 @@ service Msg { // CreateNoopHook ... rpc CreateNoopHook(MsgCreateNoopHook) returns (MsgCreateNoopHookResponse); + + // CreateAggregationHook ... + rpc CreateAggregationHook(MsgCreateAggregationHook) + returns (MsgCreateAggregationHookResponse); } // MsgCreateIgp ... @@ -205,3 +209,28 @@ message MsgCreateNoopHookResponse { (gogoproto.nullable) = false ]; } + +// MsgCreateAggregationHook ... +message MsgCreateAggregationHook { + option (cosmos.msg.v1.signer) = "owner"; + option (amino.name) = "hyperlane/v1/MsgCreateAggregationHook"; + + // owner ... + string owner = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // hooks ... + repeated string hooks = 2 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; +} + +// MsgCreateAggregationHookResponse ... +message MsgCreateAggregationHookResponse { + string id = 1 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/hyperlane/core/post_dispatch/v1/types.proto b/proto/hyperlane/core/post_dispatch/v1/types.proto index 07470aab..3d7122c2 100644 --- a/proto/hyperlane/core/post_dispatch/v1/types.proto +++ b/proto/hyperlane/core/post_dispatch/v1/types.proto @@ -103,4 +103,24 @@ message NoopHook { // owner ... string owner = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; -} \ No newline at end of file +} + +// AggregationHook ... +message AggregationHook { + // id ... + string id = 1 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; + + // owner ... + string owner = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // hooks ... + repeated string hooks = 3 [ + (gogoproto.customtype) = + "github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress", + (gogoproto.nullable) = false + ]; +} diff --git a/x/core/02_post_dispatch/client/cli/query.go b/x/core/02_post_dispatch/client/cli/query.go index 5c6c48de..5845a28d 100644 --- a/x/core/02_post_dispatch/client/cli/query.go +++ b/x/core/02_post_dispatch/client/cli/query.go @@ -29,6 +29,8 @@ func GetQueryCmd() *cobra.Command { CmdMerkleTreeHook(), CmdNoopHooks(), CmdNoopHook(), + CmdAggregationHooks(), + CmdAggregationHook(), ) return cmd } @@ -303,3 +305,70 @@ func CmdNoopHook() *cobra.Command { return cmd } + +func CmdAggregationHooks() *cobra.Command { + cmd := &cobra.Command{ + Use: "aggregation-hooks", + Short: "List all aggregation hooks", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + params := &types.QueryAggregationHooksRequest{ + Pagination: pageReq, + } + + res, err := queryClient.AggregationHooks(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "aggregation-hooks") + + return cmd +} + +func CmdAggregationHook() *cobra.Command { + cmd := &cobra.Command{ + Use: "aggregation-hook [id]", + Short: "Get details for a specific aggregation hook", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAggregationHookRequest{ + Id: args[0], + } + + res, err := queryClient.AggregationHook(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/core/02_post_dispatch/client/cli/tx.go b/x/core/02_post_dispatch/client/cli/tx.go index 29dc2c9f..45ada58f 100644 --- a/x/core/02_post_dispatch/client/cli/tx.go +++ b/x/core/02_post_dispatch/client/cli/tx.go @@ -23,6 +23,7 @@ func GetTxCmd() *cobra.Command { NewIgpCmd(), NewMerkleCmd(), NewNoopHookCmd(), + NewAggregationHookCmd(), ) return txCmd diff --git a/x/core/02_post_dispatch/client/cli/tx_aggregation.go b/x/core/02_post_dispatch/client/cli/tx_aggregation.go new file mode 100644 index 00000000..b9019258 --- /dev/null +++ b/x/core/02_post_dispatch/client/cli/tx_aggregation.go @@ -0,0 +1,65 @@ +package cli + +import ( + "fmt" + + "github.com/bcp-innovations/hyperlane-cosmos/util" + "github.com/bcp-innovations/hyperlane-cosmos/x/core/02_post_dispatch/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/spf13/cobra" +) + +func NewAggregationHookCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "aggregation", + Short: "Hyperlane Aggregation Hook commands", + } + + cmd.AddCommand( + CmdCreateAggregationHook(), + ) + + return cmd +} + +func CmdCreateAggregationHook() *cobra.Command { + cmd := &cobra.Command{ + Use: "create [hook-id...]", + Short: "Create a new aggregation hook with the given ordered child hook ids", + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + hooks := make([]util.HexAddress, len(args)) + for i, arg := range args { + hookId, err := util.DecodeHexAddress(arg) + if err != nil { + return err + } + hooks[i] = hookId + } + + msg := types.MsgCreateAggregationHook{ + Owner: clientCtx.GetFromAddress().String(), + Hooks: hooks, + } + + _, err = sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(fmt.Errorf("invalid sender address (%s)", msg.Owner)) + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/core/02_post_dispatch/keeper/genesis.go b/x/core/02_post_dispatch/keeper/genesis.go index c189cfd9..7d92b2ea 100644 --- a/x/core/02_post_dispatch/keeper/genesis.go +++ b/x/core/02_post_dispatch/keeper/genesis.go @@ -41,6 +41,15 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { panic(err) } } + + for _, aggregationHook := range data.AggregationHooks { + if err := k.validateAggregationHooks(ctx, aggregationHook.Hooks); err != nil { + panic(err) + } + if err := k.aggregationHooks.Set(ctx, aggregationHook.Id.GetInternalId(), aggregationHook); err != nil { + panic(err) + } + } } func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState { @@ -95,10 +104,21 @@ func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState { panic(err) } + iterAggregationHooks, err := k.aggregationHooks.Iterate(ctx, nil) + if err != nil { + panic(err) + } + + aggregationHooks, err := iterAggregationHooks.Values() + if err != nil { + panic(err) + } + return &types.GenesisState{ - Igps: igps, - IgpGasConfigs: gasConfigs, - MerkleTreeHooks: merkleTreeHooks, - NoopHooks: noopHooks, + Igps: igps, + IgpGasConfigs: gasConfigs, + MerkleTreeHooks: merkleTreeHooks, + NoopHooks: noopHooks, + AggregationHooks: aggregationHooks, } } diff --git a/x/core/02_post_dispatch/keeper/hook_aggregation.go b/x/core/02_post_dispatch/keeper/hook_aggregation.go new file mode 100644 index 00000000..dc40845a --- /dev/null +++ b/x/core/02_post_dispatch/keeper/hook_aggregation.go @@ -0,0 +1,97 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/errors" + "github.com/bcp-innovations/hyperlane-cosmos/util" + "github.com/bcp-innovations/hyperlane-cosmos/x/core/02_post_dispatch/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type AggregationHookHandler struct { + k Keeper +} + +var _ util.PostDispatchModule = AggregationHookHandler{} + +func (a AggregationHookHandler) Exists(ctx context.Context, hookId util.HexAddress) (bool, error) { + has, err := a.k.aggregationHooks.Has(ctx, hookId.GetInternalId()) + if err != nil { + return false, err + } + return has, nil +} + +func (a AggregationHookHandler) HookType() uint8 { + return types.POST_DISPATCH_HOOK_TYPE_AGGREGATION +} + +func (a AggregationHookHandler) PostDispatch(ctx context.Context, mailboxId, hookId util.HexAddress, metadata util.StandardHookMetadata, message util.HyperlaneMessage, maxFee sdk.Coins) (sdk.Coins, error) { + aggregationHook, err := a.k.aggregationHooks.Get(ctx, hookId.GetInternalId()) + if err != nil { + return sdk.NewCoins(), err + } + + chargedCoins := sdk.NewCoins() + remainingCoins := maxFee + for _, childHookId := range aggregationHook.Hooks { + if childHookId.GetType() == uint32(types.POST_DISPATCH_HOOK_TYPE_AGGREGATION) { + return sdk.NewCoins(), errors.Wrapf(types.ErrInvalidAggregationHook, "nested aggregation hook is not allowed: %s", childHookId.String()) + } + + handler, err := a.k.coreKeeper.PostDispatchRouter().GetModule(childHookId) + if err != nil { + return sdk.NewCoins(), err + } + + childChargedCoins, err := (*handler).PostDispatch(ctx, mailboxId, childHookId, metadata, message, remainingCoins) + if err != nil { + return sdk.NewCoins(), err + } + + remainingCoins, err = subtractCoins(remainingCoins, childChargedCoins) + if err != nil { + return sdk.NewCoins(), err + } + chargedCoins = chargedCoins.Add(childChargedCoins...) + } + + return chargedCoins, nil +} + +func (a AggregationHookHandler) QuoteDispatch(ctx context.Context, mailboxId, hookId util.HexAddress, metadata util.StandardHookMetadata, message util.HyperlaneMessage) (sdk.Coins, error) { + aggregationHook, err := a.k.aggregationHooks.Get(ctx, hookId.GetInternalId()) + if err != nil { + return sdk.NewCoins(), err + } + + quotedCoins := sdk.NewCoins() + for _, childHookId := range aggregationHook.Hooks { + if childHookId.GetType() == uint32(types.POST_DISPATCH_HOOK_TYPE_AGGREGATION) { + return sdk.NewCoins(), errors.Wrapf(types.ErrInvalidAggregationHook, "nested aggregation hook is not allowed: %s", childHookId.String()) + } + + handler, err := a.k.coreKeeper.PostDispatchRouter().GetModule(childHookId) + if err != nil { + return sdk.NewCoins(), err + } + + childQuote, err := (*handler).QuoteDispatch(ctx, mailboxId, childHookId, metadata, message) + if err != nil { + return sdk.NewCoins(), err + } + quotedCoins = quotedCoins.Add(childQuote...) + } + + return quotedCoins, nil +} + +func subtractCoins(coins sdk.Coins, toSubtract sdk.Coins) (sdk.Coins, error) { + remainingCoins, neg := coins.SafeSub(toSubtract...) + if neg { + return sdk.NewCoins(), fmt.Errorf("remaining coins cannot be negative") + } + return remainingCoins, nil +} diff --git a/x/core/02_post_dispatch/keeper/hook_aggregation_test.go b/x/core/02_post_dispatch/keeper/hook_aggregation_test.go new file mode 100644 index 00000000..369f5b2d --- /dev/null +++ b/x/core/02_post_dispatch/keeper/hook_aggregation_test.go @@ -0,0 +1,277 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + i "github.com/bcp-innovations/hyperlane-cosmos/tests/integration" + "github.com/bcp-innovations/hyperlane-cosmos/util" + "github.com/bcp-innovations/hyperlane-cosmos/x/core/02_post_dispatch/keeper" + "github.com/bcp-innovations/hyperlane-cosmos/x/core/02_post_dispatch/types" + sdk "github.com/cosmos/cosmos-sdk/types" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("hook_aggregation_test.go", Ordered, func() { + var s *i.KeeperTestSuite + var creator i.TestValidatorAddress + + var mailboxId util.HexAddress + var noopHookId util.HexAddress + var merkleHookId util.HexAddress + var aggregationHookId util.HexAddress + + BeforeEach(func() { + s = i.NewCleanChain() + creator = i.GenerateTestValidatorAddress("Creator") + + err := s.MintBaseCoins(creator.Address, 1_000_000) + Expect(err).To(BeNil()) + + mailboxId, err = createDummyMailbox(s, creator.Address) + Expect(err).To(BeNil()) + + noopHookId, err = createDummyNoopHook(s, creator.Address) + Expect(err).To(BeNil()) + + merkleHookId, err = createDummyMerkleTreeHook(s, creator.Address, mailboxId) + Expect(err).To(BeNil()) + + aggregationHookId, err = createDummyAggregationHook(s, creator.Address, []util.HexAddress{noopHookId, merkleHookId}) + Expect(err).To(BeNil()) + }) + + It("Create (valid) Aggregation Hook", func() { + qs := keeper.NewQueryServerImpl(&s.App().HyperlaneKeeper.PostDispatchKeeper) + + hook, err := qs.AggregationHook(s.Ctx(), &types.QueryAggregationHookRequest{Id: aggregationHookId.String()}) + Expect(err).To(BeNil()) + Expect(hook.AggregationHook.Owner).To(Equal(creator.Address)) + Expect(hook.AggregationHook.Hooks).To(Equal([]util.HexAddress{noopHookId, merkleHookId})) + + hooks, err := qs.AggregationHooks(s.Ctx(), &types.QueryAggregationHooksRequest{}) + Expect(err).To(BeNil()) + Expect(hooks.AggregationHooks).To(HaveLen(1)) + Expect(hooks.AggregationHooks[0].Id).To(Equal(aggregationHookId)) + }) + + It("Create (invalid) Aggregation Hook (empty hooks)", func() { + _, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator.Address, + Hooks: []util.HexAddress{}, + }) + + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("hooks cannot be empty")) + }) + + It("Create (invalid) Aggregation Hook (zero hook)", func() { + _, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator.Address, + Hooks: []util.HexAddress{util.NewZeroAddress()}, + }) + + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("hook id cannot be zero")) + }) + + It("Create (invalid) Aggregation Hook (non-existing hook)", func() { + nonExistingHook := util.CreateMockHexAddress("missing-hook", 1) + + _, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator.Address, + Hooks: []util.HexAddress{nonExistingHook}, + }) + + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring(nonExistingHook.String())) + }) + + It("Create (invalid) Aggregation Hook (duplicate hook)", func() { + _, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator.Address, + Hooks: []util.HexAddress{noopHookId, noopHookId}, + }) + + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("duplicate hook id")) + }) + + It("Create (invalid) Aggregation Hook (nested aggregation hook)", func() { + _, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator.Address, + Hooks: []util.HexAddress{aggregationHookId}, + }) + + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("nested aggregation hook is not allowed")) + }) + + It("AggregationHook HookType", func() { + handler, err := s.App().HyperlaneKeeper.PostDispatchRouter().GetModule(aggregationHookId) + Expect(err).To(BeNil()) + + Expect((*handler).HookType()).To(Equal(uint8(types.POST_DISPATCH_HOOK_TYPE_AGGREGATION))) + }) + + It("AggregationHook (valid) exists", func() { + handler, err := s.App().HyperlaneKeeper.PostDispatchRouter().GetModule(aggregationHookId) + Expect(err).To(BeNil()) + + exists, err := (*handler).Exists(s.Ctx(), aggregationHookId) + Expect(err).To(BeNil()) + Expect(exists).To(BeTrue()) + }) + + It("AggregationHook (invalid) exists", func() { + aggregationHookId[31] = byte(10) + handler, err := s.App().HyperlaneKeeper.PostDispatchRouter().GetModule(aggregationHookId) + Expect(err).To(BeNil()) + + exists, err := (*handler).Exists(s.Ctx(), aggregationHookId) + Expect(err).To(BeNil()) + Expect(exists).To(BeFalse()) + }) + + It("AggregationHook QuoteDispatch sums child quotes", func() { + igp1, igp2 := createConfiguredIgpPair(s, creator) + aggregationHookId, err := createDummyAggregationHook(s, creator.Address, []util.HexAddress{igp1, igp2}) + Expect(err).To(BeNil()) + + handler, err := s.App().HyperlaneKeeper.PostDispatchRouter().GetModule(aggregationHookId) + Expect(err).To(BeNil()) + + quote, err := (*handler).QuoteDispatch(s.Ctx(), mailboxId, aggregationHookId, util.StandardHookMetadata{GasLimit: math.NewInt(10)}, util.HyperlaneMessage{Destination: 2}) + + Expect(err).To(BeNil()) + Expect(quote).To(Equal(sdk.NewCoins(sdk.NewCoin("acoin", math.NewInt(20))))) + }) + + It("AggregationHook PostDispatch executes child hooks in order", func() { + merkleHookId2, err := createDummyMerkleTreeHook(s, creator.Address, mailboxId) + Expect(err).To(BeNil()) + + aggregationHookId, err := createDummyAggregationHook(s, creator.Address, []util.HexAddress{merkleHookId, merkleHookId2}) + Expect(err).To(BeNil()) + + message := util.HyperlaneMessage{ + Version: 1, + Nonce: 0, + Origin: 11, + Sender: util.CreateMockHexAddress("sender", 1), + Destination: 2, + Recipient: util.CreateMockHexAddress("recipient", 1), + Body: []byte("test"), + } + + charged, err := s.App().HyperlaneKeeper.PostDispatch(s.Ctx(), mailboxId, aggregationHookId, util.StandardHookMetadata{}, message, sdk.NewCoins()) + Expect(err).To(BeNil()) + Expect(charged).To(Equal(sdk.NewCoins())) + + var insertedHookIds []string + for _, event := range s.Ctx().EventManager().Events() { + if event.Type != "hyperlane.core.post_dispatch.v1.EventInsertedIntoTree" { + continue + } + attr, found := event.GetAttribute("merkle_tree_hook_id") + if found { + insertedHookIds = append(insertedHookIds, attr.Value) + } + } + + Expect(insertedHookIds).To(Equal([]string{`"` + merkleHookId.String() + `"`, `"` + merkleHookId2.String() + `"`})) + }) + + It("AggregationHook PostDispatch passes remaining maxFee to child hooks", func() { + igp1, igp2 := createConfiguredIgpPair(s, creator) + aggregationHookId, err := createDummyAggregationHook(s, creator.Address, []util.HexAddress{igp1, igp2}) + Expect(err).To(BeNil()) + + message := util.HyperlaneMessage{ + Version: 1, + Nonce: 0, + Origin: 11, + Sender: util.CreateMockHexAddress("sender", 1), + Destination: 2, + Recipient: util.CreateMockHexAddress("recipient", 1), + Body: []byte("test"), + } + metadata := util.StandardHookMetadata{ + Address: creator.AccAddress, + GasLimit: math.NewInt(10), + } + + charged, err := s.App().HyperlaneKeeper.PostDispatch( + s.Ctx(), + mailboxId, + aggregationHookId, + metadata, + message, + sdk.NewCoins(sdk.NewCoin("acoin", math.NewInt(20))), + ) + Expect(err).To(BeNil()) + Expect(charged).To(Equal(sdk.NewCoins(sdk.NewCoin("acoin", math.NewInt(20))))) + + _, err = s.App().HyperlaneKeeper.PostDispatch( + s.Ctx(), + mailboxId, + aggregationHookId, + metadata, + message, + sdk.NewCoins(sdk.NewCoin("acoin", math.NewInt(15))), + ) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("required payment exceeds max hyperlane fee")) + }) + + It("AggregationHook PostDispatch returns child failure", func() { + wrongMailboxId, err := createDummyMailbox(s, creator.Address) + Expect(err).To(BeNil()) + + message := util.HyperlaneMessage{ + Version: 1, + Nonce: 0, + Origin: 11, + Sender: util.CreateMockHexAddress("sender", 1), + Destination: 2, + Recipient: util.CreateMockHexAddress("recipient", 1), + Body: []byte("test"), + } + + _, err = s.App().HyperlaneKeeper.PostDispatch(s.Ctx(), wrongMailboxId, aggregationHookId, util.StandardHookMetadata{}, message, sdk.NewCoins()) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring(types.ErrSenderIsNotDesignatedMailbox.Error())) + }) + + It("AggregationHook genesis export preserves ordered child hooks", func() { + genesis := keeper.ExportGenesis(s.Ctx(), s.App().HyperlaneKeeper.PostDispatchKeeper) + + Expect(genesis.AggregationHooks).To(HaveLen(1)) + Expect(genesis.AggregationHooks[0].Id).To(Equal(aggregationHookId)) + Expect(genesis.AggregationHooks[0].Hooks).To(Equal([]util.HexAddress{noopHookId, merkleHookId})) + }) +}) + +func createConfiguredIgpPair(s *i.KeeperTestSuite, creator i.TestValidatorAddress) (util.HexAddress, util.HexAddress) { + igp1, err := createDummyIgp(s, creator.Address, "acoin") + Expect(err).To(BeNil()) + igp2, err := createDummyIgp(s, creator.Address, "acoin") + Expect(err).To(BeNil()) + + for _, igp := range []util.HexAddress{igp1, igp2} { + _, err = s.RunTx(&types.MsgSetDestinationGasConfig{ + Owner: creator.Address, + IgpId: igp, + DestinationGasConfig: &types.DestinationGasConfig{ + RemoteDomain: 2, + GasOracle: &types.GasOracle{ + TokenExchangeRate: math.NewInt(1e10), + GasPrice: math.NewInt(1), + }, + GasOverhead: math.ZeroInt(), + }, + }) + Expect(err).To(BeNil()) + } + + return igp1, igp2 +} diff --git a/x/core/02_post_dispatch/keeper/keeper.go b/x/core/02_post_dispatch/keeper/keeper.go index 1774f105..7371a9e6 100644 --- a/x/core/02_post_dispatch/keeper/keeper.go +++ b/x/core/02_post_dispatch/keeper/keeper.go @@ -16,6 +16,8 @@ type Keeper struct { noopHooks collections.Map[uint64, types.NoopHook] + aggregationHooks collections.Map[uint64, types.AggregationHook] + schema collections.Schema coreKeeper types.CoreKeeper @@ -32,6 +34,8 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, ba merkleTreeHooks: collections.NewMap(sb, types.MerkleTreeHooksKey, "merkle_tree_hooks_key", collections.Uint64Key, codec.CollValue[types.MerkleTreeHook](cdc)), noopHooks: collections.NewMap(sb, types.NoopHooksKey, "noop_hooks_key", collections.Uint64Key, codec.CollValue[types.NoopHook](cdc)), + aggregationHooks: collections.NewMap(sb, types.AggregationHooksKey, "aggregation_hooks_key", collections.Uint64Key, codec.CollValue[types.AggregationHook](cdc)), + bankKeeper: bankKeeper, } @@ -57,4 +61,5 @@ func (k *Keeper) SetCoreKeeper(coreKeeper types.CoreKeeper) { router.RegisterModule(types.POST_DISPATCH_HOOK_TYPE_MERKLE_TREE, MerkleTreeHookHandler{*k}) router.RegisterModule(types.POST_DISPATCH_HOOK_TYPE_INTERCHAIN_GAS_PAYMASTER, InterchainGasPaymasterHookHandler{*k}) router.RegisterModule(types.POST_DISPATCH_HOOK_TYPE_UNUSED, NoopHookHandler{*k}) + router.RegisterModule(types.POST_DISPATCH_HOOK_TYPE_AGGREGATION, AggregationHookHandler{*k}) } diff --git a/x/core/02_post_dispatch/keeper/keeper_suite_test.go b/x/core/02_post_dispatch/keeper/keeper_suite_test.go index 58d059c8..3630fe53 100644 --- a/x/core/02_post_dispatch/keeper/keeper_suite_test.go +++ b/x/core/02_post_dispatch/keeper/keeper_suite_test.go @@ -77,3 +77,38 @@ func createDummyMerkleTreeHook(s *i.KeeperTestSuite, creator string, mailboxId u return response.Id, nil } + +func createDummyNoopHook(s *i.KeeperTestSuite, creator string) (util.HexAddress, error) { + res, err := s.RunTx(&types.MsgCreateNoopHook{ + Owner: creator, + }) + if err != nil { + return [32]byte{}, err + } + + var response types.MsgCreateNoopHookResponse + err = proto.Unmarshal(res.MsgResponses[0].Value, &response) + if err != nil { + return [32]byte{}, err + } + + return response.Id, nil +} + +func createDummyAggregationHook(s *i.KeeperTestSuite, creator string, hooks []util.HexAddress) (util.HexAddress, error) { + res, err := s.RunTx(&types.MsgCreateAggregationHook{ + Owner: creator, + Hooks: hooks, + }) + if err != nil { + return [32]byte{}, err + } + + var response types.MsgCreateAggregationHookResponse + err = proto.Unmarshal(res.MsgResponses[0].Value, &response) + if err != nil { + return [32]byte{}, err + } + + return response.Id, nil +} diff --git a/x/core/02_post_dispatch/keeper/msg_server.go b/x/core/02_post_dispatch/keeper/msg_server.go index c19a2258..8a925ec8 100644 --- a/x/core/02_post_dispatch/keeper/msg_server.go +++ b/x/core/02_post_dispatch/keeper/msg_server.go @@ -95,3 +95,75 @@ func (ms msgServer) CreateNoopHook(ctx context.Context, msg *types.MsgCreateNoop Id: nextId, }, nil } + +func (k *Keeper) CreateAggregationHook(ctx context.Context, msg *types.MsgCreateAggregationHook) (util.HexAddress, error) { + if err := k.validateAggregationHooks(ctx, msg.Hooks); err != nil { + return util.HexAddress{}, err + } + + nextId, err := k.coreKeeper.PostDispatchRouter().GetNextSequence(ctx, types.POST_DISPATCH_HOOK_TYPE_AGGREGATION) + if err != nil { + return util.HexAddress{}, err + } + + aggregationHook := types.AggregationHook{ + Id: nextId, + Owner: msg.Owner, + Hooks: msg.Hooks, + } + + err = k.aggregationHooks.Set(ctx, aggregationHook.Id.GetInternalId(), aggregationHook) + if err != nil { + return util.HexAddress{}, err + } + + _ = sdk.UnwrapSDKContext(ctx).EventManager().EmitTypedEvent(&types.EventCreateAggregationHook{ + AggregationHookId: aggregationHook.Id, + Owner: aggregationHook.Owner, + Hooks: aggregationHook.Hooks, + }) + + return nextId, nil +} + +func (ms msgServer) CreateAggregationHook(ctx context.Context, msg *types.MsgCreateAggregationHook) (*types.MsgCreateAggregationHookResponse, error) { + nextId, err := ms.k.CreateAggregationHook(ctx, msg) + if err != nil { + return nil, err + } + + return &types.MsgCreateAggregationHookResponse{ + Id: nextId, + }, nil +} + +func (k *Keeper) validateAggregationHooks(ctx context.Context, hooks []util.HexAddress) error { + if len(hooks) == 0 { + return errors.Wrap(types.ErrInvalidAggregationHook, "hooks cannot be empty") + } + + seen := make(map[util.HexAddress]struct{}, len(hooks)) + for _, hookId := range hooks { + if hookId.IsZeroAddress() { + return errors.Wrap(types.ErrInvalidAggregationHook, "hook id cannot be zero") + } + if hookId.GetType() == uint32(types.POST_DISPATCH_HOOK_TYPE_AGGREGATION) { + return errors.Wrapf(types.ErrInvalidAggregationHook, "nested aggregation hook is not allowed: %s", hookId.String()) + } + if _, ok := seen[hookId]; ok { + return errors.Wrapf(types.ErrInvalidAggregationHook, "duplicate hook id: %s", hookId.String()) + } + seen[hookId] = struct{}{} + + handler, err := k.coreKeeper.PostDispatchRouter().GetModule(hookId) + if err != nil { + return errors.Wrapf(types.ErrHookDoesNotExistOrIsNotRegistered, "%s", hookId.String()) + } + exists, err := (*handler).Exists(ctx, hookId) + if err != nil || !exists { + return errors.Wrapf(types.ErrHookDoesNotExistOrIsNotRegistered, "%s", hookId.String()) + } + } + + return nil +} diff --git a/x/core/02_post_dispatch/keeper/query_server.go b/x/core/02_post_dispatch/keeper/query_server.go index a71c56e2..c9de9c43 100644 --- a/x/core/02_post_dispatch/keeper/query_server.go +++ b/x/core/02_post_dispatch/keeper/query_server.go @@ -219,3 +219,34 @@ func (qs queryServer) NoopHooks(ctx context.Context, req *types.QueryNoopHooksRe Pagination: pagination, }, nil } + +// +// Aggregation Hook + +func (qs queryServer) AggregationHook(ctx context.Context, req *types.QueryAggregationHookRequest) (*types.QueryAggregationHookResponse, error) { + hookId, err := util.DecodeHexAddress(req.Id) + if err != nil { + return nil, err + } + + aggregationHook, err := qs.k.aggregationHooks.Get(ctx, hookId.GetInternalId()) + if err != nil { + return nil, err + } + + return &types.QueryAggregationHookResponse{ + AggregationHook: &aggregationHook, + }, nil +} + +func (qs queryServer) AggregationHooks(ctx context.Context, req *types.QueryAggregationHooksRequest) (*types.QueryAggregationHooksResponse, error) { + values, pagination, err := util.GetPaginatedFromMap(ctx, qs.k.aggregationHooks, req.Pagination) + if err != nil { + return nil, err + } + + return &types.QueryAggregationHooksResponse{ + AggregationHooks: values, + Pagination: pagination, + }, nil +} diff --git a/x/core/02_post_dispatch/types/codec.go b/x/core/02_post_dispatch/types/codec.go index 37b56742..658c83c2 100644 --- a/x/core/02_post_dispatch/types/codec.go +++ b/x/core/02_post_dispatch/types/codec.go @@ -16,6 +16,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgClaim{}, &MsgCreateMerkleTreeHook{}, &MsgCreateNoopHook{}, + &MsgCreateAggregationHook{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/core/02_post_dispatch/types/errors.go b/x/core/02_post_dispatch/types/errors.go index 4a3d8a5a..c7fc3d31 100644 --- a/x/core/02_post_dispatch/types/errors.go +++ b/x/core/02_post_dispatch/types/errors.go @@ -8,4 +8,5 @@ var ( ErrHookDoesNotExistOrIsNotRegistered = errors.Register(SubModuleName, 3, "hook does not exist or isn't registered") ErrUnauthorized = errors.Register(SubModuleName, 4, "unauthorized") ErrInvalidOwner = errors.Register(SubModuleName, 5, "invalid owner") + ErrInvalidAggregationHook = errors.Register(SubModuleName, 6, "invalid aggregation hook") ) diff --git a/x/core/02_post_dispatch/types/events.pb.go b/x/core/02_post_dispatch/types/events.pb.go index b5ddb6c7..8163068f 100644 --- a/x/core/02_post_dispatch/types/events.pb.go +++ b/x/core/02_post_dispatch/types/events.pb.go @@ -240,6 +240,56 @@ func (m *EventCreateNoopHook) GetOwner() string { return "" } +// EventCreateAggregationHook ... +type EventCreateAggregationHook struct { + // id ... + AggregationHookId github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,1,opt,name=aggregation_hook_id,json=aggregationHookId,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"aggregation_hook_id"` + // owner ... + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + // hooks ... + Hooks []github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,3,rep,name=hooks,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"hooks"` +} + +func (m *EventCreateAggregationHook) Reset() { *m = EventCreateAggregationHook{} } +func (m *EventCreateAggregationHook) String() string { return proto.CompactTextString(m) } +func (*EventCreateAggregationHook) ProtoMessage() {} +func (*EventCreateAggregationHook) Descriptor() ([]byte, []int) { + return fileDescriptor_158483b25b83c3db, []int{4} +} +func (m *EventCreateAggregationHook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCreateAggregationHook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCreateAggregationHook.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 *EventCreateAggregationHook) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCreateAggregationHook.Merge(m, src) +} +func (m *EventCreateAggregationHook) XXX_Size() int { + return m.Size() +} +func (m *EventCreateAggregationHook) XXX_DiscardUnknown() { + xxx_messageInfo_EventCreateAggregationHook.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCreateAggregationHook proto.InternalMessageInfo + +func (m *EventCreateAggregationHook) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + // EventCreateIgp ... type EventCreateIgp struct { IgpId github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,1,opt,name=igp_id,json=igpId,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"igp_id"` @@ -251,7 +301,7 @@ func (m *EventCreateIgp) Reset() { *m = EventCreateIgp{} } func (m *EventCreateIgp) String() string { return proto.CompactTextString(m) } func (*EventCreateIgp) ProtoMessage() {} func (*EventCreateIgp) Descriptor() ([]byte, []int) { - return fileDescriptor_158483b25b83c3db, []int{4} + return fileDescriptor_158483b25b83c3db, []int{5} } func (m *EventCreateIgp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -306,7 +356,7 @@ func (m *EventSetIgp) Reset() { *m = EventSetIgp{} } func (m *EventSetIgp) String() string { return proto.CompactTextString(m) } func (*EventSetIgp) ProtoMessage() {} func (*EventSetIgp) Descriptor() ([]byte, []int) { - return fileDescriptor_158483b25b83c3db, []int{5} + return fileDescriptor_158483b25b83c3db, []int{6} } func (m *EventSetIgp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -370,7 +420,7 @@ func (m *EventSetDestinationGasConfig) Reset() { *m = EventSetDestinatio func (m *EventSetDestinationGasConfig) String() string { return proto.CompactTextString(m) } func (*EventSetDestinationGasConfig) ProtoMessage() {} func (*EventSetDestinationGasConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_158483b25b83c3db, []int{6} + return fileDescriptor_158483b25b83c3db, []int{7} } func (m *EventSetDestinationGasConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -424,7 +474,7 @@ func (m *EventClaimIgp) Reset() { *m = EventClaimIgp{} } func (m *EventClaimIgp) String() string { return proto.CompactTextString(m) } func (*EventClaimIgp) ProtoMessage() {} func (*EventClaimIgp) Descriptor() ([]byte, []int) { - return fileDescriptor_158483b25b83c3db, []int{7} + return fileDescriptor_158483b25b83c3db, []int{8} } func (m *EventClaimIgp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,6 +522,7 @@ func init() { proto.RegisterType((*EventInsertedIntoTree)(nil), "hyperlane.core.post_dispatch.v1.EventInsertedIntoTree") proto.RegisterType((*EventGasPayment)(nil), "hyperlane.core.post_dispatch.v1.EventGasPayment") proto.RegisterType((*EventCreateNoopHook)(nil), "hyperlane.core.post_dispatch.v1.EventCreateNoopHook") + proto.RegisterType((*EventCreateAggregationHook)(nil), "hyperlane.core.post_dispatch.v1.EventCreateAggregationHook") proto.RegisterType((*EventCreateIgp)(nil), "hyperlane.core.post_dispatch.v1.EventCreateIgp") proto.RegisterType((*EventSetIgp)(nil), "hyperlane.core.post_dispatch.v1.EventSetIgp") proto.RegisterType((*EventSetDestinationGasConfig)(nil), "hyperlane.core.post_dispatch.v1.EventSetDestinationGasConfig") @@ -483,50 +534,53 @@ func init() { } var fileDescriptor_158483b25b83c3db = []byte{ - // 687 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x8e, 0xd3, 0xdb, 0xb4, 0x99, 0x36, 0xf7, 0xde, 0xba, 0x2d, 0x0a, 0x3f, 0x4d, 0xab, 0xb0, - 0x61, 0x41, 0x6d, 0x0a, 0x3b, 0xd8, 0xd0, 0x3f, 0xb5, 0x5e, 0x94, 0x56, 0x81, 0x55, 0x37, 0xd6, - 0xc4, 0x3e, 0xd8, 0xa3, 0xc4, 0x73, 0x46, 0x33, 0x93, 0x34, 0xdd, 0x22, 0xb1, 0x60, 0x87, 0x58, - 0xc1, 0x3b, 0xf0, 0x20, 0x95, 0xd8, 0x74, 0x89, 0x58, 0x54, 0xa8, 0x7d, 0x11, 0xe4, 0xb1, 0x53, - 0x1c, 0x09, 0xa4, 0x22, 0xa5, 0x74, 0xe7, 0xf3, 0xff, 0x9d, 0x33, 0xe7, 0x1b, 0x0f, 0x79, 0x18, - 0x1f, 0x0b, 0x90, 0x5d, 0xca, 0xc1, 0x0d, 0x50, 0x82, 0x2b, 0x50, 0x69, 0x3f, 0x64, 0x4a, 0x50, - 0x1d, 0xc4, 0x6e, 0x7f, 0xcd, 0x85, 0x3e, 0x70, 0xad, 0x1c, 0x21, 0x51, 0xa3, 0xbd, 0x7c, 0xe9, - 0xed, 0xa4, 0xde, 0xce, 0x88, 0xb7, 0xd3, 0x5f, 0xbb, 0xb3, 0x10, 0x61, 0x84, 0xc6, 0xd7, 0x4d, - 0xbf, 0xb2, 0xb0, 0xe6, 0xbb, 0x32, 0xb9, 0xbd, 0x9d, 0xe6, 0xd9, 0x94, 0x40, 0x35, 0xec, 0x81, - 0xec, 0x74, 0xe1, 0x95, 0x04, 0xd8, 0x45, 0xec, 0xd8, 0x92, 0xcc, 0x27, 0x46, 0xe3, 0x6b, 0x09, - 0xe0, 0xc7, 0x88, 0x1d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c2, 0x8e, 0xc3, 0xd0, 0x4d, 0xa8, 0x8e, 0x1d, 0x8f, 0xeb, 0xd6, 0x4c, 0x44, 0xd5, 0x7e, 0x1e, - 0x61, 0x3f, 0x25, 0x29, 0xf5, 0x7c, 0x21, 0x59, 0x00, 0xf5, 0xca, 0x55, 0xc2, 0xa7, 0x23, 0xaa, - 0x0e, 0x52, 0x77, 0x7b, 0x8f, 0xcc, 0x6b, 0xec, 0x00, 0xf7, 0x61, 0x10, 0xc4, 0x94, 0x47, 0xe0, - 0x4b, 0xaa, 0xa1, 0x3e, 0x75, 0x95, 0x2c, 0x73, 0x26, 0x72, 0x3b, 0x0f, 0x6c, 0x51, 0x0d, 0xcd, - 0x4f, 0x16, 0xa9, 0x65, 0xdb, 0xde, 0xa5, 0x2c, 0xb9, 0x99, 0xa5, 0xba, 0x45, 0x2a, 0x23, 0xf7, - 0x52, 0x2e, 0x6d, 0x04, 0x27, 0xe7, 0x0d, 0xeb, 0xf4, 0xbc, 0x61, 0x7d, 0x3f, 0x6f, 0x58, 0xef, - 0x2f, 0x1a, 0xa5, 0xd3, 0x8b, 0x46, 0xe9, 0xeb, 0x45, 0xa3, 0x74, 0xe8, 0xfd, 0x09, 0x96, 0x41, - 0xf6, 0x08, 0x78, 0xf4, 0xd8, 0x1f, 0x7d, 0x07, 0xe8, 0x63, 0x01, 0xaa, 0x5d, 0x31, 0x7f, 0xf3, - 0x27, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x88, 0xc4, 0x0d, 0xdc, 0x34, 0x08, 0x00, 0x00, + // 726 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4d, 0x4f, 0x13, 0x41, + 0x18, 0xee, 0xb6, 0xb6, 0xd0, 0x81, 0xaa, 0x6c, 0xc1, 0x54, 0x94, 0x42, 0xd6, 0x8b, 0x07, 0xd9, + 0x15, 0xbd, 0xe9, 0x45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0x5c, 0x3a, 0x3d, 0x45, 0xbb, + 0xf6, 0x36, 0x0c, 0x56, 0x83, 0x40, 0x80, 0x94, 0xad, 0xfb, 0xd1, 0x48, 0x44, 0x37, 0x30, 0xdb, + 0x08, 0x45, 0x98, 0x76, 0xdb, 0x7c, 0x90, 0x84, 0x2a, 0x8e, 0x2f, 0x54, 0x35, 0x73, 0xeb, 0x06, + 0xe6, 0x2c, 0x2a, 0xf3, 0x03, 0x06, 0xa2, 0x51, 0x4a, 0xdc, 0xb7, 0x52, 0xc2, 0xfa, 0x54, 0x44, + 0x73, 0xba, 0x16, 0x2e, 0x93, 0x20, 0x14, 0x04, 0x2e, 0x53, 0x3c, 0x41, 0xa6, 0x31, 0x81, 0x94, + 0x98, 0xc0, 0x98, 0xd3, 0xaf, 0x66, 0x6e, 0x53, 0x4c, 0x94, 0x05, 0x30, 0xd0, 0x29, 0xd7, 0x5a, + 0x29, 0x71, 0x55, 0x07, 0x4a, 0x37, 0xd8, 0x01, 0xeb, 0x47, 0x11, 0xdd, 0xd3, 0x75, 0xd8, 0xc2, + 0x72, 0x0f, 0x1f, 0x46, 0xc0, 0xd4, 0x7f, 0xa9, 0xc0, 0x12, 0x9a, 0x0a, 0x40, 0x2a, 0xca, 0xb4, + 0x6d, 0x56, 0x87, 0x3c, 0xcb, 0x5c, 0x40, 0x88, 0x60, 0xe9, 0xe1, 0x88, 0xf7, 0x98, 0xca, 0x9a, + 0x57, 0x25, 0x58, 0xae, 0x6a, 0x86, 0xd9, 0x40, 0x13, 0x71, 0x8a, 0xb7, 0x71, 0x47, 0xcb, 0x86, + 0xa4, 0xb9, 0x8f, 0x2a, 0x94, 0xc4, 0x09, 0xf4, 0xf2, 0xf8, 0xa0, 0x97, 0x29, 0x89, 0xdd, 0xc0, + 0xfa, 0x6a, 0xa0, 0x7a, 0x6e, 0x85, 0xde, 0x72, 0x1e, 0xeb, 0xe5, 0x01, 0x34, 0xcd, 0x38, 0x8f, + 0x6f, 0x62, 0x6b, 0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 0x3b, 0x11, 0x56, 0xa1, 0xed, + 0x32, 0xd5, 0x9a, 0x22, 0x58, 0xee, 0x66, 0x16, 0xe6, 0x2b, 0x94, 0xdc, 0x1f, 0x2f, 0x16, 0xd4, + 0x87, 0x46, 0xe5, 0x3a, 0xe6, 0x93, 0x04, 0xcb, 0xbd, 0x44, 0xdd, 0xdc, 0x41, 0x75, 0xc5, 0x3b, + 0xc0, 0x3c, 0x18, 0xf8, 0x21, 0x66, 0x04, 0x3c, 0x81, 0x15, 0x34, 0x26, 0xae, 0xe3, 0x65, 0x46, + 0x5b, 0x6e, 0x66, 0x86, 0x2d, 0xac, 0xc0, 0xfa, 0x6e, 0xa0, 0x5a, 0x3a, 0xed, 0x5d, 0x4c, 0xa3, + 0xdb, 0x19, 0xaa, 0x07, 0xa8, 0x32, 0x72, 0x9c, 0x33, 0x6a, 0xcd, 0x3f, 0x3e, 0x6b, 0x1a, 0x27, + 0x67, 0x4d, 0xe3, 0xcf, 0x59, 0xd3, 0xf8, 0x72, 0xde, 0x2c, 0x9c, 0x9c, 0x37, 0x0b, 0xbf, 0xce, + 0x9b, 0x85, 0x7d, 0xf7, 0x5f, 0xb0, 0x0c, 0xd2, 0x9f, 0xd0, 0xf3, 0x17, 0xde, 0xe8, 0x67, 0x48, + 0x1d, 0xc6, 0x20, 0xdb, 0x15, 0xfd, 0xa5, 0x79, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x63, 0x01, + 0x55, 0x71, 0x39, 0x09, 0x00, 0x00, } func (m *EventCreateMerkleTreeHook) Marshal() (dAtA []byte, err error) { @@ -729,6 +783,60 @@ func (m *EventCreateNoopHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventCreateAggregationHook) 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 *EventCreateAggregationHook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCreateAggregationHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hooks) > 0 { + for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Hooks[iNdEx].Size() + i -= size + if _, err := m.Hooks[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + { + size := m.AggregationHookId.Size() + i -= size + if _, err := m.AggregationHookId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *EventCreateIgp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1038,6 +1146,27 @@ func (m *EventCreateNoopHook) Size() (n int) { return n } +func (m *EventCreateAggregationHook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AggregationHookId.Size() + n += 1 + l + sovEvents(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Hooks) > 0 { + for _, e := range m.Hooks { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + func (m *EventCreateIgp) Size() (n int) { if m == nil { return 0 @@ -1732,6 +1861,158 @@ func (m *EventCreateNoopHook) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventCreateAggregationHook) 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: EventCreateAggregationHook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCreateAggregationHook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationHookId", 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 + } + if err := m.AggregationHookId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hooks", 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 + } + var v github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress + m.Hooks = append(m.Hooks, v) + if err := m.Hooks[len(m.Hooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EventCreateIgp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/core/02_post_dispatch/types/genesis.go b/x/core/02_post_dispatch/types/genesis.go index 9e357e72..2256f419 100644 --- a/x/core/02_post_dispatch/types/genesis.go +++ b/x/core/02_post_dispatch/types/genesis.go @@ -6,10 +6,11 @@ import ( func NewGenesisState() *GenesisState { return &GenesisState{ - Igps: []InterchainGasPaymaster{}, - IgpGasConfigs: []GenesisDestinationGasConfigWrapper{}, - MerkleTreeHooks: []MerkleTreeHook{}, - NoopHooks: []NoopHook{}, + Igps: []InterchainGasPaymaster{}, + IgpGasConfigs: []GenesisDestinationGasConfigWrapper{}, + MerkleTreeHooks: []MerkleTreeHook{}, + NoopHooks: []NoopHook{}, + AggregationHooks: []AggregationHook{}, } } @@ -28,5 +29,13 @@ func (gs *GenesisState) Validate() error { } } + aggregationHookMap := make(map[uint64]struct{}) + for _, aggregationHook := range gs.AggregationHooks { + if _, ok := aggregationHookMap[aggregationHook.Id.GetInternalId()]; ok { + return fmt.Errorf("duplicate aggregation hook: %s", aggregationHook.Id) + } + aggregationHookMap[aggregationHook.Id.GetInternalId()] = struct{}{} + } + return nil } diff --git a/x/core/02_post_dispatch/types/genesis.pb.go b/x/core/02_post_dispatch/types/genesis.pb.go index 6fff24af..c2b9a2f4 100644 --- a/x/core/02_post_dispatch/types/genesis.pb.go +++ b/x/core/02_post_dispatch/types/genesis.pb.go @@ -26,10 +26,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the post dispatch submodule's genesis state. type GenesisState struct { - Igps []InterchainGasPaymaster `protobuf:"bytes,1,rep,name=igps,proto3" json:"igps"` - IgpGasConfigs []GenesisDestinationGasConfigWrapper `protobuf:"bytes,2,rep,name=igp_gas_configs,json=igpGasConfigs,proto3" json:"igp_gas_configs"` - MerkleTreeHooks []MerkleTreeHook `protobuf:"bytes,3,rep,name=merkle_tree_hooks,json=merkleTreeHooks,proto3" json:"merkle_tree_hooks"` - NoopHooks []NoopHook `protobuf:"bytes,4,rep,name=noop_hooks,json=noopHooks,proto3" json:"noop_hooks"` + Igps []InterchainGasPaymaster `protobuf:"bytes,1,rep,name=igps,proto3" json:"igps"` + IgpGasConfigs []GenesisDestinationGasConfigWrapper `protobuf:"bytes,2,rep,name=igp_gas_configs,json=igpGasConfigs,proto3" json:"igp_gas_configs"` + MerkleTreeHooks []MerkleTreeHook `protobuf:"bytes,3,rep,name=merkle_tree_hooks,json=merkleTreeHooks,proto3" json:"merkle_tree_hooks"` + NoopHooks []NoopHook `protobuf:"bytes,4,rep,name=noop_hooks,json=noopHooks,proto3" json:"noop_hooks"` + AggregationHooks []AggregationHook `protobuf:"bytes,5,rep,name=aggregation_hooks,json=aggregationHooks,proto3" json:"aggregation_hooks"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -93,6 +94,13 @@ func (m *GenesisState) GetNoopHooks() []NoopHook { return nil } +func (m *GenesisState) GetAggregationHooks() []AggregationHook { + if m != nil { + return m.AggregationHooks + } + return nil +} + // GenesisDestinationGasConfigWrapper ... type GenesisDestinationGasConfigWrapper struct { // remote_domain ... @@ -169,38 +177,39 @@ func init() { } var fileDescriptor_8864b1a76aa43cd2 = []byte{ - // 484 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xe3, 0x26, 0x54, 0xca, 0x26, 0x51, 0x85, 0x45, 0x25, 0xab, 0x12, 0x4e, 0x14, 0x2e, - 0x01, 0x14, 0x2f, 0x0d, 0x07, 0xae, 0x28, 0xad, 0x54, 0x72, 0xa0, 0x40, 0x40, 0x42, 0xe2, 0x62, - 0x6d, 0xec, 0x61, 0xbd, 0x4a, 0xbc, 0xb3, 0xec, 0x2e, 0x11, 0x79, 0x02, 0xae, 0x3c, 0x56, 0x8f, - 0x3d, 0x22, 0x0e, 0x15, 0x4a, 0xce, 0xbc, 0x03, 0xf2, 0xda, 0x44, 0xe4, 0xe4, 0xdb, 0x78, 0x3c, - 0xf3, 0xfd, 0x33, 0xb3, 0x3f, 0x19, 0x67, 0x1b, 0x05, 0x7a, 0xc5, 0x24, 0xd0, 0x04, 0x35, 0x50, - 0x85, 0xc6, 0xc6, 0xa9, 0x30, 0x8a, 0xd9, 0x24, 0xa3, 0xeb, 0x73, 0xca, 0x41, 0x82, 0x11, 0x26, - 0x52, 0x1a, 0x2d, 0xfa, 0xfd, 0x7d, 0x79, 0x54, 0x94, 0x47, 0x07, 0xe5, 0xd1, 0xfa, 0xfc, 0xec, - 0x69, 0x1d, 0xcf, 0x6e, 0x14, 0x54, 0xb4, 0xb3, 0x07, 0x1c, 0x39, 0xba, 0x90, 0x16, 0x51, 0x99, - 0x1d, 0x7e, 0x6f, 0x92, 0xee, 0x55, 0xa9,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a3, 0x81, 0x37, 0xea, - 0x4c, 0x9e, 0xd4, 0x1f, 0x9b, 0x99, 0x37, 0xae, 0x63, 0xde, 0xe6, 0xff, 0x42, 0xff, 0x25, 0xe9, - 0x3a, 0xd4, 0x1a, 0x74, 0x06, 0x2c, 0x0d, 0x9a, 0x03, 0x6f, 0xd4, 0x9e, 0x3e, 0x2c, 0xa6, 0xff, - 0x75, 0xd7, 0x3f, 0x4d, 0xd0, 0xe4, 0x68, 0x4c, 0xba, 0x8c, 0x04, 0xd2, 0x9c, 0xd9, 0xac, 0x30, - 0xc4, 0xbc, 0x53, 0xf4, 0x57, 0x1d, 0xfe, 0x29, 0x39, 0x2e, 0x9e, 0x5f, 0xa4, 0x41, 0x6b, 0xe0, - 0x8d, 0x5a, 0xf3, 0x7b, 0x82, 0xab, 0x59, 0x3a, 0x4d, 0x6e, 0xb6, 0xa1, 0x77, 0xbb, 0x0d, 0xbd, - 0xdf, 0xdb, 0xd0, 0xfb, 0xb1, 0x0b, 0x1b, 0xb7, 0xbb, 0xb0, 0xf1, 0x73, 0x17, 0x36, 0x3e, 0xcd, - 0xb8, 0xb0, 0xd9, 0xd7, 0x45, 0x94, 0x60, 0x4e, 0x17, 0x89, 0x1a, 0x0b, 0x29, 0x71, 0xed, 0xae, - 0x61, 0xe8, 0x7e, 0x87, 0x71, 0xa9, 0x4c, 0xbf, 0x95, 0xd6, 0x7f, 0x36, 0x89, 0x0f, 0xdd, 0xef, - 0xac, 0xbf, 0x38, 0x76, 0x2e, 0x7f, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xa8, 0x32, 0xde, - 0x7a, 0x03, 0x00, 0x00, + // 511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0xb5, 0x9b, 0x54, 0xb7, 0xd5, 0x58, 0xc4, 0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 0xd7, 0x6d, 0xf7, 0x38, 0x46, 0x9d, 0xa1, + 0xd6, 0xc9, 0x3c, 0xe0, 0x18, 0x66, 0xd4, 0xa4, 0xf9, 0xab, 0x9b, 0xb6, 0x72, 0x7f, 0xe9, 0x70, + 0x8f, 0xc9, 0x41, 0xfe, 0xc6, 0x78, 0xe2, 0x35, 0x7a, 0xce, 0xa0, 0x31, 0xdd, 0xe7, 0x4c, 0x4e, + 0x92, 0x71, 0x7c, 0xbd, 0xf6, 0x9d, 0x9b, 0xb5, 0xef, 0xfc, 0x5e, 0xfb, 0xce, 0x8f, 0x8d, 0x5f, + 0xbb, 0xd9, 0xf8, 0xb5, 0x9f, 0x1b, 0xbf, 0xf6, 0x79, 0xc2, 0xb8, 0x49, 0xbf, 0xcd, 0x82, 0x18, + 0xb3, 0x70, 0x16, 0xcb, 0x21, 0x17, 0x02, 0x97, 0xf6, 0x34, 0x74, 0xb8, 0xed, 0x61, 0x58, 0x24, + 0x87, 0xdf, 0x8b, 0xf9, 0x3a, 0x1d, 0x45, 0xbb, 0x23, 0x66, 0xe7, 0x6b, 0x76, 0x60, 0x47, 0xe9, + 0xf9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x57, 0xeb, 0x10, 0xdf, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -223,6 +232,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AggregationHooks) > 0 { + for iNdEx := len(m.AggregationHooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregationHooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.NoopHooks) > 0 { for iNdEx := len(m.NoopHooks) - 1; iNdEx >= 0; iNdEx-- { { @@ -378,6 +401,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.AggregationHooks) > 0 { + for _, e := range m.AggregationHooks { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -573,6 +602,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationHooks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregationHooks = append(m.AggregationHooks, AggregationHook{}) + if err := m.AggregationHooks[len(m.AggregationHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/core/02_post_dispatch/types/query.pb.go b/x/core/02_post_dispatch/types/query.pb.go index d6681621..41501937 100644 --- a/x/core/02_post_dispatch/types/query.pb.go +++ b/x/core/02_post_dispatch/types/query.pb.go @@ -946,6 +946,194 @@ func (m *QueryNoopHooksResponse) GetPagination() *query.PageResponse { return nil } +// QueryAggregationHookRequest ... +type QueryAggregationHookRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryAggregationHookRequest) Reset() { *m = QueryAggregationHookRequest{} } +func (m *QueryAggregationHookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregationHookRequest) ProtoMessage() {} +func (*QueryAggregationHookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_32e5ceb03adb8f60, []int{18} +} +func (m *QueryAggregationHookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregationHookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregationHookRequest.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 *QueryAggregationHookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregationHookRequest.Merge(m, src) +} +func (m *QueryAggregationHookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregationHookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregationHookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregationHookRequest proto.InternalMessageInfo + +func (m *QueryAggregationHookRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +// QueryAggregationHookResponse ... +type QueryAggregationHookResponse struct { + AggregationHook *AggregationHook `protobuf:"bytes,1,opt,name=aggregation_hook,json=aggregationHook,proto3" json:"aggregation_hook,omitempty"` +} + +func (m *QueryAggregationHookResponse) Reset() { *m = QueryAggregationHookResponse{} } +func (m *QueryAggregationHookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregationHookResponse) ProtoMessage() {} +func (*QueryAggregationHookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_32e5ceb03adb8f60, []int{19} +} +func (m *QueryAggregationHookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregationHookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregationHookResponse.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 *QueryAggregationHookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregationHookResponse.Merge(m, src) +} +func (m *QueryAggregationHookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregationHookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregationHookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregationHookResponse proto.InternalMessageInfo + +func (m *QueryAggregationHookResponse) GetAggregationHook() *AggregationHook { + if m != nil { + return m.AggregationHook + } + return nil +} + +// QueryAggregationHooksRequest ... +type QueryAggregationHooksRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAggregationHooksRequest) Reset() { *m = QueryAggregationHooksRequest{} } +func (m *QueryAggregationHooksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregationHooksRequest) ProtoMessage() {} +func (*QueryAggregationHooksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_32e5ceb03adb8f60, []int{20} +} +func (m *QueryAggregationHooksRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregationHooksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregationHooksRequest.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 *QueryAggregationHooksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregationHooksRequest.Merge(m, src) +} +func (m *QueryAggregationHooksRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregationHooksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregationHooksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregationHooksRequest proto.InternalMessageInfo + +func (m *QueryAggregationHooksRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryAggregationHooksResponse ... +type QueryAggregationHooksResponse struct { + AggregationHooks []AggregationHook `protobuf:"bytes,1,rep,name=aggregation_hooks,json=aggregationHooks,proto3" json:"aggregation_hooks"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAggregationHooksResponse) Reset() { *m = QueryAggregationHooksResponse{} } +func (m *QueryAggregationHooksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregationHooksResponse) ProtoMessage() {} +func (*QueryAggregationHooksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_32e5ceb03adb8f60, []int{21} +} +func (m *QueryAggregationHooksResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregationHooksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregationHooksResponse.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 *QueryAggregationHooksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregationHooksResponse.Merge(m, src) +} +func (m *QueryAggregationHooksResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregationHooksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregationHooksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregationHooksResponse proto.InternalMessageInfo + +func (m *QueryAggregationHooksResponse) GetAggregationHooks() []AggregationHook { + if m != nil { + return m.AggregationHooks + } + return nil +} + +func (m *QueryAggregationHooksResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryIgpsRequest)(nil), "hyperlane.core.post_dispatch.v1.QueryIgpsRequest") proto.RegisterType((*QueryIgpsResponse)(nil), "hyperlane.core.post_dispatch.v1.QueryIgpsResponse") @@ -965,6 +1153,10 @@ func init() { proto.RegisterType((*QueryNoopHookResponse)(nil), "hyperlane.core.post_dispatch.v1.QueryNoopHookResponse") proto.RegisterType((*QueryNoopHooksRequest)(nil), "hyperlane.core.post_dispatch.v1.QueryNoopHooksRequest") proto.RegisterType((*QueryNoopHooksResponse)(nil), "hyperlane.core.post_dispatch.v1.QueryNoopHooksResponse") + proto.RegisterType((*QueryAggregationHookRequest)(nil), "hyperlane.core.post_dispatch.v1.QueryAggregationHookRequest") + proto.RegisterType((*QueryAggregationHookResponse)(nil), "hyperlane.core.post_dispatch.v1.QueryAggregationHookResponse") + proto.RegisterType((*QueryAggregationHooksRequest)(nil), "hyperlane.core.post_dispatch.v1.QueryAggregationHooksRequest") + proto.RegisterType((*QueryAggregationHooksResponse)(nil), "hyperlane.core.post_dispatch.v1.QueryAggregationHooksResponse") } func init() { @@ -972,79 +1164,86 @@ func init() { } var fileDescriptor_32e5ceb03adb8f60 = []byte{ - // 1139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xe4, 0x47, 0x15, 0xbf, 0x84, 0xa4, 0x19, 0x25, 0x34, 0x75, 0x1b, 0x3b, 0x59, 0x41, - 0x1a, 0x4a, 0xbd, 0x5b, 0x07, 0xa5, 0x39, 0x50, 0x38, 0x24, 0x55, 0x83, 0x25, 0x88, 0x5a, 0x53, - 0x81, 0xd4, 0x8b, 0x35, 0xf6, 0x4e, 0xd7, 0xa3, 0x78, 0x77, 0x36, 0x3b, 0xeb, 0xd0, 0xa8, 0xaa, - 0x84, 0xb8, 0x21, 0x2e, 0xfc, 0xb8, 0x23, 0x8e, 0x88, 0x13, 0x07, 0x04, 0xe2, 0x0f, 0x40, 0xea, - 0xb1, 0x12, 0x17, 0x90, 0x50, 0x41, 0x09, 0x12, 0x7f, 0x06, 0x68, 0x67, 0x66, 0xed, 0x5d, 0xc7, - 0x8e, 0x9d, 0xe0, 0x8b, 0xbd, 0x3b, 0x33, 0xef, 0xbd, 0xef, 0xfb, 0x66, 0xde, 0x9b, 0xb7, 0xf0, - 0x7a, 0xf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3, 0xcc, 0x76, - 0x1a, 0xec, 0xb2, 0x04, 0x9b, 0xc5, 0x8b, 0x69, 0xb0, 0xed, 0x72, 0x8b, 0xbf, 0x41, 0x30, 0x19, - 0xdb, 0xe1, 0x8d, 0xb3, 0xc5, 0x89, 0xe1, 0xdd, 0x3a, 0xab, 0x99, 0x46, 0xf7, 0xaa, 0x44, 0x97, - 0xc7, 0x4b, 0xbd, 0xd0, 0x49, 0x0d, 0xb7, 0x6a, 0xcf, 0x8e, 0x72, 0xe8, 0xf9, 0x51, 0x0e, 0xfd, - 0x75, 0x94, 0x43, 0x9f, 0x1f, 0xe7, 0x46, 0x9e, 0x1f, 0xe7, 0x46, 0x7e, 0x3b, 0xce, 0x8d, 0x3c, - 0x2c, 0x25, 0x7a, 0xd1, 0x6a, 0xcd, 0x2f, 0x30, 0xcf, 0xe3, 0x07, 0xea, 0xdb, 0xb7, 0xed, 0xb2, - 0xa0, 0xbb, 0xd4, 0xc7, 0xea, 0xa3, 0xf6, 0xe6, 0x7a, 0x25, 0xfd, 0x5d, 0x2b, 0x5b, 0xd6, 0xea, - 0x05, 0xf9, 0xd5, 0xfa, 0xc6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x40, 0x2e, 0x8d, 0xc5, - 0x0f, 0x00, 0x00, + // 1256 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xe4, 0xa3, 0x8a, 0x5f, 0xd2, 0x7c, 0x8c, 0x12, 0x9a, 0xba, 0x8d, 0x9d, 0xac, 0x20, + 0x0d, 0xa5, 0xf6, 0xc6, 0x41, 0x69, 0x0e, 0xb4, 0x95, 0x48, 0xaa, 0x06, 0x4b, 0x10, 0xb5, 0xa6, + 0x02, 0xa9, 0x1c, 0xac, 0xb1, 0x77, 0xb2, 0x1e, 0xc5, 0xde, 0x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+ 0x2d, 0x97, 0x1b, 0xfe, 0x09, 0xc1, 0x6c, 0xc4, 0x4b, 0xaf, 0x65, 0x17, 0xdf, 0x5a, 0x24, 0x6f, + 0x0f, 0x68, 0xdd, 0x79, 0xff, 0xb6, 0x20, 0x17, 0xda, 0xef, 0x94, 0x9f, 0x9e, 0xa5, 0xd0, 0xb3, + 0xb3, 0x14, 0xfa, 0xeb, 0x2c, 0x85, 0x3e, 0x39, 0x4f, 0x8d, 0x3c, 0x3b, 0x4f, 0x8d, 0xfc, 0x76, + 0x9e, 0x1a, 0x79, 0x94, 0x0f, 0xfc, 0xe0, 0x2b, 0x95, 0xcd, 0x0c, 0x33, 0x0c, 0x7e, 0xec, 0x7d, + 0x60, 0x6a, 0x7a, 0xce, 0xc8, 0x9f, 0x82, 0x8f, 0xbd, 0x2f, 0x47, 0x1b, 0x9b, 0xc5, 0xf0, 0xc7, + 0x23, 0xf1, 0xbb, 0xb0, 0x74, 0x41, 0x7c, 0x1a, 0x7a, 0xf5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xc9, 0x86, 0xbf, 0x55, 0x2a, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1075,6 +1274,10 @@ type QueryClient interface { NoopHooks(ctx context.Context, in *QueryNoopHooksRequest, opts ...grpc.CallOption) (*QueryNoopHooksResponse, error) // NoopHook ... NoopHook(ctx context.Context, in *QueryNoopHookRequest, opts ...grpc.CallOption) (*QueryNoopHookResponse, error) + // AggregationHooks ... + AggregationHooks(ctx context.Context, in *QueryAggregationHooksRequest, opts ...grpc.CallOption) (*QueryAggregationHooksResponse, error) + // AggregationHook ... + AggregationHook(ctx context.Context, in *QueryAggregationHookRequest, opts ...grpc.CallOption) (*QueryAggregationHookResponse, error) } type queryClient struct { @@ -1157,6 +1360,24 @@ func (c *queryClient) NoopHook(ctx context.Context, in *QueryNoopHookRequest, op return out, nil } +func (c *queryClient) AggregationHooks(ctx context.Context, in *QueryAggregationHooksRequest, opts ...grpc.CallOption) (*QueryAggregationHooksResponse, error) { + out := new(QueryAggregationHooksResponse) + err := c.cc.Invoke(ctx, "/hyperlane.core.post_dispatch.v1.Query/AggregationHooks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregationHook(ctx context.Context, in *QueryAggregationHookRequest, opts ...grpc.CallOption) (*QueryAggregationHookResponse, error) { + out := new(QueryAggregationHookResponse) + err := c.cc.Invoke(ctx, "/hyperlane.core.post_dispatch.v1.Query/AggregationHook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Igps ... @@ -1175,6 +1396,10 @@ type QueryServer interface { NoopHooks(context.Context, *QueryNoopHooksRequest) (*QueryNoopHooksResponse, error) // NoopHook ... NoopHook(context.Context, *QueryNoopHookRequest) (*QueryNoopHookResponse, error) + // AggregationHooks ... + AggregationHooks(context.Context, *QueryAggregationHooksRequest) (*QueryAggregationHooksResponse, error) + // AggregationHook ... + AggregationHook(context.Context, *QueryAggregationHookRequest) (*QueryAggregationHookResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1205,6 +1430,12 @@ func (*UnimplementedQueryServer) NoopHooks(ctx context.Context, req *QueryNoopHo func (*UnimplementedQueryServer) NoopHook(ctx context.Context, req *QueryNoopHookRequest) (*QueryNoopHookResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NoopHook not implemented") } +func (*UnimplementedQueryServer) AggregationHooks(ctx context.Context, req *QueryAggregationHooksRequest) (*QueryAggregationHooksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregationHooks not implemented") +} +func (*UnimplementedQueryServer) AggregationHook(ctx context.Context, req *QueryAggregationHookRequest) (*QueryAggregationHookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregationHook not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1354,6 +1585,42 @@ func _Query_NoopHook_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Query_AggregationHooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregationHooksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregationHooks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hyperlane.core.post_dispatch.v1.Query/AggregationHooks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregationHooks(ctx, req.(*QueryAggregationHooksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregationHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregationHookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregationHook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hyperlane.core.post_dispatch.v1.Query/AggregationHook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregationHook(ctx, req.(*QueryAggregationHookRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "hyperlane.core.post_dispatch.v1.Query", @@ -1391,6 +1658,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "NoopHook", Handler: _Query_NoopHook_Handler, }, + { + MethodName: "AggregationHooks", + Handler: _Query_AggregationHooks_Handler, + }, + { + MethodName: "AggregationHook", + Handler: _Query_AggregationHook_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "hyperlane/core/post_dispatch/v1/query.proto", @@ -2111,66 +2386,215 @@ func (m *QueryNoopHooksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryAggregationHookRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryIgpsRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *QueryAggregationHookRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregationHookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryIgpsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryAggregationHookResponse) 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 *QueryAggregationHookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregationHookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Igps) > 0 { - for _, e := range m.Igps { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.AggregationHook != nil { + { + size, err := m.AggregationHook.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *QueryIgpRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryAggregationHooksRequest) 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 n + return dAtA[:n], nil } -func (m *QueryIgpResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAggregationHooksRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregationHooksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregationHooksResponse) 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 *QueryAggregationHooksResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregationHooksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.AggregationHooks) > 0 { + for iNdEx := len(m.AggregationHooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregationHooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryIgpsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIgpsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Igps) > 0 { + for _, e := range m.Igps { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIgpRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIgpResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Igp.Size() @@ -2411,6 +2835,64 @@ func (m *QueryNoopHooksResponse) Size() (n int) { return n } +func (m *QueryAggregationHookRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregationHookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AggregationHook != nil { + l = m.AggregationHook.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregationHooksRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregationHooksResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AggregationHooks) > 0 { + for _, e := range m.AggregationHooks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4318,6 +4800,380 @@ func (m *QueryNoopHooksResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAggregationHookRequest) 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 ErrIntOverflowQuery + } + 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: QueryAggregationHookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregationHookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregationHookResponse) 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 ErrIntOverflowQuery + } + 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: QueryAggregationHookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregationHookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationHook", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AggregationHook == nil { + m.AggregationHook = &AggregationHook{} + } + if err := m.AggregationHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregationHooksRequest) 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 ErrIntOverflowQuery + } + 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: QueryAggregationHooksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregationHooksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregationHooksResponse) 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 ErrIntOverflowQuery + } + 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: QueryAggregationHooksResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregationHooksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationHooks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregationHooks = append(m.AggregationHooks, AggregationHook{}) + if err := m.AggregationHooks[len(m.AggregationHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/core/02_post_dispatch/types/query.pb.gw.go b/x/core/02_post_dispatch/types/query.pb.gw.go index 275303c8..5224ee9d 100644 --- a/x/core/02_post_dispatch/types/query.pb.gw.go +++ b/x/core/02_post_dispatch/types/query.pb.gw.go @@ -447,6 +447,96 @@ func local_request_Query_NoopHook_0(ctx context.Context, marshaler runtime.Marsh } +var ( + filter_Query_AggregationHooks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AggregationHooks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregationHooksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AggregationHooks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AggregationHooks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregationHooks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregationHooksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AggregationHooks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AggregationHooks(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AggregationHook_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregationHookRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.AggregationHook(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregationHook_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregationHookRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.AggregationHook(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -637,6 +727,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AggregationHooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregationHooks_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregationHooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregationHook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregationHook_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregationHook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -838,6 +974,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AggregationHooks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregationHooks_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregationHooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregationHook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregationHook_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregationHook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -857,6 +1033,10 @@ var ( pattern_Query_NoopHooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"hyperlane", "v1", "noop_hooks"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_NoopHook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"hyperlane", "v1", "noop_hooks", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregationHooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"hyperlane", "v1", "aggregation_hooks"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregationHook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"hyperlane", "v1", "aggregation_hooks", "id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -875,4 +1055,8 @@ var ( forward_Query_NoopHooks_0 = runtime.ForwardResponseMessage forward_Query_NoopHook_0 = runtime.ForwardResponseMessage + + forward_Query_AggregationHooks_0 = runtime.ForwardResponseMessage + + forward_Query_AggregationHook_0 = runtime.ForwardResponseMessage ) diff --git a/x/core/02_post_dispatch/types/tx.pb.go b/x/core/02_post_dispatch/types/tx.pb.go index 6c7b2a21..8e36f02d 100644 --- a/x/core/02_post_dispatch/types/tx.pb.go +++ b/x/core/02_post_dispatch/types/tx.pb.go @@ -685,6 +685,92 @@ func (m *MsgCreateNoopHookResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateNoopHookResponse proto.InternalMessageInfo +// MsgCreateAggregationHook ... +type MsgCreateAggregationHook struct { + // owner ... + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // hooks ... + Hooks []github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,2,rep,name=hooks,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"hooks"` +} + +func (m *MsgCreateAggregationHook) Reset() { *m = MsgCreateAggregationHook{} } +func (m *MsgCreateAggregationHook) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAggregationHook) ProtoMessage() {} +func (*MsgCreateAggregationHook) Descriptor() ([]byte, []int) { + return fileDescriptor_f936e5a203ea8b1d, []int{14} +} +func (m *MsgCreateAggregationHook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAggregationHook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAggregationHook.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 *MsgCreateAggregationHook) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAggregationHook.Merge(m, src) +} +func (m *MsgCreateAggregationHook) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAggregationHook) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAggregationHook.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateAggregationHook proto.InternalMessageInfo + +func (m *MsgCreateAggregationHook) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// MsgCreateAggregationHookResponse ... +type MsgCreateAggregationHookResponse struct { + Id github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,1,opt,name=id,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"id"` +} + +func (m *MsgCreateAggregationHookResponse) Reset() { *m = MsgCreateAggregationHookResponse{} } +func (m *MsgCreateAggregationHookResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAggregationHookResponse) ProtoMessage() {} +func (*MsgCreateAggregationHookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f936e5a203ea8b1d, []int{15} +} +func (m *MsgCreateAggregationHookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAggregationHookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAggregationHookResponse.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 *MsgCreateAggregationHookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAggregationHookResponse.Merge(m, src) +} +func (m *MsgCreateAggregationHookResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAggregationHookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAggregationHookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateAggregationHookResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreateIgp)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateIgp") proto.RegisterType((*MsgCreateIgpResponse)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateIgpResponse") @@ -700,6 +786,8 @@ func init() { proto.RegisterType((*MsgCreateMerkleTreeHookResponse)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateMerkleTreeHookResponse") proto.RegisterType((*MsgCreateNoopHook)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateNoopHook") proto.RegisterType((*MsgCreateNoopHookResponse)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateNoopHookResponse") + proto.RegisterType((*MsgCreateAggregationHook)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateAggregationHook") + proto.RegisterType((*MsgCreateAggregationHookResponse)(nil), "hyperlane.core.post_dispatch.v1.MsgCreateAggregationHookResponse") } func init() { @@ -707,68 +795,72 @@ func init() { } var fileDescriptor_f936e5a203ea8b1d = []byte{ - // 965 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x3a, 0xd8, 0xc4, 0xaf, 0x50, 0x91, 0x95, 0x9b, 0x38, 0x5b, 0xe1, 0x54, 0xab, 0x22, - 0xd2, 0x20, 0xef, 0xd6, 0xa9, 0x0a, 0x68, 0xcb, 0x01, 0xe2, 0x8a, 0xd6, 0x12, 0xa1, 0x68, 0xc3, - 0xa9, 0x17, 0x6b, 0xbc, 0x3b, 0x8c, 0x47, 0xf6, 0xce, 0x6c, 0x77,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ped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0xd8, 0xb2, 0x5f, 0xa1, 0x22, 0x2b, 0x27, 0x71, 0xb6, 0xc2, 0x89, 0x56, 0xad, + 0x48, 0x83, 0xbc, 0x5b, 0xa7, 0x94, 0x8f, 0x2d, 0x07, 0x12, 0x57, 0xb4, 0x96, 0x08, 0x45, 0x0e, + 0x17, 0x7a, 0xb1, 0xc6, 0xbb, 0xc3, 0x78, 0x64, 0xef, 0xcc, 0x76, 0x67, 0x63, 0x27, 0x17, 0x54, + 0x71, 0xe4, 0x84, 0x10, 0x9c, 0xb8, 0x70, 0xe4, 0x98, 0x03, 0x77, 0xae, 0xbd, 0x20, 0x55, 0x88, + 0x03, 0x02, 0xa9, 0x42, 0xc9, 0x21, 0xff, 0x06, 0xda, 0x0f, 0x6f, 0xbc, 0xce, 0x46, 0x59, 0x87, + 0x44, 0xea, 0xc5, 0xf2, 0xcc, 0xfb, 0x98, 0xdf, 0xef, 0xf7, 0x66, 0xdf, 0xcc, 0xc0, 0x5a, 0x6f, + 0xdf, 0xc1, 0xee, 0x00, 0x31, 0xac, 0x9b, 0xdc, 0xc5, 0xba, 0xc3, 0x85, 0xd7, 0xb1, 0xa8, 0x70, + 0x90, 0x67, 0xf6, 0xf4, 0x61, 0x43, 0xf7, 0xf6, 0x34, 0xc7, 0xe5, 0x1e, 0x97, 0x57, 0x62, 0x4f, + 0xcd, 0xf7, 0xd4, 0x12, 0x9e, 0xda, 0xb0, 0xa1, 0x2c, 0x99, 0x5c, 0xd8, 0x5c, 0xe8, 0xb6, 0x20, + 0x7e, 0xa0, 0x2d, 0x48, 0x18, 0xa9, 0xcc, 0x23, 0x9b, 0x32, 0xae, 0x07, 0xbf, 0xd1, 0xd4, 0x72, + 0xe8, 0xdb, 0x09, 0x46, 0x7a, 0x38, 0x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xe6, 0x7b, + 0x09, 0x2a, 0xa9, 0x47, 0xc0, 0x07, 0xd9, 0x37, 0x50, 0x32, 0x52, 0xf9, 0xf8, 0xa2, 0x91, 0x31, + 0xa8, 0x67, 0x12, 0x5c, 0x9f, 0xea, 0x9d, 0x1b, 0xd9, 0x93, 0x8e, 0x63, 0x14, 0x63, 0xf6, 0x98, + 0x18, 0xc2, 0x8f, 0x12, 0x2c, 0xa4, 0xf7, 0xb5, 0x0f, 0xb3, 0x67, 0x9d, 0x0a, 0x55, 0x36, 0x2f, + 0x1c, 0x3a, 0xc6, 0xa5, 0x14, 0x9e, 0xf9, 0xb7, 0x9b, 0x2d, 0xf3, 0xf9, 0x61, 0x4d, 0x7a, 0x71, + 0x58, 0x93, 0xfe, 0x3d, 0xac, 0x49, 0xdf, 0x1d, 0xd5, 0xe6, 0x5e, 0x1c, 0xd5, 0xe6, 0xfe, 0x3a, + 0xaa, 0xcd, 0x3d, 0x69, 0xcd, 0xd2, 0x7d, 0xf6, 0xc2, 0x07, 0xea, 0x9d, 0x8d, 0x4e, 0xf2, 0x8d, + 0x1a, 0x3c, 0x50, 0xbb, 0xc5, 0xe0, 0x05, 0x7a, 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, + 0x1e, 0x5d, 0xeb, 0x78, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -797,6 +889,8 @@ type MsgClient interface { CreateMerkleTreeHook(ctx context.Context, in *MsgCreateMerkleTreeHook, opts ...grpc.CallOption) (*MsgCreateMerkleTreeHookResponse, error) // CreateNoopHook ... CreateNoopHook(ctx context.Context, in *MsgCreateNoopHook, opts ...grpc.CallOption) (*MsgCreateNoopHookResponse, error) + // CreateAggregationHook ... + CreateAggregationHook(ctx context.Context, in *MsgCreateAggregationHook, opts ...grpc.CallOption) (*MsgCreateAggregationHookResponse, error) } type msgClient struct { @@ -870,6 +964,15 @@ func (c *msgClient) CreateNoopHook(ctx context.Context, in *MsgCreateNoopHook, o return out, nil } +func (c *msgClient) CreateAggregationHook(ctx context.Context, in *MsgCreateAggregationHook, opts ...grpc.CallOption) (*MsgCreateAggregationHookResponse, error) { + out := new(MsgCreateAggregationHookResponse) + err := c.cc.Invoke(ctx, "/hyperlane.core.post_dispatch.v1.Msg/CreateAggregationHook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CreateIgp ... @@ -886,6 +989,8 @@ type MsgServer interface { CreateMerkleTreeHook(context.Context, *MsgCreateMerkleTreeHook) (*MsgCreateMerkleTreeHookResponse, error) // CreateNoopHook ... CreateNoopHook(context.Context, *MsgCreateNoopHook) (*MsgCreateNoopHookResponse, error) + // CreateAggregationHook ... + CreateAggregationHook(context.Context, *MsgCreateAggregationHook) (*MsgCreateAggregationHookResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -913,6 +1018,9 @@ func (*UnimplementedMsgServer) CreateMerkleTreeHook(ctx context.Context, req *Ms func (*UnimplementedMsgServer) CreateNoopHook(ctx context.Context, req *MsgCreateNoopHook) (*MsgCreateNoopHookResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateNoopHook not implemented") } +func (*UnimplementedMsgServer) CreateAggregationHook(ctx context.Context, req *MsgCreateAggregationHook) (*MsgCreateAggregationHookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAggregationHook not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1044,6 +1152,24 @@ func _Msg_CreateNoopHook_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_CreateAggregationHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateAggregationHook) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateAggregationHook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hyperlane.core.post_dispatch.v1.Msg/CreateAggregationHook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateAggregationHook(ctx, req.(*MsgCreateAggregationHook)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "hyperlane.core.post_dispatch.v1.Msg", @@ -1077,6 +1203,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateNoopHook", Handler: _Msg_CreateNoopHook_Handler, }, + { + MethodName: "CreateAggregationHook", + Handler: _Msg_CreateAggregationHook_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "hyperlane/core/post_dispatch/v1/tx.proto", @@ -1604,6 +1734,83 @@ func (m *MsgCreateNoopHookResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *MsgCreateAggregationHook) 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 *MsgCreateAggregationHook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAggregationHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hooks) > 0 { + for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Hooks[iNdEx].Size() + i -= size + if _, err := m.Hooks[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateAggregationHookResponse) 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 *MsgCreateAggregationHookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAggregationHookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Id.Size() + i -= size + if _, err := m.Id.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1809,6 +2016,36 @@ func (m *MsgCreateNoopHookResponse) Size() (n int) { return n } +func (m *MsgCreateAggregationHook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Hooks) > 0 { + for _, e := range m.Hooks { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCreateAggregationHookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3251,6 +3488,208 @@ func (m *MsgCreateNoopHookResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateAggregationHook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateAggregationHook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAggregationHook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hooks", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress + m.Hooks = append(m.Hooks, v) + if err := m.Hooks[len(m.Hooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateAggregationHookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateAggregationHookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAggregationHookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/core/02_post_dispatch/types/types.go b/x/core/02_post_dispatch/types/types.go index 68aa4cde..70fc5c69 100644 --- a/x/core/02_post_dispatch/types/types.go +++ b/x/core/02_post_dispatch/types/types.go @@ -9,6 +9,7 @@ var ( InterchainGasPaymasterConfigsKey = []byte{SubModuleId, 3} MerkleTreeHooksKey = []byte{SubModuleId, 4} NoopHooksKey = []byte{SubModuleId, 5} + AggregationHooksKey = []byte{SubModuleId, 6} ) const ( diff --git a/x/core/02_post_dispatch/types/types.pb.go b/x/core/02_post_dispatch/types/types.pb.go index f9c4452b..232ad53c 100644 --- a/x/core/02_post_dispatch/types/types.pb.go +++ b/x/core/02_post_dispatch/types/types.pb.go @@ -354,6 +354,56 @@ func (m *NoopHook) GetOwner() string { return "" } +// AggregationHook ... +type AggregationHook struct { + // id ... + Id github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,1,opt,name=id,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"id"` + // owner ... + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + // hooks ... + Hooks []github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress `protobuf:"bytes,3,rep,name=hooks,proto3,customtype=github.com/bcp-innovations/hyperlane-cosmos/util.HexAddress" json:"hooks"` +} + +func (m *AggregationHook) Reset() { *m = AggregationHook{} } +func (m *AggregationHook) String() string { return proto.CompactTextString(m) } +func (*AggregationHook) ProtoMessage() {} +func (*AggregationHook) Descriptor() ([]byte, []int) { + return fileDescriptor_d8f5bab7d9705187, []int{6} +} +func (m *AggregationHook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregationHook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregationHook.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 *AggregationHook) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregationHook.Merge(m, src) +} +func (m *AggregationHook) XXX_Size() int { + return m.Size() +} +func (m *AggregationHook) XXX_DiscardUnknown() { + xxx_messageInfo_AggregationHook.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregationHook proto.InternalMessageInfo + +func (m *AggregationHook) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + func init() { proto.RegisterType((*InterchainGasPaymaster)(nil), "hyperlane.core.post_dispatch.v1.InterchainGasPaymaster") proto.RegisterType((*DestinationGasConfig)(nil), "hyperlane.core.post_dispatch.v1.DestinationGasConfig") @@ -361,6 +411,7 @@ func init() { proto.RegisterType((*MerkleTreeHook)(nil), "hyperlane.core.post_dispatch.v1.MerkleTreeHook") proto.RegisterType((*Tree)(nil), "hyperlane.core.post_dispatch.v1.Tree") proto.RegisterType((*NoopHook)(nil), "hyperlane.core.post_dispatch.v1.NoopHook") + proto.RegisterType((*AggregationHook)(nil), "hyperlane.core.post_dispatch.v1.AggregationHook") } func init() { @@ -368,50 +419,52 @@ func init() { } var fileDescriptor_d8f5bab7d9705187 = []byte{ - // 677 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xc1, 0x6e, 0xd3, 0x4a, - 0x14, 0x8d, 0x93, 0xb4, 0x6a, 0xa6, 0x4d, 0xa5, 0xfa, 0xe5, 0x55, 0x69, 0xa5, 0x97, 0x54, 0x79, - 0x42, 0x8a, 0x8a, 0x62, 0x93, 0x02, 0x0b, 0x60, 0x03, 0x69, 0xa1, 0xcd, 0xa2, 0x50, 0xb9, 0xac, - 0xd8, 0x58, 0xe3, 0xf1, 0xad, 0x3d, 0x4a, 0x3c, 0x63, 0xcd, 0x4c, 0xd3, 0xf4, 0x2b, 0x60, 0xc5, - 0x37, 0x20, 0xc4, 0x82, 0x45, 0x3f, 0xa2, 0xcb, 0x8a, 0x15, 0x62, 0x51, 0x50, 0xbb, 0xe0, 0x37, - 0x90, 0xc7, 0x43, 0xd4, 0xae, 0x42, 0x25, 0xba, 0x49, 0x7c, 0xaf, 0xcf, 0x39, 0xbe, 0xe7, 0xde, - 0x3b, 0x83, 0xee, 0xc6, 0xc7, 0x29, 0x88, 0x21, 0x66, 0xe0, 0x12, 0x2e, 0xc0, 0x4d, 0xb9, 0x54, - 0x7e, 0x48, 0x65, 0x8a, 0x15, 0x89, 0xdd, 0x51, 0xd7, 0x55, 0xc7, 0x29, 0x48, 0x27, 0x15, 0x5c, - 0x71, 0xbb, 0x39, 0x01, 0x3b, 0x19, 0xd8, 0xb9, 0x06, 0x76, 0x46, 0xdd, 0xd5, 0x25, 0x9c, 0x50, - 0xc6, 0x5d, 0xfd, 0x9b, 0x73, 0x56, 0x57, 0x08, 0x97, 0x09, 0x97, 0xbe, 0x8e, 0xdc, 0x3c, 0x30, - 0xaf, 0x6a, 0x11, 0x8f, 0x78, 0x9e, 0xcf, 0x9e, 0x4c, 0xb6, 0x91, 0x63, 0xdc, 0x00, 0x4b, 0x70, - 0x47, 0xdd, 0x00, 0x14, 0xee, 0xba, 0x84, 0x53, 0x96, 0xbf, 0x6f, 0x7d, 0x2a, 0xa2, 0xe5, 0x3e, - 0x53, 0x20, 0x48, 0x8c, 0x29, 0xdb, 0xc6, 0x72, 0x0f, 0x1f, 0x27, 0x58, 0x2a, 0x10, 0xf6, 0x3e, - 0x2a, 0xd2, 0xb0, 0x6e, 0xad, 0x59, 0xed, 0x4a, 0x6f, 0xf3, 0xf4, 0xbc, 0x59, 0xf8, 0x76, 0xde, - 0x7c, 0x12, 0x51, 0x15, 0x1f, 0x06, 0x0e, 0xe1, 0x89, 0x1b, 0x90, 0xb4, 0x43, 0x19, 0xe3, 0x23, - 0xac, 0x28, 0x67, 0xd2, 0x9d, 0xd8, 0xe9, 0x98, 0x6f, 0x1e, 0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x3c, 0xf1, 0x3d, 0x72, 0x7a, 0xd1, 0xb0, 0xce, - 0x2e, 0x1a, 0xd6, 0x8f, 0x8b, 0x86, 0xf5, 0xee, 0xb2, 0x51, 0x38, 0xbb, 0x6c, 0x14, 0xbe, 0x5e, - 0x36, 0x0a, 0x6f, 0xfa, 0x37, 0x29, 0x65, 0x9c, 0xdf, 0xc0, 0xf7, 0x36, 0xfc, 0xeb, 0x97, 0xb0, - 0x3e, 0xe1, 0xc1, 0xac, 0xbe, 0xfd, 0xee, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x90, 0x4e, 0xea, - 0x41, 0xb1, 0x05, 0x00, 0x00, + // 712 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x4f, 0xdb, 0x48, + 0x14, 0x8e, 0x93, 0x80, 0xc8, 0x40, 0x58, 0xe1, 0xcd, 0x22, 0x83, 0xb4, 0x49, 0x94, 0xd5, 0x4a, + 0x11, 0xab, 0xd8, 0x1b, 0x76, 0xf7, 0xb0, 0xed, 0xa5, 0x04, 0x5a, 0xc8, 0x81, 0x16, 0x99, 0x5e, + 0xda, 0x8b, 0x35, 0xb6, 0x1f, 0xf6, 0x28, 0xf1, 0x8c, 0x35, 0x33, 0x84, 0xf0, 0x2b, 0xda, 0x53, + 0x7f, 0x43, 0x55, 0xf5, 0xd0, 0x03, 0x3f, 0x82, 0x23, 0xea, 0xa9, 0xea, 0x81, 0x56, 0x70, 0xe8, + 0xb9, 0xff, 0xa0, 0xf2, 0x78, 0x1a, 0xc1, 0x29, 0x45, 0x02, 0xa9, 0x97, 0xc4, 0xef, 0xf9, 0xfb, + 0xbe, 0x79, 0xdf, 0x7b, 0xcf, 0x36, 0xfa, 0x2b, 0x3e, 0x4e, 0x81, 0x0f, 0x31, 0x05, 0x27, 0x60, + 0x1c, 0x9c, 0x94, 0x09, 0xe9, 0x85, 0x44, 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 0x9c, 0x5d, 0xd6, 0x0b, + 0x1f, 0x2e, 0xeb, 0x85, 0xe7, 0xfd, 0x9b, 0xa8, 0x8f, 0xf3, 0xaf, 0xce, 0xdf, 0xeb, 0xde, 0xf5, + 0x0f, 0x8f, 0x7a, 0xab, 0xf9, 0xb3, 0xea, 0x8d, 0xff, 0xcf, 0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x28, 0xa0, 0xe0, 0x45, 0xa5, 0x06, 0x00, 0x00, } func (m *InterchainGasPaymaster) Marshal() (dAtA []byte, err error) { @@ -707,6 +760,60 @@ func (m *NoopHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AggregationHook) 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 *AggregationHook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregationHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hooks) > 0 { + for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Hooks[iNdEx].Size() + i -= size + if _, err := m.Hooks[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + { + size := m.Id.Size() + i -= size + if _, err := m.Id.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -828,6 +935,27 @@ func (m *NoopHook) Size() (n int) { return n } +func (m *AggregationHook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Hooks) > 0 { + for _, e := range m.Hooks { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1676,6 +1804,158 @@ func (m *NoopHook) Unmarshal(dAtA []byte) error { } return nil } +func (m *AggregationHook) 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 ErrIntOverflowTypes + } + 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: AggregationHook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggregationHook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hooks", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_bcp_innovations_hyperlane_cosmos_util.HexAddress + m.Hooks = append(m.Hooks, v) + if err := m.Hooks[len(m.Hooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0