diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..d6ef2c2 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,38 @@ +coverage: + precision: 2 + round: down + range: 70...100 + + status: + project: + default: + threshold: 1% # allow this much decrease on project + changes: false + +comment: + layout: "reach, diff, files" + behavior: default # update if exists else create new + +ignore: + - "*.md" + - "*.rst" + - "api/" + - "cmd/" + - "contrib/" + - "docs/" + - "networks/" + - "proto/" + - "scripts/" + - "thrid_party/" + - "docker/" + - "client/" + - "custom/" + - "**/cli" + - "**/rest" + - "**/*.pulsar.go" + - "**/*.pb.go" + - "**/*.pb.gw.go" + - "**/test_utils.go" + - "**/module.go" + - "x/ibc/testing" + - "testing/" diff --git a/.gitignore b/.gitignore index 198429d..5bd016b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ build/ # Dependency directories vendor/ + +test_key/ \ No newline at end of file diff --git a/Makefile b/Makefile index 9010ada..1901870 100644 --- a/Makefile +++ b/Makefile @@ -106,3 +106,30 @@ benchmark: @go test -timeout 20m -mod=readonly -bench=. ./... .PHONY: test test-all test-cover test-unit test-race benchmark + +############################################################################### +### Protobuf ### +############################################################################### +DOCKER := $(shell which docker) + +protoVer=0.14.0 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) + +proto-all: proto-format proto-lint proto-gen + +proto-gen: + @echo "Generating Protobuf files" + @$(protoImage) sh ./scripts/protocgen.sh + +proto-format: + @$(protoImage) find ./proto -name "*.proto" -exec clang-format -i {} \; + +proto-lint: + @$(protoImage) buf lint --error-format=json ./proto + +proto-check-breaking: + @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main + +.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking + diff --git a/bot/bot.go b/bot/bot.go index 7cd0978..c160cd8 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -10,14 +10,6 @@ import ( "go.uber.org/zap" - "github.com/cosmos/cosmos-sdk/std" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth" - - "github.com/initia-labs/OPinit/x/opchild" - "github.com/initia-labs/OPinit/x/ophost" - initiaapp "github.com/initia-labs/initia/app" - "github.com/initia-labs/initia/app/params" bottypes "github.com/initia-labs/opinit-bots-go/bot/types" "github.com/initia-labs/opinit-bots-go/db" "github.com/initia-labs/opinit-bots-go/executor" @@ -44,22 +36,6 @@ func LoadJsonConfig(path string, config bottypes.Config) error { } func NewBot(name bottypes.BotType, logger *zap.Logger, homePath string, configName string) (bottypes.Bot, error) { - SetSDKConfig() - - encodingConfig := params.MakeEncodingConfig() - appCodec := encodingConfig.Codec - txConfig := encodingConfig.TxConfig - - std.RegisterInterfaces(encodingConfig.InterfaceRegistry) - std.RegisterLegacyAminoCodec(encodingConfig.Amino) - auth.AppModuleBasic{}.RegisterInterfaces(encodingConfig.InterfaceRegistry) - ophost.AppModuleBasic{}.RegisterInterfaces(encodingConfig.InterfaceRegistry) - opchild.AppModuleBasic{}.RegisterInterfaces(encodingConfig.InterfaceRegistry) - - auth.AppModuleBasic{}.RegisterLegacyAminoCodec(encodingConfig.Amino) - ophost.AppModuleBasic{}.RegisterLegacyAminoCodec(encodingConfig.Amino) - opchild.AppModuleBasic{}.RegisterLegacyAminoCodec(encodingConfig.Amino) - switch name { case bottypes.BotTypeExecutor: cfg := &executortypes.Config{} @@ -74,29 +50,12 @@ func NewBot(name bottypes.BotType, logger *zap.Logger, homePath string, configNa return nil, err } server := server.NewServer() - return executor.NewExecutor(cfg, db, server, logger, appCodec, txConfig, homePath), nil + return executor.NewExecutor(cfg, db, server, logger.Named("executor"), homePath), nil } return nil, errors.New("not providing bot name") } -func SetSDKConfig() { - sdkConfig := sdk.GetConfig() - sdkConfig.SetCoinType(initiaapp.CoinType) - - accountPubKeyPrefix := initiaapp.AccountAddressPrefix + "pub" - validatorAddressPrefix := initiaapp.AccountAddressPrefix + "valoper" - validatorPubKeyPrefix := initiaapp.AccountAddressPrefix + "valoperpub" - consNodeAddressPrefix := initiaapp.AccountAddressPrefix + "valcons" - consNodePubKeyPrefix := initiaapp.AccountAddressPrefix + "valconspub" - - sdkConfig.SetBech32PrefixForAccount(initiaapp.AccountAddressPrefix, accountPubKeyPrefix) - sdkConfig.SetBech32PrefixForValidator(validatorAddressPrefix, validatorPubKeyPrefix) - sdkConfig.SetBech32PrefixForConsensusNode(consNodeAddressPrefix, consNodePubKeyPrefix) - sdkConfig.SetAddressVerifier(initiaapp.VerifyAddressLen()) - sdkConfig.Seal() -} - func getDBPath(homePath string, botName bottypes.BotType) string { return fmt.Sprintf(homePath+"/%s.db", botName) } diff --git a/bot/types/bot.go b/bot/types/bot.go index 5111fa2..1b1e7f3 100644 --- a/bot/types/bot.go +++ b/bot/types/bot.go @@ -6,4 +6,5 @@ import ( type Bot interface { Start(context.Context) error + Close() } diff --git a/cmd/opinitd/key.go b/cmd/opinitd/key.go new file mode 100644 index 0000000..9312e06 --- /dev/null +++ b/cmd/opinitd/key.go @@ -0,0 +1,371 @@ +/* +Package cmd includes relayer commands +Copyright © 2020 Jack Zampolin jack.zampolin@gmail.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package main + +import ( + "bufio" + "fmt" + "io" + "os" + "strings" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client/input" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/hd" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/initia-labs/opinit-bots-go/keys" +) + +const ( + flagRecover = "recover" + flagMnemonicSrc = "source" + flagBech32Prefix = "bech32" +) + +// keysCmd represents the keys command +func keysCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "keys", + Aliases: []string{"k"}, + Short: "Manage keys held by the opbot", + } + + cmd.AddCommand( + keysAddCmd(ctx), + keysListCmd(ctx), + keysShowCmd(ctx), + keysShowByAddressCmd(ctx), + keysDeleteCmd(ctx), + ) + + return cmd +} + +// keysAddCmd represents the `keys add` command +func keysAddCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "add [chain-id] [key-name]", + Aliases: []string{"a"}, + Short: "Adds a key to the keychain associated with a particular chain", + Args: cobra.ExactArgs(2), + Example: strings.TrimSpace(` +$ keys add localnet key1 +$ keys add l2 key2 --bech32 celestia +$ keys add l2 key2 --restore mnemonic.txt`), + RunE: func(cmd *cobra.Command, args []string) error { + chainId := args[0] + keyName := args[1] + + prefix, err := cmd.Flags().GetString(flagBech32Prefix) + if err != nil { + return err + } + + cdc, err := getCodec(prefix) + if err != nil { + return err + } + keyBase, err := keys.GetKeyBase(chainId, ctx.homePath, cdc, cmd.InOrStdin()) + if err != nil { + return err + } + + account, err := keyBase.Key(keyName) + if err == nil && account.Name == keyName { + return fmt.Errorf("key with name %s already exists", keyName) + } + + mnemonic := "" + recoverFlag, _ := cmd.Flags().GetBool(flagRecover) + mnemonicSrc, _ := cmd.Flags().GetString(flagMnemonicSrc) + + if recoverFlag { + if mnemonicSrc != "" { + file, err := os.Open(mnemonicSrc) + if err != nil { + return err + } + bz, err := io.ReadAll(file) + file.Close() + if err != nil { + return err + } + mnemonic = strings.TrimSpace(string(bz)) + } else { + buf := bufio.NewReader(cmd.InOrStdin()) + mnemonic, err = input.GetString("Enter your bip39 mnemonic", buf) + if err != nil { + return err + } + } + } else { + mnemonic, err = keys.CreateMnemonic() + if err != nil { + return err + } + } + + account, err = keyBase.NewAccount(keyName, mnemonic, "", hd.CreateHDPath(sdk.CoinType, 0, 0).String(), hd.Secp256k1) + if err != nil { + return err + } + + addr, err := account.GetAddress() + if err != nil { + return err + } + + addrString, err := keys.EncodeBech32AccAddr(addr, prefix) + if err != nil { + return err + } + + fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n%s\n", account.Name, addrString, mnemonic) + return nil + }, + } + cmd.Flags().Bool(flagRecover, false, "Provide seed phrase to recover existing key instead of creating") + cmd.Flags().String(flagMnemonicSrc, "", "Import mnemonic from a file") + cmd.Flags().String(flagBech32Prefix, "init", "Bech32 prefix") + return cmd +} + +// keysListCmd represents the `keys list` command +func keysListCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "list [chain-id]", + Aliases: []string{"l"}, + Short: "Lists keys from the keychain associated with a particular chain", + Args: cobra.ExactArgs(1), + Example: strings.TrimSpace(` +$ keys list localnet --bech32 celestia +$ k l l2`), + RunE: func(cmd *cobra.Command, args []string) error { + chainId := args[0] + + prefix, err := cmd.Flags().GetString(flagBech32Prefix) + if err != nil { + return err + } + + cdc, err := getCodec(prefix) + if err != nil { + return err + } + keyBase, err := keys.GetKeyBase(chainId, ctx.homePath, cdc, cmd.InOrStdin()) + if err != nil { + return err + } + + info, err := keyBase.List() + if err != nil { + return err + } + + if len(info) == 0 { + fmt.Fprintf(cmd.ErrOrStderr(), "no keys found for %s\n", chainId) + } + + for _, account := range info { + addr, err := account.GetAddress() + if err != nil { + return err + } + + addrString, err := keys.EncodeBech32AccAddr(addr, prefix) + if err != nil { + return err + } + + fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", account.Name, addrString) + } + + return nil + }, + } + + cmd.Flags().String(flagBech32Prefix, "init", "Bech32 prefix") + + return cmd +} + +// keysShowCmd represents the `keys show` command +func keysShowCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "show [chain-id] [key-name]", + Aliases: []string{"s"}, + Short: "Shows the key from the keychain associated with a particular chain", + Args: cobra.ExactArgs(2), + Example: strings.TrimSpace(` +$ keys show localnet key1 --bech32 celestia +$ k s l2 key2`), + RunE: func(cmd *cobra.Command, args []string) error { + chainId := args[0] + keyName := args[1] + + prefix, err := cmd.Flags().GetString(flagBech32Prefix) + if err != nil { + return err + } + + cdc, err := getCodec(prefix) + if err != nil { + return err + } + keyBase, err := keys.GetKeyBase(chainId, ctx.homePath, cdc, cmd.InOrStdin()) + if err != nil { + return err + } + + account, err := keyBase.Key(keyName) + if err == nil && account.Name == keyName { + addr, err := account.GetAddress() + if err != nil { + return err + } + + addrString, err := keys.EncodeBech32AccAddr(addr, prefix) + if err != nil { + return err + } + fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", account.Name, addrString) + return nil + } + return fmt.Errorf("key with name %s does not exist", keyName) + }, + } + + cmd.Flags().String(flagBech32Prefix, "init", "Bech32 prefix") + + return cmd +} + +// keysShowByAddressCmd represents the `keys show-by-address` command +func keysShowByAddressCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "show-by-addr [chain-id] [key-address]", + Aliases: []string{"sa"}, + Short: "Shows the key by address from the keychain associated with a particular chain", + Args: cobra.ExactArgs(2), + Example: strings.TrimSpace(` +$ keys show-by-addr localnet key1 --bech32 celestia +$ k sa l2 key2`), + RunE: func(cmd *cobra.Command, args []string) error { + chainId := args[0] + keyAddr := args[1] + + prefix, err := cmd.Flags().GetString(flagBech32Prefix) + if err != nil { + return err + } + + cdc, err := getCodec(prefix) + if err != nil { + return err + } + keyBase, err := keys.GetKeyBase(chainId, ctx.homePath, cdc, cmd.InOrStdin()) + if err != nil { + return err + } + + addr, err := keys.DecodeBech32AccAddr(keyAddr, prefix) + if err != nil { + return err + } + + account, err := keyBase.KeyByAddress(addr) + if err != nil { + return fmt.Errorf("key with address %s does not exist", keyAddr) + } + + fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", account.Name, keyAddr) + return nil + }, + } + + cmd.Flags().String(flagBech32Prefix, "init", "Bech32 prefix") + + return cmd +} + +// keysDeleteCmd represents the `keys delete` command +func keysDeleteCmd(ctx *cmdContext) *cobra.Command { + cmd := &cobra.Command{ + Use: "delete [chain-id] [key-name]", + Aliases: []string{"d"}, + Short: "Deletes the key from the keychain associated with a particular chain", + Args: cobra.ExactArgs(2), + Example: strings.TrimSpace(` +$ keys delete localnet key1 --bech32 celestia +$ k d l2 key2`), + RunE: func(cmd *cobra.Command, args []string) error { + chainId := args[0] + keyName := args[1] + + prefix, err := cmd.Flags().GetString(flagBech32Prefix) + if err != nil { + return err + } + + cdc, err := getCodec(prefix) + if err != nil { + return err + } + keyBase, err := keys.GetKeyBase(chainId, ctx.homePath, cdc, cmd.InOrStdin()) + if err != nil { + return err + } + + account, err := keyBase.Key(keyName) + if err == nil && account.Name == keyName { + addr, err := account.GetAddress() + if err != nil { + return err + } + + addrString, err := keys.EncodeBech32AccAddr(addr, prefix) + if err != nil { + return err + } + + err = keyBase.Delete(keyName) + if err != nil { + return err + } + + fmt.Fprintf(cmd.OutOrStdout(), "%s: %s deleted\n", account.Name, addrString) + return nil + } + return fmt.Errorf("key with name %s does not exist", keyName) + }, + } + + cmd.Flags().String(flagBech32Prefix, "init", "Bech32 prefix") + + return cmd +} + +func getCodec(bech32Prefix string) (codec.Codec, error) { + unlock := keys.SetSDKConfigContext(bech32Prefix) + defer unlock() + + appCodec, _, err := keys.CreateCodec(nil) + return appCodec, err +} diff --git a/cmd/opinitd/root.go b/cmd/opinitd/root.go index 1ff2176..327712e 100644 --- a/cmd/opinitd/root.go +++ b/cmd/opinitd/root.go @@ -16,7 +16,7 @@ func NewRootCmd() *cobra.Command { } rootCmd := &cobra.Command{ - Use: "opbot [command]", + Use: "opinitd [command]", } rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) (err error) { @@ -44,6 +44,7 @@ func NewRootCmd() *cobra.Command { rootCmd.AddCommand( initCmd(ctx), startCmd(ctx), + keysCmd(ctx), version.NewVersionCommand(), ) diff --git a/cmd/opinitd/start.go b/cmd/opinitd/start.go index 4eaa82d..d680a89 100644 --- a/cmd/opinitd/start.go +++ b/cmd/opinitd/start.go @@ -2,6 +2,7 @@ package main import ( "context" + "fmt" "os" "os/signal" "syscall" @@ -27,7 +28,6 @@ Currently supported bots: if err != nil { return err } - botType := bottypes.BotTypeFromString(args[0]) bot, err := bot.NewBot(botType, ctx.logger, ctx.homePath, configName) if err != nil { @@ -50,6 +50,7 @@ func gracefulShutdown(done context.CancelFunc) { signal.Notify(signalChannel, os.Interrupt, syscall.SIGTERM) go func() { <-signalChannel + fmt.Println("Received signal to stop. Shutting down...") done() }() } diff --git a/executor/batch/batch.go b/executor/batch/batch.go index 79b4587..b922996 100644 --- a/executor/batch/batch.go +++ b/executor/batch/batch.go @@ -3,26 +3,23 @@ package batch import ( "context" "errors" - "fmt" "io" "os" "sync" "time" - "cosmossdk.io/core/address" + "go.uber.org/zap" + opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" + + dbtypes "github.com/initia-labs/opinit-bots-go/db/types" + "github.com/initia-labs/opinit-bots-go/executor/child" executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + "github.com/initia-labs/opinit-bots-go/node" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" - "go.uber.org/zap" - - "github.com/initia-labs/opinit-bots-go/node" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - - dbtypes "github.com/initia-labs/opinit-bots-go/db/types" ) type hostNode interface { @@ -51,9 +48,6 @@ type BatchSubmitter struct { db types.DB logger *zap.Logger - cdc codec.Codec - ac address.Codec - opchildQueryClient opchildtypes.QueryClient batchInfoMu *sync.Mutex @@ -62,14 +56,28 @@ type BatchSubmitter struct { batchFile *os.File batchHeader *executortypes.BatchHeader - processedMsgs []nodetypes.ProcessedMsgs - homePath string + processedMsgs []btypes.ProcessedMsgs + + chainID string + homePath string lastSubmissionTime time.Time } -func NewBatchSubmitter(version uint8, cfg nodetypes.NodeConfig, batchCfg executortypes.BatchConfig, db types.DB, logger *zap.Logger, cdc codec.Codec, txConfig client.TxConfig, homePath string) *BatchSubmitter { - node, err := node.NewNode(cfg, db, logger, cdc, txConfig) +func NewBatchSubmitter( + version uint8, cfg nodetypes.NodeConfig, + batchCfg executortypes.BatchConfig, + db types.DB, logger *zap.Logger, + chainID, homePath, bech32Prefix string, +) *BatchSubmitter { + appCodec, txConfig, err := child.GetCodec(bech32Prefix) + if err != nil { + panic(err) + } + + cfg.BroadcasterConfig = nil + cfg.ProcessType = nodetypes.PROCESS_TYPE_RAW + node, err := node.NewNode(cfg, db, logger, appCodec, txConfig) if err != nil { panic(err) } @@ -81,23 +89,22 @@ func NewBatchSubmitter(version uint8, cfg nodetypes.NodeConfig, batchCfg executo cfg: cfg, batchCfg: batchCfg, - db: db, - logger: logger, - cdc: cdc, - ac: cdc.InterfaceRegistry().SigningContext().AddressCodec(), + db: db, + logger: logger, - opchildQueryClient: opchildtypes.NewQueryClient(node), + opchildQueryClient: opchildtypes.NewQueryClient(node.GetRPCClient()), batchInfoMu: &sync.Mutex{}, - processedMsgs: make([]nodetypes.ProcessedMsgs, 0), + processedMsgs: make([]btypes.ProcessedMsgs, 0), homePath: homePath, + chainID: chainID, } return ch } -func (bs *BatchSubmitter) Initialize(host hostNode, da executortypes.DANode, bridgeInfo opchildtypes.BridgeInfo) error { +func (bs *BatchSubmitter) Initialize(host hostNode, bridgeInfo opchildtypes.BridgeInfo) error { bs.host = host bs.bridgeInfo = bridgeInfo @@ -110,16 +117,11 @@ func (bs *BatchSubmitter) Initialize(host hostNode, da executortypes.DANode, bri return errors.New("no batch info") } for _, batchInfo := range bs.batchInfos { - if len(bs.batchInfos) == 1 || batchInfo.Output.L2BlockNumber >= bs.node.GetHeight() { + if len(bs.batchInfos) == 1 || (batchInfo.Output.L2BlockNumber+1) >= bs.node.GetHeight() { break } bs.DequeueBatchInfo() } - // TODO: set da and key that match the current batch info - bs.da = da - if !bs.da.HasKey() { - return errors.New("da has no key") - } bs.batchFile, err = os.OpenFile(bs.homePath+"/batch", os.O_CREATE|os.O_APPEND|os.O_RDWR, 0666) if err != nil { @@ -135,15 +137,18 @@ func (bs *BatchSubmitter) Initialize(host hostNode, da executortypes.DANode, bri return nil } -func (bs *BatchSubmitter) Start(ctx context.Context, errCh chan error) { - defer func() { - if r := recover(); r != nil { - bs.logger.Error("batch panic", zap.Any("recover", r)) - errCh <- fmt.Errorf("batch panic: %v", r) - } - }() +func (bs *BatchSubmitter) SetDANode(da executortypes.DANode) error { + if !da.HasKey() { + return errors.New("da has no key") + } - bs.node.Start(ctx, errCh, nodetypes.PROCESS_TYPE_RAW) + bs.da = da + return nil +} + +func (bs *BatchSubmitter) Start(ctx context.Context) { + bs.logger.Info("batch start", zap.Uint64("height", bs.node.GetHeight())) + bs.node.Start(ctx) } func (bs *BatchSubmitter) SetBridgeInfo(bridgeInfo opchildtypes.BridgeInfo) { @@ -168,3 +173,11 @@ func (bs *BatchSubmitter) SubmissionInfoToRawKV(timestamp int64) types.RawKV { Value: dbtypes.FromInt64(timestamp), } } + +func (bs *BatchSubmitter) ChainID() string { + return bs.chainID +} + +func (bs *BatchSubmitter) DA() executortypes.DANode { + return bs.da +} diff --git a/executor/batch/handler.go b/executor/batch/handler.go index c05438b..9c0b08b 100644 --- a/executor/batch/handler.go +++ b/executor/batch/handler.go @@ -3,7 +3,6 @@ package batch import ( "compress/gzip" "crypto/sha256" - "encoding/base64" "encoding/json" "fmt" "io" @@ -11,14 +10,17 @@ import ( "github.com/pkg/errors" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" + + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" + executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" - - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/gogoproto/proto" - ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" ) func (bs *BatchSubmitter) rawBlockHandler(args nodetypes.RawBlockArgs) error { @@ -30,14 +32,21 @@ func (bs *BatchSubmitter) rawBlockHandler(args nodetypes.RawBlockArgs) error { err := proto.Unmarshal(args.BlockBytes, pbb) if err != nil { return errors.Wrap(err, "failed to unmarshal block") + return errors.Wrap(err, "failed to unmarshal block") } err = bs.prepareBatch(args.BlockHeight, pbb.Header.Time) if err != nil { return errors.Wrap(err, "failed to prepare batch") + return errors.Wrap(err, "failed to prepare batch") + } + + blockBytes, err := bs.emptyOracleData(pbb) + if err != nil { + return err } - err = bs.handleBatch(args.BlockBytes) + err = bs.handleBatch(blockBytes) if err != nil { return errors.Wrap(err, "failed to handle batch") } @@ -45,131 +54,166 @@ func (bs *BatchSubmitter) rawBlockHandler(args nodetypes.RawBlockArgs) error { err = bs.checkBatch(args.BlockHeight, pbb.Header.Time) if err != nil { return errors.Wrap(err, "failed to check batch") + return errors.Wrap(err, "failed to check batch") } + // store the processed state into db with batch operation // store the processed state into db with batch operation batchKVs := make([]types.RawKV, 0) batchKVs = append(batchKVs, bs.node.SyncInfoToRawKV(args.BlockHeight)) batchMsgKVs, err := bs.da.ProcessedMsgsToRawKV(bs.processedMsgs, false) + batchMsgKVs, err := bs.da.ProcessedMsgsToRawKV(bs.processedMsgs, false) if err != nil { return errors.Wrap(err, "failed to convert processed messages to raw key value") + return errors.Wrap(err, "failed to convert processed messages to raw key value") } batchKVs = append(batchKVs, batchMsgKVs...) + if len(batchMsgKVs) > 0 { + batchKVs = append(batchKVs, batchMsgKVs...) if len(batchMsgKVs) > 0 { batchKVs = append(batchKVs, bs.SubmissionInfoToRawKV(pbb.Header.Time.UnixNano())) } err = bs.db.RawBatchSet(batchKVs...) if err != nil { return errors.Wrap(err, "failed to set raw batch") + return errors.Wrap(err, "failed to set raw batch") } + // broadcast processed messages + // broadcast processed messages for _, processedMsg := range bs.processedMsgs { bs.da.BroadcastMsgs(processedMsg) } + // clear processed messages + // clear processed messages bs.processedMsgs = bs.processedMsgs[:0] + return nil } func (bs *BatchSubmitter) prepareBatch(blockHeight uint64, blockTime time.Time) error { - // check whether the requested block height is reached to the l2 block number of the next batch info. if nextBatchInfo := bs.NextBatchInfo(); nextBatchInfo != nil && nextBatchInfo.Output.L2BlockNumber < blockHeight { + // if the next batch info is reached, finalize the current batch and update the batch info. + // if the next batch info is reached, finalize the current batch and update the batch info. if bs.batchWriter != nil { err := bs.batchWriter.Close() if err != nil { return errors.Wrap(err, "failed to close batch writer") + return errors.Wrap(err, "failed to close batch writer") } } err := bs.batchFile.Truncate(0) if err != nil { return errors.Wrap(err, "failed to truncate batch file") + return errors.Wrap(err, "failed to truncate batch file") } _, err = bs.batchFile.Seek(0, 0) if err != nil { return errors.Wrap(err, "failed to seek batch file") + return errors.Wrap(err, "failed to seek batch file") } + // save sync info + // save sync info err = bs.node.SaveSyncInfo(nextBatchInfo.Output.L2BlockNumber) if err != nil { return errors.Wrap(err, "failed to save sync info") + return errors.Wrap(err, "failed to save sync info") } + // set last processed block height to l2 block number bs.node.SetSyncInfo(nextBatchInfo.Output.L2BlockNumber) bs.DequeueBatchInfo() + bs.DequeueBatchInfo() // error will restart block process from nextBatchInfo.Output.L2BlockNumber + 1 - return fmt.Errorf("batch info updated: reset from %d", nextBatchInfo.Output.L2BlockNumber) + panic(fmt.Errorf("batch info updated: reset from %d", nextBatchInfo.Output.L2BlockNumber)) } if bs.batchHeader != nil { + // if the batch header end is not set, it means the batch is not finalized yet. // if the batch header end is not set, it means the batch is not finalized yet. if bs.batchHeader.End == 0 { return nil } + err := bs.finalizeBatch(blockHeight) if err != nil { return errors.Wrap(err, "failed to finalize batch") + return errors.Wrap(err, "failed to finalize batch") } + // update last submission time + // update last submission time bs.lastSubmissionTime = blockTime } + // reset batch header + var err error + // reset batch header var err error bs.batchHeader = &executortypes.BatchHeader{} + // linux command gzip use level 6 as default bs.batchWriter, err = gzip.NewWriterLevel(bs.batchFile, 6) if err != nil { return err } + return nil } +// write block bytes to batch file // write block bytes to batch file func (bs *BatchSubmitter) handleBatch(blockBytes []byte) error { - encodedBlockBytes := base64.StdEncoding.EncodeToString(blockBytes) - _, err := bs.batchWriter.Write(append([]byte(encodedBlockBytes), ',')) + _, err := bs.batchWriter.Write(prependLength(blockBytes)) if err != nil { return err } return nil } +// finalize batch and create batch messages // finalize batch and create batch messages func (bs *BatchSubmitter) finalizeBatch(blockHeight uint64) error { // write last block's commit to batch file - rawCommit, err := bs.node.QueryRawCommit(int64(blockHeight)) + rawCommit, err := bs.node.GetRPCClient().QueryRawCommit(int64(blockHeight)) if err != nil { return errors.Wrap(err, "failed to query raw commit") + return errors.Wrap(err, "failed to query raw commit") } - encodedRawCommit := base64.StdEncoding.EncodeToString(rawCommit) - _, err = bs.batchWriter.Write([]byte(encodedRawCommit)) + _, err = bs.batchWriter.Write(prependLength(rawCommit)) if err != nil { return errors.Wrap(err, "failed to write raw commit") + return errors.Wrap(err, "failed to write raw commit") } err = bs.batchWriter.Close() if err != nil { return errors.Wrap(err, "failed to close batch writer") + return errors.Wrap(err, "failed to close batch writer") } batchBuffer := make([]byte, bs.batchCfg.MaxChunkSize) checksums := make([][]byte, 0) + // room for batch header - bs.processedMsgs = append(bs.processedMsgs, nodetypes.ProcessedMsgs{ + bs.processedMsgs = append(bs.processedMsgs, btypes.ProcessedMsgs{ Timestamp: time.Now().UnixNano(), Save: true, }) @@ -184,11 +228,11 @@ func (bs *BatchSubmitter) finalizeBatch(blockHeight uint64) error { // trim the buffer to the actual read length batchBuffer := batchBuffer[:readLength] - msg, err := bs.createBatchMsg(batchBuffer) + msg, err := bs.da.CreateBatchMsg(batchBuffer) if err != nil { return err } - bs.processedMsgs = append(bs.processedMsgs, nodetypes.ProcessedMsgs{ + bs.processedMsgs = append(bs.processedMsgs, btypes.ProcessedMsgs{ Msgs: []sdk.Msg{msg}, Timestamp: time.Now().UnixNano(), Save: true, @@ -200,18 +244,22 @@ func (bs *BatchSubmitter) finalizeBatch(blockHeight uint64) error { } } + // update batch header + // update batch header bs.batchHeader.Chunks = checksums headerBytes, err := json.Marshal(bs.batchHeader) if err != nil { return err } - msg, err := bs.createBatchMsg(headerBytes) + msg, err := bs.da.CreateBatchMsg(headerBytes) if err != nil { return err } bs.processedMsgs[0].Msgs = []sdk.Msg{msg} + // reset batch file + // reset batch file err = bs.batchFile.Truncate(0) if err != nil { @@ -222,6 +270,7 @@ func (bs *BatchSubmitter) finalizeBatch(blockHeight uint64) error { return err } + return nil } @@ -229,8 +278,13 @@ func (bs *BatchSubmitter) checkBatch(blockHeight uint64, blockTime time.Time) er info, err := bs.batchFile.Stat() if err != nil { return errors.Wrap(err, "failed to get batch file stat") + return errors.Wrap(err, "failed to get batch file stat") } + // if the block time is after the last submission time + submission interval * 2/3 + // or the block time is after the last submission time + max submission time + // or the batch file size is greater than (max chunks - 1) * max chunk size + // then finalize the batch // if the block time is after the last submission time + submission interval * 2/3 // or the block time is after the last submission time + max submission time // or the batch file size is greater than (max chunks - 1) * max chunk size @@ -239,25 +293,14 @@ func (bs *BatchSubmitter) checkBatch(blockHeight uint64, blockTime time.Time) er blockTime.After(bs.lastSubmissionTime.Add(time.Duration(bs.batchCfg.MaxSubmissionTime)*time.Second)) || info.Size() > (bs.batchCfg.MaxChunks-1)*bs.batchCfg.MaxChunkSize { + // finalize the batch + // finalize the batch bs.batchHeader.End = blockHeight } - return nil -} -// TODO: support celestia -func (bs *BatchSubmitter) createBatchMsg(batchBytes []byte) (sdk.Msg, error) { - submitter, err := bs.da.GetAddressStr() - if err != nil { - return nil, err - } - - return ophosttypes.NewMsgRecordBatch( - submitter, - bs.bridgeInfo.BridgeId, - batchBytes, - ), nil + return nil } // UpdateBatchInfo appends the batch info with the given chain, submitter, output index, and l2 block number @@ -267,7 +310,7 @@ func (bs *BatchSubmitter) UpdateBatchInfo(chain string, submitter string, output bs.batchInfos = append(bs.batchInfos, ophosttypes.BatchInfoWithOutput{ BatchInfo: ophosttypes.BatchInfo{ - Chain: chain, + ChainType: ophosttypes.BatchInfo_ChainType(ophosttypes.BatchInfo_ChainType_value["CHAIN_TYPE_"+chain]), Submitter: submitter, }, Output: ophosttypes.Output{ @@ -276,6 +319,7 @@ func (bs *BatchSubmitter) UpdateBatchInfo(chain string, submitter string, output }) } +// BatchInfo returns the current batch info // BatchInfo returns the current batch info func (bs *BatchSubmitter) BatchInfo() *ophosttypes.BatchInfoWithOutput { bs.batchInfoMu.Lock() @@ -284,6 +328,7 @@ func (bs *BatchSubmitter) BatchInfo() *ophosttypes.BatchInfoWithOutput { return &bs.batchInfos[0] } +// NextBatchInfo returns the next batch info in the queue // NextBatchInfo returns the next batch info in the queue func (bs *BatchSubmitter) NextBatchInfo() *ophosttypes.BatchInfoWithOutput { bs.batchInfoMu.Lock() @@ -294,6 +339,8 @@ func (bs *BatchSubmitter) NextBatchInfo() *ophosttypes.BatchInfoWithOutput { return &bs.batchInfos[1] } +// DequeueBatchInfo removes the first batch info from the queue +func (bs *BatchSubmitter) DequeueBatchInfo() { // DequeueBatchInfo removes the first batch info from the queue func (bs *BatchSubmitter) DequeueBatchInfo() { bs.batchInfoMu.Lock() diff --git a/executor/batch/utils.go b/executor/batch/utils.go new file mode 100644 index 0000000..18c1b85 --- /dev/null +++ b/executor/batch/utils.go @@ -0,0 +1,54 @@ +package batch + +import ( + "encoding/binary" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" + opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" +) + +// prependLength prepends the length of the data to the data. +func prependLength(data []byte) []byte { + lengthBytes := make([]byte, 8) + binary.LittleEndian.PutUint64(lengthBytes, uint64(len(lengthBytes))) + return append(lengthBytes, data...) +} + +// emptyOracleData converts the MsgUpdateOracle messages's data field to empty +// to decrease the size of the batch. +func (bs *BatchSubmitter) emptyOracleData(pbb *cmtproto.Block) ([]byte, error) { + for i, txBytes := range pbb.Data.GetTxs() { + tx, err := bs.node.MustGetBroadcaster().DecodeTx(txBytes) + if err != nil { + // ignore not registered tx in codec + continue + } + + msgs := tx.GetMsgs() + if len(msgs) != 1 { + continue + } + + if msg, ok := msgs[0].(*opchildtypes.MsgUpdateOracle); ok { + msg.Data = []byte{} + tx, err := bs.node.MustGetBroadcaster().ChangeMsgsFromTx(tx, []sdk.Msg{msg}) + if err != nil { + return nil, err + } + convertedTxBytes, err := bs.node.MustGetBroadcaster().EncodeTx(tx) + if err != nil { + return nil, err + } + pbb.Data.Txs[i] = convertedTxBytes + } + } + + // convert block to bytes + blockBytes, err := proto.Marshal(pbb) + if err != nil { + return nil, err + } + return blockBytes, nil +} diff --git a/executor/celestia/celestia.go b/executor/celestia/celestia.go new file mode 100644 index 0000000..b2e5a4b --- /dev/null +++ b/executor/celestia/celestia.go @@ -0,0 +1,176 @@ +package celestia + +import ( + "context" + "crypto/sha256" + + "go.uber.org/zap" + + "github.com/cometbft/cometbft/crypto/merkle" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + + inclusion "github.com/celestiaorg/go-square/v2/inclusion" + sh "github.com/celestiaorg/go-square/v2/share" + + executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + "github.com/initia-labs/opinit-bots-go/keys" + "github.com/initia-labs/opinit-bots-go/node" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" + nodetypes "github.com/initia-labs/opinit-bots-go/node/types" + "github.com/initia-labs/opinit-bots-go/types" + celestiatypes "github.com/initia-labs/opinit-bots-go/types/celestia" +) + +type batchNode interface { + ChainID() string + UpdateBatchInfo(chain string, submitter string, outputIndex uint64, l2BlockNumber uint64) +} + +var _ executortypes.DANode = &Celestia{} + +type Celestia struct { + version uint8 + + node *node.Node + batch batchNode + + bridgeId int64 + namespace sh.Namespace + + cfg nodetypes.NodeConfig + db types.DB + logger *zap.Logger + + processedMsgs []btypes.ProcessedMsgs + msgQueue []sdk.Msg +} + +func NewDACelestia( + version uint8, cfg nodetypes.NodeConfig, + db types.DB, logger *zap.Logger, bech32Prefix, batchSubmitter string, +) *Celestia { + c := &Celestia{ + version: version, + + cfg: cfg, + db: db, + logger: logger, + + processedMsgs: make([]btypes.ProcessedMsgs, 0), + msgQueue: make([]sdk.Msg, 0), + } + + appCodec, txConfig, err := createCodec(bech32Prefix) + if err != nil { + panic(err) + } + + cfg.ProcessType = nodetypes.PROCESS_TYPE_ONLY_BROADCAST + cfg.BroadcasterConfig.KeyringConfig.Address = batchSubmitter + cfg.BroadcasterConfig.BuildTxWithMessages = c.BuildTxWithMessages + cfg.BroadcasterConfig.PendingTxToProcessedMsgs = c.PendingTxToProcessedMsgs + + node, err := node.NewNode(cfg, db, logger, appCodec, txConfig) + if err != nil { + panic(err) + } + + c.node = node + return c +} + +func createCodec(bech32Prefix string) (codec.Codec, client.TxConfig, error) { + unlock := keys.SetSDKConfigContext(bech32Prefix) + defer unlock() + + return keys.CreateCodec([]keys.RegisterInterfaces{ + auth.AppModuleBasic{}.RegisterInterfaces, + celestiatypes.RegisterInterfaces, + }) +} + +func (c *Celestia) Initialize(batch batchNode, bridgeId int64) error { + c.batch = batch + c.bridgeId = bridgeId + var err error + c.namespace, err = sh.NewV0Namespace(c.NamespaceID()) + if err != nil { + return err + } + return nil +} + +func (c *Celestia) RegisterDAHandlers() { + c.node.RegisterEventHandler("celestia.blob.v1.EventPayForBlobs", c.payForBlobsHandler) +} + +func (c *Celestia) Start(ctx context.Context) { + c.logger.Info("celestia start") + c.node.Start(ctx) +} + +func (c Celestia) BroadcastMsgs(msgs btypes.ProcessedMsgs) { + if len(msgs.Msgs) == 0 { + return + } + + c.node.MustGetBroadcaster().BroadcastMsgs(msgs) +} + +func (c Celestia) ProcessedMsgsToRawKV(msgs []btypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { + return c.node.MustGetBroadcaster().ProcessedMsgsToRawKV(msgs, delete) +} + +func (c *Celestia) SetBridgeId(brigeId int64) { + c.bridgeId = brigeId +} + +func (c Celestia) HasKey() bool { + return c.node.HasBroadcaster() +} + +func (c Celestia) GetHeight() uint64 { + return c.node.GetHeight() +} + +func (c Celestia) CreateBatchMsg(rawBlob []byte) (sdk.Msg, error) { + submitter, err := c.node.MustGetBroadcaster().GetAddressString() + if err != nil { + return nil, err + } + blob, err := sh.NewV0Blob(c.namespace, rawBlob) + if err != nil { + return nil, err + } + commitment, err := inclusion.CreateCommitment(blob, + merkle.HashFromByteSlices, + // https://github.com/celestiaorg/celestia-app/blob/4f4d0f7ff1a43b62b232726e52d1793616423df7/pkg/appconsts/v1/app_consts.go#L6 + 64, + ) + if err != nil { + return nil, err + } + return &celestiatypes.MsgPayForBlobsWithBlob{ + MsgPayForBlobs: &celestiatypes.MsgPayForBlobs{ + Signer: submitter, + Namespaces: [][]byte{c.namespace.Bytes()}, + ShareCommitments: [][]byte{commitment}, + BlobSizes: []uint32{uint32(len(blob.Data()))}, + ShareVersions: []uint32{uint32(blob.ShareVersion())}, + }, + Blob: &celestiatypes.Blob{ + NamespaceId: blob.Namespace().ID(), + Data: blob.Data(), + ShareVersion: uint32(blob.ShareVersion()), + NamespaceVersion: uint32(blob.Namespace().Version()), + }, + }, nil +} + +func (c Celestia) NamespaceID() []byte { + chainIDhash := sha256.Sum256([]byte(c.batch.ChainID())) + return chainIDhash[:10] +} diff --git a/executor/celestia/handler.go b/executor/celestia/handler.go new file mode 100644 index 0000000..bb4ea3b --- /dev/null +++ b/executor/celestia/handler.go @@ -0,0 +1,30 @@ +package celestia + +import ( + nodetypes "github.com/initia-labs/opinit-bots-go/node/types" + "go.uber.org/zap" +) + +func (c *Celestia) payForBlobsHandler(args nodetypes.EventHandlerArgs) error { + var signer string + var blobSizes string + var namespaces string + + for _, attr := range args.EventAttributes { + switch attr.Key { + // signer + case "signer": + signer = attr.Value + case "blob_sizes": + blobSizes = attr.Value + case "namespaces": + namespaces = attr.Value + } + } + c.logger.Info("record batch", + zap.String("signer", signer), + zap.String("blob_sizes", blobSizes), + zap.String("namespaces", namespaces), + ) + return nil +} diff --git a/executor/celestia/node.go b/executor/celestia/node.go new file mode 100644 index 0000000..a2c69c3 --- /dev/null +++ b/executor/celestia/node.go @@ -0,0 +1,99 @@ +package celestia + +import ( + "context" + "fmt" + + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" + celestiatypes "github.com/initia-labs/opinit-bots-go/types/celestia" +) + +// buildTxWithMessages creates a transaction from the given messages. +func (c *Celestia) BuildTxWithMessages( + ctx context.Context, + msgs []sdk.Msg, +) ( + txBytes []byte, + txHash string, + err error, +) { + pfbMsgs := make([]sdk.Msg, 0, len(msgs)) + blobMsgs := make([]*celestiatypes.Blob, 0) + for _, msg := range msgs { + withBlobMsg, ok := msg.(*celestiatypes.MsgPayForBlobsWithBlob) + if !ok { + // not support other message types for now + // only MsgPayForBlobsWithBlob in one tx + return nil, "", fmt.Errorf("unsupported message type: %s", sdk.MsgTypeURL(msg)) + } + pfbMsgs = append(pfbMsgs, withBlobMsg.MsgPayForBlobs) + blobMsgs = append(blobMsgs, withBlobMsg.Blob) + } + + b := c.node.MustGetBroadcaster() + txf := b.GetTxf() + + _, adjusted, err := b.CalculateGas(ctx, txf, pfbMsgs...) + if err != nil { + return nil, "", err + } + + txf = txf.WithGas(adjusted) + txb, err := txf.BuildUnsignedTx(pfbMsgs...) + if err != nil { + return nil, "", err + } + + if err = tx.Sign(ctx, txf, b.KeyName(), txb, false); err != nil { + return nil, "", err + } + + tx := txb.GetTx() + txBytes, err = b.EncodeTx(tx) + if err != nil { + return nil, "", err + } + + blobTx := celestiatypes.BlobTx{ + Tx: txBytes, + Blobs: blobMsgs, + TypeId: "BLOB", + } + blobTxBytes, err := blobTx.Marshal() + if err != nil { + return nil, "", err + } + + return blobTxBytes, btypes.TxHash(txBytes), nil +} + +func (c *Celestia) PendingTxToProcessedMsgs( + txBytes []byte, +) ([]sdk.Msg, error) { + b := c.node.MustGetBroadcaster() + + blobTx := &celestiatypes.BlobTx{} + if err := blobTx.Unmarshal(txBytes); err == nil { + pfbTx, err := b.DecodeTx(blobTx.Tx) + if err != nil { + return nil, err + } + pfbMsg := pfbTx.GetMsgs()[0] + + return []sdk.Msg{ + &celestiatypes.MsgPayForBlobsWithBlob{ + MsgPayForBlobs: pfbMsg.(*celestiatypes.MsgPayForBlobs), + Blob: blobTx.Blobs[0], + }, + }, nil + } + + tx, err := b.DecodeTx(txBytes) + if err != nil { + return nil, err + } + return tx.GetMsgs(), nil +} diff --git a/executor/child/child.go b/executor/child/child.go index 08eea90..cb08438 100644 --- a/executor/child/child.go +++ b/executor/child/child.go @@ -2,41 +2,42 @@ package child import ( "context" - "fmt" - "io" "time" - "cosmossdk.io/core/address" + "go.uber.org/zap" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + + "github.com/initia-labs/OPinit/x/opchild" opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" + executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + "github.com/initia-labs/opinit-bots-go/keys" "github.com/initia-labs/opinit-bots-go/merkle" + "github.com/initia-labs/opinit-bots-go/node" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" - "go.uber.org/zap" - - "github.com/initia-labs/opinit-bots-go/node" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - - sdk "github.com/cosmos/cosmos-sdk/types" ) type hostNode interface { GetAddressStr() (string, error) - AccountCodec() address.Codec HasKey() bool - BroadcastMsgs(nodetypes.ProcessedMsgs) - ProcessedMsgsToRawKV([]nodetypes.ProcessedMsgs, bool) ([]types.RawKV, error) + BroadcastMsgs(btypes.ProcessedMsgs) + ProcessedMsgsToRawKV([]btypes.ProcessedMsgs, bool) ([]types.RawKV, error) QueryLastOutput() (*ophosttypes.QueryOutputProposalResponse, error) QueryOutput(uint64) (*ophosttypes.QueryOutputProposalResponse, error) -} -type compressionFunc interface { - Write([]byte) (int, error) - Reset(io.Writer) - Close() error + GetMsgProposeOutput( + bridgeId uint64, + outputIndex uint64, + l2BlockNumber uint64, + outputRoot []byte, + ) (sdk.Msg, error) } type Child struct { @@ -55,20 +56,22 @@ type Child struct { db types.DB logger *zap.Logger - cdc codec.Codec - ac address.Codec - opchildQueryClient opchildtypes.QueryClient - processedMsgs []nodetypes.ProcessedMsgs + processedMsgs []btypes.ProcessedMsgs msgQueue []sdk.Msg } func NewChild( version uint8, cfg nodetypes.NodeConfig, - db types.DB, logger *zap.Logger, cdc codec.Codec, txConfig client.TxConfig, + db types.DB, logger *zap.Logger, bech32Prefix string, ) *Child { - node, err := node.NewNode(cfg, db, logger, cdc, txConfig) + appCodec, txConfig, err := GetCodec(bech32Prefix) + if err != nil { + panic(err) + } + + node, err := node.NewNode(cfg, db, logger, appCodec, txConfig) if err != nil { panic(err) } @@ -88,17 +91,24 @@ func NewChild( db: db, logger: logger, - cdc: cdc, - ac: cdc.InterfaceRegistry().SigningContext().AddressCodec(), - - opchildQueryClient: opchildtypes.NewQueryClient(node), + opchildQueryClient: opchildtypes.NewQueryClient(node.GetRPCClient()), - processedMsgs: make([]nodetypes.ProcessedMsgs, 0), + processedMsgs: make([]btypes.ProcessedMsgs, 0), msgQueue: make([]sdk.Msg, 0), } return ch } +func GetCodec(bech32Prefix string) (codec.Codec, client.TxConfig, error) { + unlock := keys.SetSDKConfigContext(bech32Prefix) + defer unlock() + + return keys.CreateCodec([]keys.RegisterInterfaces{ + auth.AppModuleBasic{}.RegisterInterfaces, + opchild.AppModuleBasic{}.RegisterInterfaces, + }) +} + func (ch *Child) Initialize(host hostNode, bridgeInfo opchildtypes.BridgeInfo) error { ch.host = host ch.bridgeInfo = bridgeInfo @@ -107,15 +117,9 @@ func (ch *Child) Initialize(host hostNode, bridgeInfo opchildtypes.BridgeInfo) e return nil } -func (ch *Child) Start(ctx context.Context, errCh chan error) { - defer func() { - if r := recover(); r != nil { - ch.logger.Error("child panic", zap.Any("recover", r)) - errCh <- fmt.Errorf("child panic: %v", r) - } - }() - - ch.node.Start(ctx, errCh, nodetypes.PROCESS_TYPE_DEFAULT) +func (ch *Child) Start(ctx context.Context) { + ch.logger.Info("child start", zap.Uint64("height", ch.node.GetHeight())) + ch.node.Start(ctx) } func (ch *Child) registerHandlers() { @@ -126,27 +130,28 @@ func (ch *Child) registerHandlers() { ch.node.RegisterEndBlockHandler(ch.endBlockHandler) } -func (ch Child) BroadcastMsgs(msgs nodetypes.ProcessedMsgs) { - if !ch.node.HasKey() { +func (ch Child) BroadcastMsgs(msgs btypes.ProcessedMsgs) { + if len(msgs.Msgs) == 0 { return } - ch.node.BroadcastMsgs(msgs) + ch.node.MustGetBroadcaster().BroadcastMsgs(msgs) } -func (ch Child) ProcessedMsgsToRawKV(msgs []nodetypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { - return ch.node.ProcessedMsgsToRawKV(msgs, delete) +func (ch Child) ProcessedMsgsToRawKV(msgs []btypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { + if len(msgs) == 0 { + return nil, nil + } + + return ch.node.MustGetBroadcaster().ProcessedMsgsToRawKV(msgs, delete) } func (ch Child) BridgeId() uint64 { return ch.bridgeInfo.BridgeId } -func (ch Child) AccountCodec() address.Codec { - return ch.ac -} func (ch Child) HasKey() bool { - return ch.node.HasKey() + return ch.node.HasBroadcaster() } func (ch *Child) SetBridgeInfo(bridgeInfo opchildtypes.BridgeInfo) { diff --git a/executor/child/handler.go b/executor/child/handler.go index 0f64670..aef5623 100644 --- a/executor/child/handler.go +++ b/executor/child/handler.go @@ -3,6 +3,7 @@ package child import ( "time" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" ) @@ -55,7 +56,7 @@ func (ch *Child) endBlockHandler(args nodetypes.EndBlockArgs) error { // if has key, then process the messages if ch.host.HasKey() { if len(ch.msgQueue) != 0 { - ch.processedMsgs = append(ch.processedMsgs, nodetypes.ProcessedMsgs{ + ch.processedMsgs = append(ch.processedMsgs, btypes.ProcessedMsgs{ Msgs: ch.msgQueue, Timestamp: time.Now().UnixNano(), Save: true, diff --git a/executor/child/msgs.go b/executor/child/msgs.go new file mode 100644 index 0000000..d1789af --- /dev/null +++ b/executor/child/msgs.go @@ -0,0 +1,50 @@ +package child + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" +) + +func (ch Child) GetMsgFinalizeTokenDeposit( + from string, + to string, + coin sdk.Coin, + l1Sequence uint64, + blockHeight uint64, + l1Denom string, + data []byte, +) (sdk.Msg, error) { + sender, err := ch.node.MustGetBroadcaster().GetAddressString() + msg := opchildtypes.NewMsgFinalizeTokenDeposit( + sender, + from, + to, + coin, + l1Sequence, + blockHeight, + l1Denom, + data, + ) + err = msg.Validate(ch.node.AccountCodec()) + if err != nil { + return nil, err + } + return msg, nil +} + +func (ch Child) GetMsgUpdateOracle( + height uint64, + data []byte, +) (sdk.Msg, error) { + sender, err := ch.node.MustGetBroadcaster().GetAddressString() + msg := opchildtypes.NewMsgUpdateOracle( + sender, + height, + data, + ) + err = msg.Validate(ch.node.AccountCodec()) + if err != nil { + return nil, err + } + return msg, nil +} diff --git a/executor/child/query.go b/executor/child/query.go index 87f1bd5..daca71f 100644 --- a/executor/child/query.go +++ b/executor/child/query.go @@ -2,26 +2,26 @@ package child import ( "encoding/json" - "errors" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" + executortypes "github.com/initia-labs/opinit-bots-go/executor/types" - "github.com/initia-labs/opinit-bots-go/node" + "github.com/initia-labs/opinit-bots-go/node/rpcclient" ) +func (ch Child) GetAddress() sdk.AccAddress { + return ch.node.MustGetBroadcaster().GetAddress() +} + func (ch Child) GetAddressStr() (string, error) { - addr := ch.node.GetAddress() - if addr == nil { - return "", errors.New("nil address") - } - return ch.ac.BytesToString(addr) + return ch.node.MustGetBroadcaster().GetAddressString() } func (ch Child) QueryBridgeInfo() (opchildtypes.BridgeInfo, error) { req := &opchildtypes.QueryBridgeInfoRequest{} - ctx, cancel := node.GetQueryContext(0) + ctx, cancel := rpcclient.GetQueryContext(0) defer cancel() res, err := ch.opchildQueryClient.BridgeInfo(ctx, req) @@ -33,7 +33,7 @@ func (ch Child) QueryBridgeInfo() (opchildtypes.BridgeInfo, error) { func (ch Child) QueryNextL1Sequence() (uint64, error) { req := &opchildtypes.QueryNextL1SequenceRequest{} - ctx, cancel := node.GetQueryContext(0) + ctx, cancel := rpcclient.GetQueryContext(0) defer cancel() res, err := ch.opchildQueryClient.NextL1Sequence(ctx, req) @@ -45,7 +45,7 @@ func (ch Child) QueryNextL1Sequence() (uint64, error) { func (ch Child) QueryNextL2Sequence(height uint64) (uint64, error) { req := &opchildtypes.QueryNextL2SequenceRequest{} - ctx, cancel := node.GetQueryContext(height) + ctx, cancel := rpcclient.GetQueryContext(height) defer cancel() res, err := ch.opchildQueryClient.NextL2Sequence(ctx, req) diff --git a/executor/child/withdraw.go b/executor/child/withdraw.go index a8a4d8e..abc584a 100644 --- a/executor/child/withdraw.go +++ b/executor/child/withdraw.go @@ -174,20 +174,13 @@ func (ch *Child) handleTree(blockHeight uint64, latestHeight uint64, blockId []b } func (ch *Child) handleOutput(blockHeight uint64, version uint8, blockId []byte, outputIndex uint64, storageRoot []byte) error { - sender, err := ch.host.GetAddressStr() - if err != nil { - return err - } - outputRoot := ophosttypes.GenerateOutputRoot(version, storageRoot, blockId) - msg := ophosttypes.NewMsgProposeOutput( - sender, + msg, err := ch.host.GetMsgProposeOutput( ch.BridgeId(), outputIndex, blockHeight, outputRoot[:], ) - err = msg.Validate(ch.host.AccountCodec()) if err != nil { return err } diff --git a/executor/executor.go b/executor/executor.go index 5ad3265..ae7044a 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -2,22 +2,25 @@ package executor import ( "context" - "errors" + "fmt" "strconv" + "github.com/pkg/errors" + "github.com/gofiber/fiber/v2" "github.com/initia-labs/opinit-bots-go/executor/batch" + "github.com/initia-labs/opinit-bots-go/executor/celestia" "github.com/initia-labs/opinit-bots-go/executor/child" "github.com/initia-labs/opinit-bots-go/executor/host" "github.com/initia-labs/opinit-bots-go/server" bottypes "github.com/initia-labs/opinit-bots-go/bot/types" executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" "github.com/initia-labs/opinit-bots-go/types" "go.uber.org/zap" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" + "golang.org/x/sync/errgroup" ) var _ bottypes.Bot = &Executor{} @@ -34,9 +37,11 @@ type Executor struct { db types.DB server *server.Server logger *zap.Logger + + homePath string } -func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logger *zap.Logger, cdc codec.Codec, txConfig client.TxConfig, homePath string) *Executor { +func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logger *zap.Logger, homePath string) *Executor { err := cfg.Validate() if err != nil { panic(err) @@ -44,25 +49,28 @@ func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logg executor := &Executor{ host: host.NewHost( - cfg.Version, cfg.RelayOracle, cfg.L1NodeConfig(), + cfg.Version, cfg.RelayOracle, cfg.L1NodeConfig(homePath), db.WithPrefix([]byte(executortypes.HostNodeName)), - logger.Named(executortypes.HostNodeName), cdc, txConfig, + logger.Named(executortypes.HostNodeName), cfg.L1Bech32Prefix, "", ), child: child.NewChild( - cfg.Version, cfg.L2NodeConfig(), + cfg.Version, cfg.L2NodeConfig(homePath), db.WithPrefix([]byte(executortypes.ChildNodeName)), - logger.Named(executortypes.ChildNodeName), cdc, txConfig, + logger.Named(executortypes.ChildNodeName), cfg.L2Bech32Prefix, ), batch: batch.NewBatchSubmitter( - cfg.Version, cfg.DANodeConfig(), cfg.BatchConfig(), - db.WithPrefix([]byte(executortypes.BatchNodeName)), - logger.Named(executortypes.BatchNodeName), cdc, txConfig, homePath, + cfg.Version, cfg.L2NodeConfig(homePath), + cfg.BatchConfig(), db.WithPrefix([]byte(executortypes.BatchNodeName)), + logger.Named(executortypes.BatchNodeName), cfg.L2ChainID, homePath, + cfg.DABech32Prefix, ), cfg: cfg, db: db, server: sv, logger: logger, + + homePath: homePath, } bridgeInfo, err := executor.child.QueryBridgeInfo() @@ -79,14 +87,6 @@ func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logg zap.Duration("submission_interval", bridgeInfo.BridgeConfig.SubmissionInterval), ) - da := executor.host - // if cfg.Batch.DANode.ChainID != cfg.HostNode.ChainID { - // switch cfg.Batch.DANode.ChainID { - // case "celestia": - // da = celestia.NewCelestia() - // } - // } - err = executor.host.Initialize(executor.child, executor.batch, int64(bridgeInfo.BridgeId)) if err != nil { panic(err) @@ -95,64 +95,49 @@ func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logg if err != nil { panic(err) } - err = executor.batch.Initialize(executor.host, da, bridgeInfo) + err = executor.batch.Initialize(executor.host, bridgeInfo) if err != nil { panic(err) } - executor.RegisterQuerier() - return executor -} -func (ex *Executor) Start(cmdCtx context.Context) error { - defer ex.db.Close() - - err := ex.server.ShutdownWithContext(cmdCtx) + da, err := executor.makeDANode(int64(bridgeInfo.BridgeId)) if err != nil { - return err + panic(err) + } + err = executor.batch.SetDANode(da) + if err != nil { + panic(err) } - hostCtx, hostDone := context.WithCancel(cmdCtx) - childCtx, childDone := context.WithCancel(cmdCtx) - batchCtx, batchDone := context.WithCancel(cmdCtx) - - errCh := make(chan error, 3) - ex.host.Start(hostCtx, errCh) - ex.child.Start(childCtx, errCh) - ex.batch.Start(batchCtx, errCh) - - go func() { - err := ex.server.Start(ex.cfg.ListenAddress) - if err != nil { - errCh <- err - } - }() - - shutdown := func(err error) error { - ex.logger.Info("executor shutdown", zap.String("state", "requested")) - - ex.logger.Debug("executor shutdown", zap.String("state", "wait"), zap.String("target", "api")) - ex.server.Shutdown() - - ex.logger.Debug("executor shutdown", zap.String("state", "wait"), zap.String("target", "host")) - hostDone() + executor.RegisterQuerier() + return executor +} - ex.logger.Debug("executor shutdown", zap.String("state", "wait"), zap.String("target", "child")) - childDone() +func (ex *Executor) Start(cmdCtx context.Context) error { + defer ex.Close() + errGrp, ctx := errgroup.WithContext(cmdCtx) + ctx = context.WithValue(ctx, "errGrp", errGrp) - ex.logger.Debug("executor shutdown", zap.String("state", "wait"), zap.String("target", "batch")) - batchDone() + errGrp.Go(func() (err error) { + <-ctx.Done() + return ex.server.Shutdown() + }) - ex.logger.Info("executor shutdown completed") - return err - } + errGrp.Go(func() (err error) { + defer func() { + ex.logger.Info("api server stopped") + }() + return ex.server.Start(ex.cfg.ListenAddress) + }) + ex.host.Start(ctx) + ex.child.Start(ctx) + ex.batch.Start(ctx) + ex.batch.DA().Start(ctx) + return errGrp.Wait() +} - select { - case err := <-errCh: - ex.logger.Error("executor error", zap.String("error", err.Error())) - return shutdown(err) - case <-cmdCtx.Done(): - return shutdown(nil) - } +func (ex *Executor) Close() { + ex.db.Close() } func (ex *Executor) RegisterQuerier() { @@ -183,3 +168,33 @@ func (ex *Executor) RegisterQuerier() { return c.JSON(res) }) } + +func (ex *Executor) makeDANode(bridgeId int64) (executortypes.DANode, error) { + batchInfo := ex.batch.BatchInfo() + switch batchInfo.BatchInfo.ChainType { + case ophosttypes.BatchInfo_CHAIN_TYPE_INITIA: + da := host.NewHost( + ex.cfg.Version, false, ex.cfg.DANodeConfig(ex.homePath), + ex.db.WithPrefix([]byte(executortypes.DAHostNodeName)), + ex.logger.Named(executortypes.DAHostNodeName), + ex.homePath, batchInfo.BatchInfo.Submitter, + ) + if ex.host.GetAddress().Equals(da.GetAddress()) { + return ex.host, nil + } + da.SetBridgeId(bridgeId) + da.RegisterDAHandlers() + return da, nil + case ophosttypes.BatchInfo_CHAIN_TYPE_CELESTIA: + da := celestia.NewDACelestia(ex.cfg.Version, ex.cfg.DANodeConfig(ex.homePath), + ex.db.WithPrefix([]byte(executortypes.DACelestiaNodeName)), + ex.logger.Named(executortypes.DACelestiaNodeName), + ex.homePath, batchInfo.BatchInfo.Submitter, + ) + da.Initialize(ex.batch, bridgeId) + da.RegisterDAHandlers() + return da, nil + } + + return nil, fmt.Errorf("unsupported chain id for DA: %s", ophosttypes.BatchInfo_ChainType_name[int32(batchInfo.BatchInfo.ChainType)]) +} diff --git a/executor/host/batch.go b/executor/host/batch.go index 6b4c2ea..2e81b38 100644 --- a/executor/host/batch.go +++ b/executor/host/batch.go @@ -45,7 +45,7 @@ func (h *Host) updateBatchInfoHandler(args nodetypes.EventHandlerArgs) error { // pass other bridge deposit event return nil } - case ophosttypes.AttributeKeyBatchChain: + case ophosttypes.AttributeKeyBatchChainType: chain = attr.Value case ophosttypes.AttributeKeyBatchSubmitter: submitter = attr.Value @@ -61,6 +61,12 @@ func (h *Host) updateBatchInfoHandler(args nodetypes.EventHandlerArgs) error { } } } + h.logger.Info("update batch info", + zap.String("chain", chain), + zap.String("submitter", submitter), + zap.Uint64("output_index", outputIndex), + zap.Uint64("l2_block_number", l2BlockNumber), + ) h.batch.UpdateBatchInfo(chain, submitter, outputIndex, l2BlockNumber) return nil diff --git a/executor/host/deposit.go b/executor/host/deposit.go index 344f78d..64b0f5a 100644 --- a/executor/host/deposit.go +++ b/executor/host/deposit.go @@ -6,7 +6,6 @@ import ( "strconv" "cosmossdk.io/math" - opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" @@ -86,18 +85,13 @@ func (h *Host) handleInitiateDeposit( amount string, data []byte, ) (sdk.Msg, error) { - sender, err := h.child.GetAddressStr() - if err != nil { - return nil, err - } coinAmount, ok := math.NewIntFromString(amount) if !ok { return nil, errors.New("invalid amount") } coin := sdk.NewCoin(l2Denom, coinAmount) - msg := opchildtypes.NewMsgFinalizeTokenDeposit( - sender, + return h.child.GetMsgFinalizeTokenDeposit( from, to, coin, @@ -106,9 +100,4 @@ func (h *Host) handleInitiateDeposit( l1Denom, data, ) - err = msg.Validate(h.child.AccountCodec()) - if err != nil { - return nil, err - } - return msg, nil } diff --git a/executor/host/handler.go b/executor/host/handler.go index 04a1c76..edc33a9 100644 --- a/executor/host/handler.go +++ b/executor/host/handler.go @@ -3,10 +3,12 @@ package host import ( "time" - nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" sdk "github.com/cosmos/cosmos-sdk/types" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" + nodetypes "github.com/initia-labs/opinit-bots-go/node/types" ) func (h *Host) beginBlockHandler(args nodetypes.BeginBlockArgs) error { @@ -29,9 +31,9 @@ func (h *Host) endBlockHandler(args nodetypes.EndBlockArgs) error { batchKVs := []types.RawKV{ h.node.SyncInfoToRawKV(blockHeight), } - if h.node.HasKey() { + if h.node.HasBroadcaster() { if len(h.msgQueue) != 0 { - h.processedMsgs = append(h.processedMsgs, nodetypes.ProcessedMsgs{ + h.processedMsgs = append(h.processedMsgs, btypes.ProcessedMsgs{ Msgs: h.msgQueue, Timestamp: time.Now().UnixNano(), Save: true, @@ -64,7 +66,7 @@ func (h *Host) txHandler(args nodetypes.TxHandlerArgs) error { if msg, err := h.oracleTxHandler(args.BlockHeight, args.Tx); err != nil { return err } else if msg != nil { - h.processedMsgs = append(h.processedMsgs, nodetypes.ProcessedMsgs{ + h.processedMsgs = append(h.processedMsgs, btypes.ProcessedMsgs{ Msgs: []sdk.Msg{msg}, Timestamp: time.Now().UnixNano(), Save: false, diff --git a/executor/host/host.go b/executor/host/host.go index 59f1f5c..2a1f11d 100644 --- a/executor/host/host.go +++ b/executor/host/host.go @@ -2,29 +2,37 @@ package host import ( "context" - "fmt" "go.uber.org/zap" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + + "github.com/initia-labs/OPinit/x/ophost" ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" + executortypes "github.com/initia-labs/opinit-bots-go/executor/types" + "github.com/initia-labs/opinit-bots-go/keys" "github.com/initia-labs/opinit-bots-go/node" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" - - "cosmossdk.io/core/address" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" ) type childNode interface { GetAddressStr() (string, error) - AccountCodec() address.Codec HasKey() bool - BroadcastMsgs(nodetypes.ProcessedMsgs) - ProcessedMsgsToRawKV([]nodetypes.ProcessedMsgs, bool) ([]types.RawKV, error) + BroadcastMsgs(btypes.ProcessedMsgs) + ProcessedMsgsToRawKV([]btypes.ProcessedMsgs, bool) ([]types.RawKV, error) QueryNextL1Sequence() (uint64, error) + + GetMsgFinalizeTokenDeposit(string, string, sdk.Coin, uint64, uint64, string, []byte) (sdk.Msg, error) + GetMsgUpdateOracle( + height uint64, + data []byte, + ) (sdk.Msg, error) } type batchNode interface { @@ -47,20 +55,29 @@ type Host struct { cfg nodetypes.NodeConfig db types.DB logger *zap.Logger - cdc codec.Codec - ac address.Codec ophostQueryClient ophosttypes.QueryClient - processedMsgs []nodetypes.ProcessedMsgs + processedMsgs []btypes.ProcessedMsgs msgQueue []sdk.Msg } func NewHost( version uint8, relayOracle bool, cfg nodetypes.NodeConfig, - db types.DB, logger *zap.Logger, cdc codec.Codec, txConfig client.TxConfig, + db types.DB, logger *zap.Logger, bech32Prefix, batchSubmitter string, ) *Host { - node, err := node.NewNode(cfg, db, logger, cdc, txConfig) + appCodec, txConfig, err := GetCodec(bech32Prefix) + if err != nil { + panic(err) + } + + if batchSubmitter != "" { + cfg.ProcessType = nodetypes.PROCESS_TYPE_ONLY_BROADCAST + cfg.BroadcasterConfig.Bech32Prefix = bech32Prefix + cfg.BroadcasterConfig.KeyringConfig.Address = batchSubmitter + } + + node, err := node.NewNode(cfg, db, logger, appCodec, txConfig) if err != nil { panic(err) } @@ -75,18 +92,25 @@ func NewHost( db: db, logger: logger, - cdc: cdc, - ac: cdc.InterfaceRegistry().SigningContext().AddressCodec(), + ophostQueryClient: ophosttypes.NewQueryClient(node.GetRPCClient()), - ophostQueryClient: ophosttypes.NewQueryClient(node), - - processedMsgs: make([]nodetypes.ProcessedMsgs, 0), + processedMsgs: make([]btypes.ProcessedMsgs, 0), msgQueue: make([]sdk.Msg, 0), } return h } +func GetCodec(bech32Prefix string) (codec.Codec, client.TxConfig, error) { + unlock := keys.SetSDKConfigContext(bech32Prefix) + defer unlock() + + return keys.CreateCodec([]keys.RegisterInterfaces{ + auth.AppModuleBasic{}.RegisterInterfaces, + ophost.AppModuleBasic{}.RegisterInterfaces, + }) +} + func (h *Host) Initialize(child childNode, batch batchNode, bridgeId int64) (err error) { h.child = child h.batch = batch @@ -98,19 +122,12 @@ func (h *Host) Initialize(child childNode, batch batchNode, bridgeId int64) (err } h.registerHandlers() - return nil } -func (h *Host) Start(ctx context.Context, errCh chan error) { - defer func() { - if r := recover(); r != nil { - h.logger.Error("host panic", zap.Any("recover", r)) - errCh <- fmt.Errorf("host panic: %v", r) - } - }() - - h.node.Start(ctx, errCh, nodetypes.PROCESS_TYPE_DEFAULT) +func (h *Host) Start(ctx context.Context) { + h.logger.Info("host start", zap.Uint64("height", h.node.GetHeight())) + h.node.Start(ctx) } func (h *Host) registerHandlers() { @@ -120,33 +137,42 @@ func (h *Host) registerHandlers() { h.node.RegisterEventHandler(ophosttypes.EventTypeProposeOutput, h.proposeOutputHandler) h.node.RegisterEventHandler(ophosttypes.EventTypeFinalizeTokenWithdrawal, h.finalizeWithdrawalHandler) h.node.RegisterEventHandler(ophosttypes.EventTypeRecordBatch, h.recordBatchHandler) + h.node.RegisterEventHandler(ophosttypes.EventTypeUpdateBatchInfo, h.updateBatchInfoHandler) h.node.RegisterEndBlockHandler(h.endBlockHandler) } -func (h Host) BroadcastMsgs(msgs nodetypes.ProcessedMsgs) { - if !h.node.HasKey() { +func (h *Host) RegisterDAHandlers() { + h.node.RegisterEventHandler(ophosttypes.EventTypeRecordBatch, h.recordBatchHandler) +} + +func (h Host) BroadcastMsgs(msgs btypes.ProcessedMsgs) { + if len(msgs.Msgs) == 0 { return } - h.node.BroadcastMsgs(msgs) + h.node.MustGetBroadcaster().BroadcastMsgs(msgs) } -func (h Host) ProcessedMsgsToRawKV(msgs []nodetypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { - return h.node.ProcessedMsgsToRawKV(msgs, delete) +func (h Host) ProcessedMsgsToRawKV(msgs []btypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { + if len(msgs) == 0 { + return nil, nil + } + + return h.node.MustGetBroadcaster().ProcessedMsgsToRawKV(msgs, delete) } -func (h *Host) SetBridgeId(brigeId int64) { - h.bridgeId = brigeId +func (h *Host) SetBridgeId(bridgeId int64) { + h.bridgeId = bridgeId } -func (h Host) AccountCodec() address.Codec { - return h.ac +func (h Host) BridgeId() int64 { + return h.bridgeId } func (h Host) HasKey() bool { - return h.node.HasKey() + return h.node.HasBroadcaster() } -func (ch Host) GetHeight() uint64 { - return ch.node.GetHeight() +func (h Host) GetHeight() uint64 { + return h.node.GetHeight() } diff --git a/executor/host/msgs.go b/executor/host/msgs.go new file mode 100644 index 0000000..2d4b19f --- /dev/null +++ b/executor/host/msgs.go @@ -0,0 +1,49 @@ +package host + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" +) + +func (h Host) GetMsgProposeOutput( + bridgeId uint64, + outputIndex uint64, + l2BlockNumber uint64, + outputRoot []byte, +) (sdk.Msg, error) { + sender, err := h.node.MustGetBroadcaster().GetAddressString() + if err != nil { + return nil, err + } + + msg := ophosttypes.NewMsgProposeOutput( + sender, + bridgeId, + outputIndex, + l2BlockNumber, + outputRoot, + ) + err = msg.Validate(h.node.AccountCodec()) + if err != nil { + return nil, err + } + return msg, nil +} + +func (h Host) CreateBatchMsg(batchBytes []byte) (sdk.Msg, error) { + submitter, err := h.node.MustGetBroadcaster().GetAddressString() + if err != nil { + return nil, err + } + + msg := ophosttypes.NewMsgRecordBatch( + submitter, + uint64(h.bridgeId), + batchBytes, + ) + err = msg.Validate(h.node.AccountCodec()) + if err != nil { + return nil, err + } + return msg, nil +} diff --git a/executor/host/oracle.go b/executor/host/oracle.go index f30f0dd..9455632 100644 --- a/executor/host/oracle.go +++ b/executor/host/oracle.go @@ -1,8 +1,6 @@ package host import ( - opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" - comettypes "github.com/cometbft/cometbft/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,21 +12,8 @@ func (h *Host) oracleTxHandler(blockHeight uint64, extCommitBz comettypes.Tx) (s if !h.relayOracle { return nil, nil } - - sender, err := h.child.GetAddressStr() - if err != nil { - return nil, err - } - - msg := opchildtypes.NewMsgUpdateOracle( - sender, + return h.child.GetMsgUpdateOracle( blockHeight, extCommitBz, ) - - err = msg.Validate(h.child.AccountCodec()) - if err != nil { - return nil, err - } - return msg, nil } diff --git a/executor/host/query.go b/executor/host/query.go index e704f22..dde4152 100644 --- a/executor/host/query.go +++ b/executor/host/query.go @@ -1,19 +1,20 @@ package host import ( - "errors" - + sdk "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" - "github.com/initia-labs/opinit-bots-go/node" + + "github.com/initia-labs/opinit-bots-go/node/rpcclient" ) +func (h Host) GetAddress() sdk.AccAddress { + return h.node.MustGetBroadcaster().GetAddress() +} + func (h Host) GetAddressStr() (string, error) { - addr := h.node.GetAddress() - if addr == nil { - return "", errors.New("nil address") - } - return h.ac.BytesToString(addr) + return h.node.MustGetBroadcaster().GetAddressString() } func (h Host) QueryLastOutput() (*ophosttypes.QueryOutputProposalResponse, error) { @@ -24,7 +25,7 @@ func (h Host) QueryLastOutput() (*ophosttypes.QueryOutputProposalResponse, error Reverse: true, }, } - ctx, cancel := node.GetQueryContext(0) + ctx, cancel := rpcclient.GetQueryContext(0) defer cancel() res, err := h.ophostQueryClient.OutputProposals(ctx, req) @@ -42,7 +43,7 @@ func (h Host) QueryOutput(outputIndex uint64) (*ophosttypes.QueryOutputProposalR BridgeId: uint64(h.bridgeId), OutputIndex: outputIndex, } - ctx, cancel := node.GetQueryContext(0) + ctx, cancel := rpcclient.GetQueryContext(0) defer cancel() return h.ophostQueryClient.OutputProposal(ctx, req) @@ -52,7 +53,7 @@ func (h Host) QueryBatchInfos() (*ophosttypes.QueryBatchInfosResponse, error) { req := &ophosttypes.QueryBatchInfosRequest{ BridgeId: uint64(h.bridgeId), } - ctx, cancel := node.GetQueryContext(0) + ctx, cancel := rpcclient.GetQueryContext(0) defer cancel() return h.ophostQueryClient.BatchInfos(ctx, req) } diff --git a/executor/host/withdraw.go b/executor/host/withdraw.go index eb4c40a..e79582a 100644 --- a/executor/host/withdraw.go +++ b/executor/host/withdraw.go @@ -42,7 +42,9 @@ func (h *Host) proposeOutputHandler(args nodetypes.EventHandlerArgs) error { } } } + h.handleProposeOutput(bridgeId, proposer, outputIndex, l2BlockNumber, outputRoot) + return nil } diff --git a/executor/host/withdraw_test.go b/executor/host/withdraw_test.go new file mode 100644 index 0000000..8d72135 --- /dev/null +++ b/executor/host/withdraw_test.go @@ -0,0 +1,35 @@ +package host + +// import ( +// "testing" + +// "github.com/initia-labs/opinit-bots-go/db" +// "github.com/initia-labs/opinit-bots-go/node/types" +// "github.com/stretchr/testify/require" +// "go.uber.org/zap" +// "go.uber.org/zap/zaptest/observer" +// ) + +// func defaultConfig() types.NodeConfig { +// return types.NodeConfig{ +// RPC: "http://localhost:26657", +// ChainID: "testnet-1", +// Account: "test-acc", +// GasPrice: "0.15uinit", +// } +// } + +// func logCapture() (*zap.Logger, *observer.ObservedLogs) { +// core, logs := observer.New(zap.InfoLevel) +// return zap.New(core), logs +// } + +// func Test_handleProposeOutput(t *testing.T) { +// db, err := db.NewDB(t.TempDir()) +// require.NoError(t, err) + +// defer db.Close() + +// logger, logs := logCapture() +// host := NewHost(1, true, defaultConfig(), db, logger, t.TempDir(), "") +// } diff --git a/executor/types/batch.go b/executor/types/batch.go index 9ea92ed..2d747f6 100644 --- a/executor/types/batch.go +++ b/executor/types/batch.go @@ -1,18 +1,25 @@ package types import ( - nodetypes "github.com/initia-labs/opinit-bots-go/node/types" + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" "github.com/initia-labs/opinit-bots-go/types" ) type DANode interface { - GetAddressStr() (string, error) + Start(context.Context) HasKey() bool - BroadcastMsgs(nodetypes.ProcessedMsgs) - ProcessedMsgsToRawKV(processedMsgs []nodetypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) + CreateBatchMsg([]byte) (sdk.Msg, error) + BroadcastMsgs(btypes.ProcessedMsgs) + ProcessedMsgsToRawKV(processedMsgs []btypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) } +// BatchHeader is the header of a batch type BatchHeader struct { - End uint64 `json:"end"` + // last l2 block height which is included in the batch + End uint64 `json:"end"` + // checksums of all chunks Chunks [][]byte `json:"chunks"` } diff --git a/executor/types/config.go b/executor/types/config.go index ae67e76..ed40d76 100644 --- a/executor/types/config.go +++ b/executor/types/config.go @@ -3,6 +3,7 @@ package types import ( "errors" + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" ) @@ -25,23 +26,21 @@ type Config struct { L2ChainID string `json:"l2_chain_id"` DAChainID string `json:"da_chain_id"` - // OutputSubmitterMnemonic is the mnemonic phrase for the output submitter, + L1Bech32Prefix string `json:"l1_bech32_prefix"` + L2Bech32Prefix string `json:"l2_bech32_prefix"` + DABech32Prefix string `json:"da_bech32_prefix"` + + // OutputSubmitter is the key name in the keyring for the output submitter, // which is used to relay the output transaction from l2 to l1. // // If you don't want to use the output submitter feature, you can leave it empty. - OutputSubmitterMnemonic string `json:"output_submitter_mnemonic"` + OutputSubmitter string `json:"output_submitter"` - // BridgeExecutorMnemonic is the mnemonic phrase for the bridge executor, + // BridgeExecutor is the key name in the keyring for the bridge executor, // which is used to relay initiate token bridge transaction from l1 to l2. // // If you don't want to use the bridge executor feature, you can leave it empty. - BridgeExecutorMnemonic string `json:"bridge_executor_mnemonic"` - - // BatchSubmitterMnemonic is the mnemonic phrase for the batch submitter, - // which is used to relay the batch of blocks from l2 to da. - // - // If you don't want to use the batch submitter feature, you can leave it empty. - BatchSubmitterMnemonic string `json:"batch_submitter_mnemonic"` + BridgeExecutor string `json:"bridge_executor"` // RelayOracle is the flag to enable the oracle relay feature. RelayOracle bool `json:"relay_oracle"` @@ -62,7 +61,7 @@ type HostConfig struct { func DefaultConfig() *Config { return &Config{ Version: 1, - ListenAddress: "tcp://localhost:3000", + ListenAddress: "localhost:3000", L1RPCAddress: "tcp://localhost:26657", L2RPCAddress: "tcp://localhost:27657", @@ -76,9 +75,18 @@ func DefaultConfig() *Config { L2ChainID: "testnet-l2-1", DAChainID: "testnet-l3-1", - OutputSubmitterMnemonic: "", - BridgeExecutorMnemonic: "", - BatchSubmitterMnemonic: "", + L1Bech32Prefix: "init", + L2Bech32Prefix: "init", + DABech32Prefix: "init", + + OutputSubmitter: "", + BridgeExecutor: "", + + RelayOracle: true, + + MaxChunks: 5000, + MaxChunkSize: 300000, // 300KB + MaxSubmissionTime: 60 * 60, // 1 hour } } @@ -109,31 +117,77 @@ func (cfg Config) Validate() error { if cfg.ListenAddress == "" { return errors.New("listen address is required") } + + if cfg.L1Bech32Prefix == "" { + return errors.New("L1 bech32 prefix is required") + } + if cfg.L2Bech32Prefix == "" { + return errors.New("L2 bech32 prefix is required") + } + if cfg.DABech32Prefix == "" { + return errors.New("DA bech32 prefix is required") + } + return nil } -func (cfg Config) L1NodeConfig() nodetypes.NodeConfig { - return nodetypes.NodeConfig{ - RPC: cfg.L1RPCAddress, - ChainID: cfg.L1ChainID, - Mnemonic: cfg.OutputSubmitterMnemonic, +func (cfg Config) L1NodeConfig(homePath string) nodetypes.NodeConfig { + nc := nodetypes.NodeConfig{ + RPC: cfg.L1RPCAddress, + ProcessType: nodetypes.PROCESS_TYPE_DEFAULT, } + + if cfg.OutputSubmitter != "" { + nc.BroadcasterConfig = &btypes.BroadcasterConfig{ + ChainID: cfg.L1ChainID, + GasPrice: cfg.L1GasPrice, + Bech32Prefix: cfg.L1Bech32Prefix, + KeyringConfig: btypes.KeyringConfig{ + Name: cfg.OutputSubmitter, + HomePath: homePath, + }, + } + } + + return nc } -func (cfg Config) L2NodeConfig() nodetypes.NodeConfig { - return nodetypes.NodeConfig{ - RPC: cfg.L2RPCAddress, - ChainID: cfg.L2ChainID, - Mnemonic: cfg.BridgeExecutorMnemonic, +func (cfg Config) L2NodeConfig(homePath string) nodetypes.NodeConfig { + nc := nodetypes.NodeConfig{ + RPC: cfg.L2RPCAddress, + ProcessType: nodetypes.PROCESS_TYPE_DEFAULT, } + + if cfg.BridgeExecutor != "" { + nc.BroadcasterConfig = &btypes.BroadcasterConfig{ + ChainID: cfg.L2ChainID, + GasPrice: cfg.L2GasPrice, + Bech32Prefix: cfg.L2Bech32Prefix, + KeyringConfig: btypes.KeyringConfig{ + Name: cfg.BridgeExecutor, + HomePath: homePath, + }, + } + } + + return nc } -func (cfg Config) DANodeConfig() nodetypes.NodeConfig { - return nodetypes.NodeConfig{ - RPC: cfg.DARPCAddress, - ChainID: cfg.DAChainID, - Mnemonic: cfg.BatchSubmitterMnemonic, +func (cfg Config) DANodeConfig(homePath string) nodetypes.NodeConfig { + nc := nodetypes.NodeConfig{ + RPC: cfg.DARPCAddress, + ProcessType: nodetypes.PROCESS_TYPE_DEFAULT, + BroadcasterConfig: &btypes.BroadcasterConfig{ + ChainID: cfg.DAChainID, + GasPrice: cfg.DAGasPrice, + Bech32Prefix: cfg.DABech32Prefix, + KeyringConfig: btypes.KeyringConfig{ + HomePath: homePath, + }, + }, } + + return nc } func (cfg Config) BatchConfig() BatchConfig { diff --git a/executor/types/const.go b/executor/types/const.go index 36b77b9..7fc4166 100644 --- a/executor/types/const.go +++ b/executor/types/const.go @@ -5,4 +5,7 @@ const ( ChildNodeName = "child" BatchNodeName = "batch" MerkleName = "merkle" + + DAHostNodeName = "da_host" + DACelestiaNodeName = "da_celestia" ) diff --git a/go.mod b/go.mod index a3a1461..28c6c92 100644 --- a/go.mod +++ b/go.mod @@ -1,98 +1,57 @@ module github.com/initia-labs/opinit-bots-go -go 1.22.2 +go 1.22.5 require ( - github.com/cometbft/cometbft v0.38.9 + github.com/celestiaorg/go-square/v2 v2.0.0-rc0 + github.com/cometbft/cometbft v0.38.10 github.com/cosmos/cosmos-sdk v0.50.8 github.com/gofiber/fiber/v2 v2.52.5 - github.com/initia-labs/OPinit v0.4.0 - github.com/initia-labs/initia v0.4.0 + github.com/initia-labs/OPinit v0.4.1 github.com/pkg/errors v0.9.1 - github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.18.2 + github.com/spf13/cobra v1.8.1 + github.com/spf13/viper v1.19.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.24.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.37.0 // indirect - cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 // indirect - cosmossdk.io/x/evidence v0.1.0 // indirect - cosmossdk.io/x/feegrant v0.1.0 // indirect - cosmossdk.io/x/upgrade v0.1.1 // indirect + cosmossdk.io/x/upgrade v0.1.3 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect - github.com/IGLOU-EU/go-wildcard v1.0.3 // indirect github.com/andybalholm/brotli v1.0.5 // indirect - github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 // indirect - github.com/aws/aws-sdk-go v1.44.312 // indirect - github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/celestiaorg/nmt v0.22.0 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect - github.com/cosmos/ibc-go/v8 v8.2.1 // indirect - github.com/cosmos/interchain-security/v5 v5.0.0-rc0 // indirect + github.com/cosmos/ibc-go/v8 v8.4.0 // indirect + github.com/cosmos/interchain-security/v5 v5.0.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect - github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/initia-labs/OPinit/api v0.4.0 // indirect - github.com/initia-labs/movevm v0.3.4 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/initia-labs/OPinit/api v0.4.1 // indirect github.com/lib/pq v1.10.9 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/highwayhash v1.0.2 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6 // indirect github.com/oklog/run v1.1.0 // indirect - github.com/rakyll/statik v0.1.7 // indirect - github.com/rivo/uniseg v0.2.0 // indirect + github.com/opencontainers/runc v1.1.12 // indirect + github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/skip-mev/block-sdk/v2 v2.1.2 // indirect - github.com/skip-mev/slinky v0.4.3 // indirect + github.com/skip-mev/slinky v1.0.5 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.51.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.22.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.162.0 // indirect - google.golang.org/appengine v1.6.8 // indirect nhooyr.io/websocket v1.8.6 // indirect ) @@ -100,12 +59,12 @@ require ( cosmossdk.io/api v0.7.5 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/depinject v1.0.0 // indirect cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.1.0 // indirect - cosmossdk.io/x/tx v0.13.3 // indirect + cosmossdk.io/x/tx v0.13.3 filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -116,16 +75,16 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.10.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.5.0 github.com/cosmos/iavl v1.1.2 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -139,7 +98,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/fatih/color v1.16.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -148,14 +107,14 @@ require ( github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect @@ -166,10 +125,9 @@ require ( github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -180,9 +138,9 @@ require ( github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -204,17 +162,17 @@ require ( go.etcd.io/bbolt v1.3.8 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.24.0 - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect + golang.org/x/crypto v0.25.0 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sync v0.7.0 + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect + google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 241628b..8bfa2c0 100644 --- a/go.sum +++ b/go.sum @@ -1,189 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.37.0 h1:WI8CsaFO8Q9KjPVtsZ5Cmi0dXV25zMoX0FklT7c3Jm4= -cloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 h1:Hr1t0fCq1nbFC7hLs0Xvy9WAiH7Iti5iVLXMM5C37F0= @@ -192,8 +17,8 @@ cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= @@ -202,16 +27,16 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= -cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= -cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= -cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= -cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= +cosmossdk.io/x/upgrade v0.1.3 h1:q4XpXc6zp0dX6x74uBtfN6+J7ikaQev5Bla6Q0ADLK8= +cosmossdk.io/x/upgrade v0.1.3/go.mod h1:jOdQhnaY5B8CDUoUbed23/Lre0Dk+r6BMQE40iKlVVQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -227,11 +52,9 @@ github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dX github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/IGLOU-EU/go-wildcard v1.0.3 h1:r8T46+8/9V1STciXJomTWRpPEv4nGJATDbJkdU0Nou0= -github.com/IGLOU-EU/go-wildcard v1.0.3/go.mod h1:/qeV4QLmydCbwH0UMQJmXDryrFKJknWi/jjO8IiuQfY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= @@ -253,8 +76,6 @@ github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 h1:/OtHsUoaVegyyGQ9/Ycm5vrC3xTTyj4+N/HsJ0wwAGA= -github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833/go.mod h1:zUz5maIUAS+tl1lC+lJR7HUf0vVnHk6W7bCvN+DzjME= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -262,7 +83,6 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= @@ -288,6 +108,10 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/celestiaorg/go-square/v2 v2.0.0-rc0 h1:BNV50WdCcDhIhkgbZ3DGeVYuFePZ5Hu6AxjPWX7XVoI= +github.com/celestiaorg/go-square/v2 v2.0.0-rc0/go.mod h1:eeaU8f8jBpk3ZS/gaDZIlTesJR2F51QAmveNzWH6aEU= +github.com/celestiaorg/nmt v0.22.0 h1:AGtfmBiVgreR1KkIV5R7XFNeMp/H4IUDLlBbLjZZ3zk= +github.com/celestiaorg/nmt v0.22.0/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -299,49 +123,42 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= -github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= -github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= -github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= -github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.9 h1:cJBJBG0mPKz+sqelCi/hlfZjadZQGdDNnu6YQ1ZsUHQ= -github.com/cometbft/cometbft v0.38.9/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ= +github.com/cometbft/cometbft v0.38.10 h1:2ePuglchT+j0Iao+cfmt/nw5U7K2lnGDzXSUPGVdXaU= +github.com/cometbft/cometbft v0.38.10/go.mod h1:jHPx9vQpWzPHEAiYI/7EDKaB1NXhK6o3SArrrY8ExKc= github.com/cometbft/cometbft-db v0.10.0 h1:VMBQh88zXn64jXVvj39tlu/IgsGR84T7ImjS523DCiU= github.com/cometbft/cometbft-db v0.10.0/go.mod h1:7RR7NRv99j7keWJ5IkE9iZibUTKYdtepXTp7Ra0FxKk= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -369,21 +186,19 @@ github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52 github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= -github.com/cosmos/ibc-go/v8 v8.2.1 h1:MTsnZZjxvGD4Fv5pYyx5UkELafSX0rlPt6IfsE2BpTQ= -github.com/cosmos/ibc-go/v8 v8.2.1/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8= +github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+cE= +github.com/cosmos/ibc-go/v8 v8.4.0/go.mod h1:zh6x1osR0hNvEcFrC/lhGD08sMfQmr9wHVvZ/mRWMCs= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/interchain-security/v5 v5.0.0-rc0 h1:Sh5CDqLDS32q2WsO9k5j3NyBzmW+mm66c+kgRniCthA= -github.com/cosmos/interchain-security/v5 v5.0.0-rc0/go.mod h1:h/RkwOppo5AJj+1pkQyfjqU1MPdpohD/S6oEeAXpGZY= +github.com/cosmos/interchain-security/v5 v5.0.0 h1:iwHu1nFbXuYfa13isEgm6hkHU+2t/t56YjcfyP3PnQA= +github.com/cosmos/interchain-security/v5 v5.0.0/go.mod h1:h/RkwOppo5AJj+1pkQyfjqU1MPdpohD/S6oEeAXpGZY= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= @@ -427,19 +242,14 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -465,8 +275,6 @@ github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -481,7 +289,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -518,22 +325,13 @@ github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2 github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -541,7 +339,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -552,7 +349,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= @@ -569,16 +365,9 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -586,55 +375,20 @@ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= @@ -645,8 +399,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -664,8 +418,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= -github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= +github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -688,8 +442,8 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -713,11 +467,8 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= -github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= @@ -725,12 +476,12 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/initia-labs/OPinit v0.4.0 h1:ICfZRbJ+KqgWt9z8seMl+6sRKbm40ELFvruvWh/KD40= -github.com/initia-labs/OPinit v0.4.0/go.mod h1:qu3h66dk3EF3Ehnr0bRuq0ezxzVKtQvy7G/waQFG9nM= -github.com/initia-labs/OPinit/api v0.4.0 h1:i3Cz5qPFpezeYh2R9TW2riPBb5tHwLOWOx3hrcWrM+o= -github.com/initia-labs/OPinit/api v0.4.0/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= -github.com/initia-labs/initia v0.4.0 h1:iJeFK5uaHF90YFyKoPztUH2hem5eKDpz42kg2dqJYB8= -github.com/initia-labs/initia v0.4.0/go.mod h1:dWCjY44C38bLlyTPXdXxzdXLwh3X1bAsiARJ0jfVqDg= +github.com/initia-labs/OPinit v0.4.1 h1:g6IVEAOe2X31pgjk/q0zg4R1GfNj2QP3q5s3HMcWm8w= +github.com/initia-labs/OPinit v0.4.1/go.mod h1:n0eqwOnVGE1vuTnW+3jzyEXfE4ndTM0vCRGmPu9VvUc= +github.com/initia-labs/OPinit/api v0.4.1 h1:Q8etW92LiwekKZxzDYVFdiHF3uOpEA4nyajy8zpcxB0= +github.com/initia-labs/OPinit/api v0.4.1/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= +github.com/initia-labs/initia v0.4.1 h1:P9olCgk4BPZ+dH5wCWKajzHZzjg8zPNrXx+J1Mpexa8= +github.com/initia-labs/initia v0.4.1/go.mod h1:cmzwPsLJAP4farjNC62Vkc7wGieRCKvBBUu5trNJyNQ= github.com/initia-labs/movevm v0.3.4 h1:kzqs6uzTq0f5peZJNzLq/1qgnmAFfC+I9eCyPBducxM= github.com/initia-labs/movevm v0.3.4/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= @@ -738,8 +489,6 @@ github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4E github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -751,8 +500,6 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -761,9 +508,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -779,8 +525,6 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= @@ -805,7 +549,6 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -846,8 +589,6 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6 h1:YQ6I+9F24PD9U/Q83/t/DCPwye8IeHXOrQWorPx2aSE= -github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6/go.mod h1:fkfElMT7VJZXXqywx+OE6qsEXddT/fwKX5XNdIl747U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -921,8 +662,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -937,8 +678,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= -github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -947,15 +688,14 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -987,12 +727,10 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skip-mev/block-sdk/v2 v2.1.2 h1:fNKbrb+PVVzuU0JiSuWgBV4Afj5zZ1VeHQJp88wSl1g= -github.com/skip-mev/block-sdk/v2 v2.1.2/go.mod h1:kIq7SMva0/eHKTCiG/oI5XGxD4HNVK0t71TrUZqHcvA= github.com/skip-mev/chaintestutil v0.0.0-20240116134208-3e49bf514803 h1:VRRVYN3wsOIOqVT3e3nDh3vyUl6RvF9QwdK4BvgPP9c= github.com/skip-mev/chaintestutil v0.0.0-20240116134208-3e49bf514803/go.mod h1:LF2koCTmygQnz11yjSfHvNP8axdyZ2lTEw0EwI+dnno= -github.com/skip-mev/slinky v0.4.3 h1:4LWqeDa2and84GXG3HgAAmDa145+TG2WQ0uRDAU7AzA= -github.com/skip-mev/slinky v0.4.3/go.mod h1:6LkqFirdIh1FfHijGyRf1MeiBgVshDseTH/jHTOVQVs= +github.com/skip-mev/slinky v1.0.5 h1:fQm486VeAbNL8EBcvb9f9OmDLB8zEU17iifmaOmmVOM= +github.com/skip-mev/slinky v1.0.5/go.mod h1:I47xFOLQZ5d0f9cH7k9RtKoakIPLfbT0sJhinOvASBM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1010,16 +748,16 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1038,7 +776,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -1050,6 +787,12 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= +github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -1057,7 +800,6 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -1070,12 +812,9 @@ github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVS github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= @@ -1086,27 +825,19 @@ go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= -go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= -go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= -go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= -go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1115,8 +846,6 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -1133,55 +862,31 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1194,96 +899,37 @@ golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1301,9 +947,6 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1314,97 +957,51 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= @@ -1413,292 +1010,69 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= -google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8 h1:8eadJkXbwDEMNwcB5O0s5Y5eCfyuCLdvaiOIaGTrWmQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240304212257-790db918fca8/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1712,7 +1086,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= @@ -1724,7 +1097,6 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -1752,19 +1124,12 @@ gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/keys/address.go b/keys/address.go new file mode 100644 index 0000000..2a502d0 --- /dev/null +++ b/keys/address.go @@ -0,0 +1,27 @@ +package keys + +import ( + "sync" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func EncodeBech32AccAddr(addr sdk.AccAddress, prefix string) (string, error) { + return sdk.Bech32ifyAddressBytes(prefix, addr) +} + +func DecodeBech32AccAddr(addr string, prefix string) (sdk.AccAddress, error) { + return sdk.GetFromBech32(addr, prefix) +} + +var sdkConfigMutex sync.Mutex + +// SetSDKContext sets the SDK config to the given bech32 prefixes +func SetSDKConfigContext(prefix string) func() { + sdkConfigMutex.Lock() + sdkConf := sdk.GetConfig() + sdkConf.SetBech32PrefixForAccount(prefix, prefix+"pub") + sdkConf.SetBech32PrefixForValidator(prefix+"valoper", prefix+"valoperpub") + sdkConf.SetBech32PrefixForConsensusNode(prefix+"valcons", prefix+"valconspub") + return sdkConfigMutex.Unlock +} diff --git a/keys/codec.go b/keys/codec.go new file mode 100644 index 0000000..9b92e74 --- /dev/null +++ b/keys/codec.go @@ -0,0 +1,36 @@ +package keys + +import ( + "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codecaddress "github.com/cosmos/cosmos-sdk/codec/address" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/std" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/cosmos/gogoproto/proto" +) + +type RegisterInterfaces func(registry codectypes.InterfaceRegistry) + +func CreateCodec(registerFns []RegisterInterfaces) (codec.Codec, client.TxConfig, error) { + interfaceRegistry, err := codectypes.NewInterfaceRegistryWithOptions(codectypes.InterfaceRegistryOptions{ + ProtoFiles: proto.HybridResolver, + SigningOptions: signing.Options{ + AddressCodec: codecaddress.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: codecaddress.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + }, + }) + if err != nil { + return nil, nil, err + } + appCodec := codec.NewProtoCodec(interfaceRegistry) + std.RegisterInterfaces(interfaceRegistry) + for _, fn := range registerFns { + fn(interfaceRegistry) + } + + txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes) + return appCodec, txConfig, nil +} diff --git a/keys/keyring.go b/keys/keyring.go new file mode 100644 index 0000000..ee3a9fd --- /dev/null +++ b/keys/keyring.go @@ -0,0 +1,26 @@ +package keys + +import ( + "io" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/go-bip39" +) + +func GetKeyBase(chainId string, dir string, cdc codec.Codec, userInput io.Reader) (keyring.Keyring, error) { + return keyring.New(chainId, "os", dir, userInput, cdc) +} + +// CreateMnemonic generates a new mnemonic. +func CreateMnemonic() (string, error) { + entropySeed, err := bip39.NewEntropy(256) + if err != nil { + return "", err + } + mnemonic, err := bip39.NewMnemonic(entropySeed) + if err != nil { + return "", err + } + return mnemonic, nil +} diff --git a/merkle/merkle.go b/merkle/merkle.go index ac7b197..5fe4c8a 100644 --- a/merkle/merkle.go +++ b/merkle/merkle.go @@ -56,11 +56,11 @@ func NewMerkle(db types.DB, nodeGeneratorFn NodeGeneratorFn) (*Merkle, error) { // InitializeWorkingTree resets the working tree with the given tree index and start leaf index. func (m *Merkle) InitializeWorkingTree(treeIndex uint64, startLeafIndex uint64) error { if m.workingTree != nil && !m.workingTree.Done { - return fmt.Errorf("failed to initialize working tree (`%d`); working tree is not finalized", treeIndex) + return fmt.Errorf("failed to initialize working tree index: %d; working tree is not finalized", treeIndex) } if treeIndex < 1 || startLeafIndex < 1 { - return fmt.Errorf("failed to initialize working tree (`%d`, `%d`); invalid index", treeIndex, startLeafIndex) + return fmt.Errorf("failed to initialize working tree index: %d, leaf: %d; invalid index", treeIndex, startLeafIndex) } m.workingTree = &merkletypes.TreeInfo{ diff --git a/node/account.go b/node/broadcaster/account.go similarity index 54% rename from node/account.go rename to node/broadcaster/account.go index 99e8e96..231d9d2 100644 --- a/node/account.go +++ b/node/broadcaster/account.go @@ -1,52 +1,58 @@ -package node +package broadcaster import ( "context" "fmt" "strconv" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" + + "github.com/initia-labs/opinit-bots-go/keys" ) -var _ client.AccountRetriever = &Node{} +var _ client.AccountRetriever = &Broadcaster{} -func (n *Node) loadAccount() error { - account, err := n.GetAccount(n.getClientCtx(), n.keyAddress) +func (b *Broadcaster) loadAccount() error { + account, err := b.GetAccount(b.getClientCtx(), b.keyAddress) if err != nil { return err } - n.txf = n.txf.WithAccountNumber(account.GetAccountNumber()) - n.txf = n.txf.WithSequence(account.GetSequence()) + b.txf = b.txf.WithAccountNumber(account.GetAccountNumber()).WithSequence(account.GetSequence()) return nil } -func (n Node) GetAddress() sdk.AccAddress { - return n.keyAddress +func (b Broadcaster) GetAddress() sdk.AccAddress { + return b.keyAddress +} + +func (b Broadcaster) GetAddressString() (string, error) { + return keys.EncodeBech32AccAddr(b.keyAddress, b.cfg.Bech32Prefix) } // GetAccount queries for an account given an address and a block height. An // error is returned if the query or decoding fails. -func (n *Node) GetAccount(clientCtx client.Context, addr sdk.AccAddress) (client.Account, error) { - account, _, err := n.GetAccountWithHeight(clientCtx, addr) +func (b *Broadcaster) GetAccount(clientCtx client.Context, addr sdk.AccAddress) (client.Account, error) { + account, _, err := b.GetAccountWithHeight(clientCtx, addr) return account, err } // GetAccountWithHeight queries for an account given an address. Returns the // height of the query with the account. An error is returned if the query // or decoding fails. -func (n *Node) GetAccountWithHeight(_ client.Context, addr sdk.AccAddress) (client.Account, int64, error) { +func (b *Broadcaster) GetAccountWithHeight(_ client.Context, addr sdk.AccAddress) (client.Account, int64, error) { var header metadata.MD - address, err := n.EncodeBech32AccAddr(addr) + address, err := keys.EncodeBech32AccAddr(addr, b.cfg.Bech32Prefix) if err != nil { return nil, 0, err } - queryClient := authtypes.NewQueryClient(n) + queryClient := authtypes.NewQueryClient(b.rpcClient) res, err := queryClient.Account(context.Background(), &authtypes.QueryAccountRequest{Address: address}, grpc.Header(&header)) if err != nil { return nil, 0, err @@ -62,9 +68,8 @@ func (n *Node) GetAccountWithHeight(_ client.Context, addr sdk.AccAddress) (clie return nil, 0, fmt.Errorf("failed to parse block height: %w", err) } - //nolint:staticcheck - var acc authtypes.AccountI - if err := n.cdc.UnpackAny(res.Account, &acc); err != nil { + var acc sdk.AccountI + if err := b.cdc.UnpackAny(res.Account, &acc); err != nil { return nil, 0, err } @@ -72,8 +77,8 @@ func (n *Node) GetAccountWithHeight(_ client.Context, addr sdk.AccAddress) (clie } // EnsureExists returns an error if no account exists for the given address else nil. -func (n *Node) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error { - if _, err := n.GetAccount(clientCtx, addr); err != nil { +func (b *Broadcaster) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error { + if _, err := b.GetAccount(clientCtx, addr); err != nil { return err } return nil @@ -81,18 +86,10 @@ func (n *Node) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error // GetAccountNumberSequence returns sequence and account number for the given address. // It returns an error if the account couldn't be retrieved from the state. -func (n *Node) GetAccountNumberSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, uint64, error) { - acc, err := n.GetAccount(clientCtx, addr) +func (b *Broadcaster) GetAccountNumberSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, uint64, error) { + acc, err := b.GetAccount(clientCtx, addr) if err != nil { return 0, 0, err } return acc.GetAccountNumber(), acc.GetSequence(), nil } - -func (n *Node) EncodeBech32AccAddr(addr sdk.AccAddress) (string, error) { - return n.cdc.InterfaceRegistry().SigningContext().AddressCodec().BytesToString(addr) -} - -func (n *Node) DecodeBech32AccAddr(addr string) (sdk.AccAddress, error) { - return n.cdc.InterfaceRegistry().SigningContext().AddressCodec().StringToBytes(addr) -} diff --git a/node/broadcaster/broadcaster.go b/node/broadcaster/broadcaster.go new file mode 100644 index 0000000..3a3caff --- /dev/null +++ b/node/broadcaster/broadcaster.go @@ -0,0 +1,234 @@ +package broadcaster + +import ( + "sync" + "time" + + "go.uber.org/zap" + + rpccoretypes "github.com/cometbft/cometbft/rpc/core/types" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/pkg/errors" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" + "github.com/initia-labs/opinit-bots-go/node/rpcclient" + "github.com/initia-labs/opinit-bots-go/types" +) + +type Broadcaster struct { + cfg btypes.BroadcasterConfig + + db types.DB + cdc codec.Codec + logger *zap.Logger + rpcClient *rpcclient.RPCClient + + txf tx.Factory + txConfig client.TxConfig + + keyBase keyring.Keyring + keyName string + keyAddress sdk.AccAddress + + txChannel chan btypes.ProcessedMsgs + txChannelStopped chan struct{} + + // local pending txs, which is following Queue data structure + pendingTxMu *sync.Mutex + pendingTxs []btypes.PendingTxInfo + + pendingProcessedMsgs []btypes.ProcessedMsgs + + lastProcessedBlockHeight uint64 +} + +func NewBroadcaster( + cfg btypes.BroadcasterConfig, + db types.DB, + logger *zap.Logger, + cdc codec.Codec, + txConfig client.TxConfig, + rpcClient *rpcclient.RPCClient, + status *rpccoretypes.ResultStatus, +) (*Broadcaster, error) { + b := &Broadcaster{ + cdc: cdc, + logger: logger, + db: db, + rpcClient: rpcClient, + + // txf will be initialized in prepareBroadcaster + txConfig: txConfig, + + txChannel: make(chan btypes.ProcessedMsgs), + txChannelStopped: make(chan struct{}), + + pendingTxMu: &sync.Mutex{}, + pendingTxs: make([]btypes.PendingTxInfo, 0), + pendingProcessedMsgs: make([]btypes.ProcessedMsgs, 0), + } + + // fill cfg with default functions + if cfg.PendingTxToProcessedMsgs == nil { + cfg.WithPendingTxToProcessedMsgsFn(b.DefaultPendingTxToProcessedMsgs) + } + if cfg.BuildTxWithMessages == nil { + cfg.WithBuildTxWithMessagesFn(b.DefaultBuildTxWithMessages) + } + + // validate broadcaster config + if err := cfg.Validate(); err != nil { + return nil, errors.Wrap(err, "failed to validate broadcaster config") + } + + // set config after validation + b.cfg = cfg + + // validate rpc client + if rpcClient == nil { + return nil, errors.New("rpc client is nil") + } + + // setup keyring + keyBase, keyringRecord, err := cfg.GetKeyringRecord(cdc, cfg.ChainID) + if err != nil { + return nil, err + } + b.keyBase = keyBase + addr, err := keyringRecord.GetAddress() + if err != nil { + return nil, err + } + b.keyAddress = addr + b.keyName = keyringRecord.Name + + // prepare broadcaster + err = b.prepareBroadcaster(uint64(status.SyncInfo.LatestBlockHeight), status.SyncInfo.LatestBlockTime) + if err != nil { + return nil, err + } + + return b, nil +} + +func (b Broadcaster) getClientCtx() client.Context { + return client.Context{}.WithClient(b.rpcClient). + WithInterfaceRegistry(b.cdc.InterfaceRegistry()). + WithChainID(b.cfg.ChainID). + WithCodec(b.cdc). + WithFromAddress(b.keyAddress) +} + +func (n Broadcaster) GetTxf() tx.Factory { + return n.txf +} + +func (b *Broadcaster) prepareBroadcaster(_ /*lastBlockHeight*/ uint64, lastBlockTime time.Time) error { + b.txf = tx.Factory{}. + WithAccountRetriever(b). + WithChainID(b.cfg.ChainID). + WithTxConfig(b.txConfig). + WithGasAdjustment(btypes.GAS_ADJUSTMENT). + WithGasPrices(b.cfg.GasPrice). + WithKeybase(b.keyBase). + WithSignMode(signing.SignMode_SIGN_MODE_DIRECT) + + err := b.loadAccount() + if err != nil { + return err + } + + dbBatchKVs := make([]types.RawKV, 0) + + loadedPendingTxs, err := b.loadPendingTxs() + if err != nil { + return err + } + + // TODO: handle mismatched sequence & pending txs + if len(loadedPendingTxs) > 0 { + pendingTxTime := time.Unix(0, loadedPendingTxs[0].Timestamp) + + // if we have pending txs, wait until timeout + if timeoutTime := pendingTxTime.Add(btypes.TX_TIMEOUT); lastBlockTime.Before(timeoutTime) { + timer := time.NewTimer(timeoutTime.Sub(lastBlockTime)) + <-timer.C + } + + // convert pending txs to raw kv pairs for deletion + pendingKVs, err := b.PendingTxsToRawKV(loadedPendingTxs, true) + if err != nil { + return err + } + + // add pending txs delegation to db batch + dbBatchKVs = append(dbBatchKVs, pendingKVs...) + + // convert pending txs to pending msgs + for i, txInfo := range loadedPendingTxs { + msgs, err := b.cfg.PendingTxToProcessedMsgs(txInfo.Tx) + if err != nil { + return err + } + + if txInfo.Save { + b.pendingProcessedMsgs = append(b.pendingProcessedMsgs, btypes.ProcessedMsgs{ + Msgs: msgs, + Timestamp: time.Now().UnixNano(), + Save: txInfo.Save, + }) + } + + b.logger.Debug("pending tx", zap.Int("index", i), zap.String("tx", txInfo.String())) + } + } + + loadedProcessedMsgs, err := b.loadProcessedMsgs() + if err != nil { + return err + } + + // need to remove processed msgs from db before updating the timestamp + // because the timestamp is used as a key. + kvProcessedMsgs, err := b.ProcessedMsgsToRawKV(loadedProcessedMsgs, true) + if err != nil { + return err + } + dbBatchKVs = append(dbBatchKVs, kvProcessedMsgs...) + + // update timestamp of loaded processed msgs + for i, pendingMsgs := range loadedProcessedMsgs { + loadedProcessedMsgs[i].Timestamp = time.Now().UnixNano() + b.logger.Debug("pending msgs", zap.Int("index", i), zap.String("msgs", pendingMsgs.String())) + } + + // save all pending msgs with updated timestamp to db + b.pendingProcessedMsgs = append(b.pendingProcessedMsgs, loadedProcessedMsgs...) + kvProcessedMsgs, err = b.ProcessedMsgsToRawKV(b.pendingProcessedMsgs, false) + if err != nil { + return err + } + dbBatchKVs = append(dbBatchKVs, kvProcessedMsgs...) + + // save all pending msgs first, then broadcast them + err = b.db.RawBatchSet(dbBatchKVs...) + if err != nil { + return err + } + + return nil +} + +func (b *Broadcaster) SetSyncInfo(height uint64) { + b.lastProcessedBlockHeight = height +} + +func (b Broadcaster) KeyName() string { + return b.keyName +} diff --git a/node/broadcaster/db.go b/node/broadcaster/db.go new file mode 100644 index 0000000..7ea0d4e --- /dev/null +++ b/node/broadcaster/db.go @@ -0,0 +1,121 @@ +package broadcaster + +import ( + "go.uber.org/zap" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" + "github.com/initia-labs/opinit-bots-go/types" +) + +/////////////// +// PendingTx // +/////////////// + +func (b Broadcaster) savePendingTx(sequence uint64, txInfo btypes.PendingTxInfo) error { + data, err := txInfo.Marshal() + if err != nil { + return err + } + return b.db.Set(btypes.PrefixedPendingTx(sequence), data) +} + +func (b Broadcaster) deletePendingTx(sequence uint64) error { + return b.db.Delete(btypes.PrefixedPendingTx(sequence)) +} + +func (b Broadcaster) loadPendingTxs() (txs []btypes.PendingTxInfo, err error) { + iterErr := b.db.PrefixedIterate(btypes.PendingTxsKey, func(_, value []byte) (stop bool, err error) { + txInfo := btypes.PendingTxInfo{} + err = txInfo.Unmarshal(value) + if err != nil { + return true, err + } + txs = append(txs, txInfo) + return false, nil + }) + if iterErr != nil { + return nil, iterErr + } + + b.logger.Debug("load pending txs", zap.Int("count", len(txs))) + return txs, err +} + +// PendingTxsToRawKV converts pending txs to raw kv pairs. +// If delete is true, it will return kv pairs for deletion (empty value). +func (b Broadcaster) PendingTxsToRawKV(txInfos []btypes.PendingTxInfo, delete bool) ([]types.RawKV, error) { + kvs := make([]types.RawKV, 0, len(txInfos)) + for _, txInfo := range txInfos { + var data []byte + var err error + + if !delete && txInfo.Save { + data, err = txInfo.Marshal() + if err != nil { + return nil, err + } + } + kvs = append(kvs, types.RawKV{ + Key: b.db.PrefixedKey(btypes.PrefixedPendingTx(txInfo.Sequence)), + Value: data, + }) + } + return kvs, nil +} + +/////////////////// +// ProcessedMsgs // +/////////////////// + +// ProcessedMsgsToRawKV converts processed data to raw kv pairs. +// If delete is true, it will return kv pairs for deletion (empty value). +func (b Broadcaster) ProcessedMsgsToRawKV(ProcessedMsgs []btypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { + kvs := make([]types.RawKV, 0, len(ProcessedMsgs)) + for _, processedMsgs := range ProcessedMsgs { + var data []byte + var err error + + if !delete && processedMsgs.Save { + data, err = processedMsgs.MarshalInterfaceJSON(b.cdc) + if err != nil { + return nil, err + } + } + kvs = append(kvs, types.RawKV{ + Key: b.db.PrefixedKey(btypes.PrefixedProcessedMsgs(uint64(processedMsgs.Timestamp))), + Value: data, + }) + } + return kvs, nil +} + +// currently no use case, but keep it for future use +// func (n *Broadcaster) saveProcessedMsgs(processedMsgs btypes.ProcessedMsgs) error { +// data, err := processedMsgs.Marshal() +// if err != nil { +// return err +// } +// return b.db.Set(btypes.PrefixedProcessedMsgs(uint64(processedMsgs.Timestamp)), data) +// } + +func (b Broadcaster) loadProcessedMsgs() (ProcessedMsgs []btypes.ProcessedMsgs, err error) { + iterErr := b.db.PrefixedIterate(btypes.ProcessedMsgsKey, func(_, value []byte) (stop bool, err error) { + var processedMsgs btypes.ProcessedMsgs + err = processedMsgs.UnmarshalInterfaceJSON(b.cdc, value) + if err != nil { + return true, err + } + ProcessedMsgs = append(ProcessedMsgs, processedMsgs) + return false, nil + }) + + if iterErr != nil { + return nil, iterErr + } + b.logger.Debug("load pending processed msgs", zap.Int("count", len(ProcessedMsgs))) + return ProcessedMsgs, nil +} + +func (b Broadcaster) deleteProcessedMsgs(timestamp int64) error { + return b.db.Delete(btypes.PrefixedProcessedMsgs(uint64(timestamp))) +} diff --git a/node/broadcaster/process.go b/node/broadcaster/process.go new file mode 100644 index 0000000..5a9aed6 --- /dev/null +++ b/node/broadcaster/process.go @@ -0,0 +1,133 @@ +package broadcaster + +import ( + "context" + "encoding/hex" + "fmt" + "time" + + "github.com/pkg/errors" + "go.uber.org/zap" + + rpccoretypes "github.com/cometbft/cometbft/rpc/core/types" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" +) + +func (b Broadcaster) GetHeight() uint64 { + return b.lastProcessedBlockHeight + 1 +} + +// HandleNewBlock is called when a new block is received. +func (b *Broadcaster) HandleNewBlock(block *rpccoretypes.ResultBlock, blockResult *rpccoretypes.ResultBlockResults, latestChainHeight uint64) error { + + // check pending txs first + for _, tx := range block.Block.Txs { + if b.lenLocalPendingTx() == 0 { + break + } + + // check if the first pending tx is included in the block + if pendingTx := b.peekLocalPendingTx(); btypes.TxHash(tx) == pendingTx.TxHash { + err := b.RemovePendingTx(block.Block.Height, pendingTx.TxHash, pendingTx.Sequence) + if err != nil { + return err + } + } + } + + // check timeout of pending txs + // @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert? + if length := b.lenLocalPendingTx(); length > 0 { + b.logger.Debug("remaining pending txs", zap.Int64("height", block.Block.Height), zap.Int("count", length)) + pendingTxTime := time.Unix(0, b.peekLocalPendingTx().Timestamp) + if block.Block.Time.After(pendingTxTime.Add(btypes.TX_TIMEOUT)) { + panic(fmt.Errorf("something wrong, pending txs are not processed for a long time; current block time: %s, pending tx processing time: %s", block.Block.Time.UTC().String(), pendingTxTime.UTC().String())) + } + } + + // update last processed block height + b.lastProcessedBlockHeight = latestChainHeight + + return nil +} + +// CheckPendingTx query tx info to check if pending tx is processed. +func (b *Broadcaster) CheckPendingTx() (*btypes.PendingTxInfo, *rpccoretypes.ResultTx, error) { + if b.lenLocalPendingTx() == 0 { + return nil, nil, nil + } + + pendingTx := b.peekLocalPendingTx() + pendingTxTime := time.Unix(0, b.peekLocalPendingTx().Timestamp) + if time.Now().After(pendingTxTime.Add(btypes.TX_TIMEOUT)) { + // @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert? + panic(fmt.Errorf("something wrong, pending txs are not processed for a long time; current block time: %s, pending tx processing time: %s", time.Now().UTC().String(), pendingTxTime.UTC().String())) + } + + txHash, err := hex.DecodeString(pendingTx.TxHash) + if err != nil { + return nil, nil, err + } + res, err := b.rpcClient.QueryTx(txHash) + if err != nil { + b.logger.Debug("failed to query tx", zap.String("txHash", pendingTx.TxHash), zap.String("error", err.Error())) + return nil, nil, nil + } + + return &pendingTx, res, nil +} + +// RemovePendingTx remove pending tx from local pending txs. +// It is called when the pending tx is included in the block. +func (b *Broadcaster) RemovePendingTx(blockHeight int64, txHash string, sequence uint64) error { + err := b.deletePendingTx(sequence) + if err != nil { + return err + } + + b.logger.Debug("tx inserted", zap.Int64("height", blockHeight), zap.Uint64("sequence", sequence), zap.String("txHash", txHash)) + b.dequeueLocalPendingTx() + + return nil +} + +// Start broadcaster loop +func (b *Broadcaster) Start(ctx context.Context) error { + defer close(b.txChannelStopped) + + for { + select { + case <-ctx.Done(): + return nil + case data := <-b.txChannel: + var err error + for retry := 1; retry <= 10; retry++ { + select { + case <-ctx.Done(): + return nil + default: + } + err = b.handleProcessedMsgs(ctx, data) + if err == nil { + break + } else if err = b.handleMsgError(err); err == nil { + break + } + b.logger.Warn("retry", zap.Int("count", retry), zap.String("error", err.Error())) + + time.Sleep(30 * time.Second) + } + if err != nil { + return errors.Wrap(err, "failed to handle processed msgs") + } + } + } +} + +// @dev: these pending processed data is filled at initialization(`NewBroadcaster`). +func (b Broadcaster) BroadcastPendingProcessedMsgs() { + for _, processedMsg := range b.pendingProcessedMsgs { + b.BroadcastMsgs(processedMsg) + } +} diff --git a/node/tx.go b/node/broadcaster/tx.go similarity index 53% rename from node/tx.go rename to node/broadcaster/tx.go index 9d031e3..b891fb2 100644 --- a/node/tx.go +++ b/node/broadcaster/tx.go @@ -1,4 +1,4 @@ -package node +package broadcaster import ( "context" @@ -7,13 +7,12 @@ import ( "regexp" "strconv" "strings" - "time" - "github.com/pkg/errors" + "go.uber.org/zap" sdkerrors "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" - comettypes "github.com/cometbft/cometbft/types" + "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -21,8 +20,8 @@ import ( txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - nodetypes "github.com/initia-labs/opinit-bots-go/node/types" - "go.uber.org/zap" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" ) @@ -36,52 +35,38 @@ var ignoringErrors = []error{ var accountSeqRegex = regexp.MustCompile("account sequence mismatch, expected ([0-9]+), got ([0-9]+)") var outputIndexRegex = regexp.MustCompile("expected ([0-9]+), got ([0-9]+): invalid output index") -func (n *Node) txBroadcastLooper(ctx context.Context) error { - for { - select { - case <-ctx.Done(): - return nil - case data := <-n.txChannel: - var err error - for retry := 0; retry < 5; retry++ { - err = n.handleProcessedMsgs(ctx, data) - if err == nil { - break - } else if err = n.handleMsgError(err); err == nil { - break - } - - n.logger.Warn("retry ", zap.String("error", err.Error())) - time.Sleep(2 * time.Second) - continue - } - - if err != nil { - return errors.Wrap(err, "failed to handle processed msgs") - } +func (b *Broadcaster) handleMsgError(err error) error { + if strs := accountSeqRegex.FindStringSubmatch(err.Error()); strs != nil { + expected, parseErr := strconv.ParseUint(strs[1], 10, 64) + if parseErr != nil { + return parseErr + } + got, parseErr := strconv.ParseUint(strs[2], 10, 64) + if parseErr != nil { + return parseErr + } + + if expected > got { + b.txf = b.txf.WithSequence(expected) } - } -} -func (n *Node) handleMsgError(err error) error { - if accountSeqRegex.FindStringSubmatch(err.Error()) != nil { // account sequence mismatched // TODO: handle mismatched sequence return err } if strs := outputIndexRegex.FindStringSubmatch(err.Error()); strs != nil { - expected, parseErr := strconv.ParseInt(strs[0], 10, 64) + expected, parseErr := strconv.ParseInt(strs[1], 10, 64) if parseErr != nil { return parseErr } - got, parseErr := strconv.ParseInt(strs[1], 10, 64) + got, parseErr := strconv.ParseInt(strs[2], 10, 64) if parseErr != nil { return parseErr } if expected > got { - n.logger.Warn("ignoring error", zap.String("error", err.Error())) + b.logger.Warn("ignoring error", zap.String("error", err.Error())) return nil } @@ -90,23 +75,25 @@ func (n *Node) handleMsgError(err error) error { for _, e := range ignoringErrors { if strings.Contains(err.Error(), e.Error()) { - n.logger.Warn("ignoring error", zap.String("error", e.Error())) + b.logger.Warn("ignoring error", zap.String("error", e.Error())) return nil } } - // n.logger.Error("failed to handle processed msgs", zap.String("error", err.Error())) + // b.logger.Error("failed to handle processed msgs", zap.String("error", err.Error())) return err } -func (n *Node) handleProcessedMsgs(ctx context.Context, data nodetypes.ProcessedMsgs) error { - sequence := n.txf.Sequence() - txBytes, err := n.buildTxWithMessages(ctx, data.Msgs) +// HandleProcessedMsgs handles processed messages by broadcasting them to the network. +// It stores the transaction in the database and local memory and keep track of the successful broadcast. +func (b *Broadcaster) handleProcessedMsgs(ctx context.Context, data btypes.ProcessedMsgs) error { + sequence := b.txf.Sequence() + txBytes, txHash, err := b.cfg.BuildTxWithMessages(ctx, data.Msgs) if err != nil { return sdkerrors.Wrapf(err, "simulation failed") } - res, err := n.BroadcastTxSync(ctx, txBytes) + res, err := b.rpcClient.BroadcastTxSync(ctx, txBytes) if err != nil { // TODO: handle error, may repeat sending tx return fmt.Errorf("broadcast txs: %w", err) @@ -115,87 +102,58 @@ func (n *Node) handleProcessedMsgs(ctx context.Context, data nodetypes.Processed return fmt.Errorf("broadcast txs: %s", res.Log) } - n.logger.Debug("broadcast tx", zap.String("tx_hash", TxHash(txBytes)), zap.Uint64("sequence", sequence)) + b.logger.Debug("broadcast tx", zap.String("tx_hash", txHash), zap.Uint64("sequence", sequence)) // @sh-cha: maybe we should use data.Save? if data.Timestamp != 0 { - err = n.deleteProcessedMsgs(data.Timestamp) + err = b.deleteProcessedMsgs(data.Timestamp) if err != nil { return err } } - n.txf = n.txf.WithSequence(n.txf.Sequence() + 1) - pendingTx := nodetypes.PendingTxInfo{ - ProcessedHeight: n.GetHeight(), + b.txf = b.txf.WithSequence(b.txf.Sequence() + 1) + pendingTx := btypes.PendingTxInfo{ + ProcessedHeight: b.GetHeight(), Sequence: sequence, Tx: txBytes, - TxHash: TxHash(txBytes), + TxHash: txHash, Timestamp: data.Timestamp, Save: data.Save, } // save pending transaction to the database for handling after restart - err = n.savePendingTx(sequence, pendingTx) + err = b.savePendingTx(sequence, pendingTx) if err != nil { return err } // save pending tx to local memory to handle this tx in this session - n.enqueueLocalPendingTx(pendingTx) + b.enqueueLocalPendingTx(pendingTx) return nil } // BroadcastTxSync broadcasts transaction bytes to txBroadcastLooper. -func (n *Node) BroadcastMsgs(msgs nodetypes.ProcessedMsgs) { - if n.txChannel == nil || !n.HasKey() { +func (b Broadcaster) BroadcastMsgs(msgs btypes.ProcessedMsgs) { + if b.txChannel == nil { return } - n.txChannel <- msgs -} - -// buildTxWithMessages creates a transaction from the given messages. -func (n *Node) buildTxWithMessages( - ctx context.Context, - msgs []sdk.Msg, -) ( - txBytes []byte, - err error, -) { - txf := n.txf - _, adjusted, err := n.calculateGas(ctx, txf, msgs...) - if err != nil { - return nil, err + select { + case <-b.txChannelStopped: + case b.txChannel <- msgs: } - - txf = txf.WithGas(adjusted) - txb, err := txf.BuildUnsignedTx(msgs...) - if err != nil { - return nil, err - } - - if err = tx.Sign(ctx, txf, nodetypes.KEY_NAME, txb, false); err != nil { - return nil, err - } - - tx := txb.GetTx() - txBytes, err = n.EncodeTx(tx) - if err != nil { - return nil, err - } - return txBytes, nil } // CalculateGas simulates a tx to generate the appropriate gas settings before broadcasting a tx. -func (n *Node) calculateGas(ctx context.Context, txf tx.Factory, msgs ...sdk.Msg) (txtypes.SimulateResponse, uint64, error) { - keyInfo, err := n.keyBase.Key(nodetypes.KEY_NAME) +func (b Broadcaster) CalculateGas(ctx context.Context, txf tx.Factory, msgs ...sdk.Msg) (txtypes.SimulateResponse, uint64, error) { + keyInfo, err := b.keyBase.Key(b.keyName) if err != nil { return txtypes.SimulateResponse{}, 0, err } - txBytes, err := n.buildSimTx(keyInfo, txf, msgs...) + txBytes, err := b.buildSimTx(keyInfo, txf, msgs...) if err != nil { return txtypes.SimulateResponse{}, 0, err } @@ -211,7 +169,7 @@ func (n *Node) calculateGas(ctx context.Context, txf tx.Factory, msgs ...sdk.Msg Data: reqBytes, } - res, err := n.QueryABCI(ctx, simQuery) + res, err := b.rpcClient.QueryABCI(ctx, simQuery) if err != nil { return txtypes.SimulateResponse{}, 0, err } @@ -221,28 +179,29 @@ func (n *Node) calculateGas(ctx context.Context, txf tx.Factory, msgs ...sdk.Msg return txtypes.SimulateResponse{}, 0, err } - gas, err := n.adjustEstimatedGas(simRes.GasInfo.GasUsed) + gas, err := b.adjustEstimatedGas(simRes.GasInfo.GasUsed) return simRes, gas, err } // AdjustEstimatedGas adjusts the estimated gas usage by multiplying it by the gas adjustment factor // and return estimated gas is higher than max gas error. If the gas usage is zero, the adjusted gas // is also zero. -func (n *Node) adjustEstimatedGas(gasUsed uint64) (uint64, error) { +func (b Broadcaster) adjustEstimatedGas(gasUsed uint64) (uint64, error) { if gasUsed == 0 { return gasUsed, nil } - gas := nodetypes.GAS_ADJUSTMENT * float64(gasUsed) + gas := btypes.GAS_ADJUSTMENT * float64(gasUsed) if math.IsInf(gas, 1) { return 0, fmt.Errorf("infinite gas used") } + return uint64(gas), nil } // BuildSimTx creates an unsigned tx with an empty single signature and returns // the encoded transaction or an error if the unsigned transaction cannot be built. -func (n Node) buildSimTx(info *keyring.Record, txf tx.Factory, msgs ...sdk.Msg) ([]byte, error) { +func (b Broadcaster) buildSimTx(info *keyring.Record, txf tx.Factory, msgs ...sdk.Msg) ([]byte, error) { txb, err := txf.BuildUnsignedTx(msgs...) if err != nil { return nil, err @@ -267,53 +226,105 @@ func (n Node) buildSimTx(info *keyring.Record, txf tx.Factory, msgs ...sdk.Msg) return nil, err } - return n.EncodeTx(txb.GetTx()) + return b.EncodeTx(txb.GetTx()) } -func (n *Node) enqueueLocalPendingTx(tx nodetypes.PendingTxInfo) { - n.pendingTxMu.Lock() - defer n.pendingTxMu.Unlock() +func (b *Broadcaster) enqueueLocalPendingTx(tx btypes.PendingTxInfo) { + b.pendingTxMu.Lock() + defer b.pendingTxMu.Unlock() - n.pendingTxs = append(n.pendingTxs, tx) + b.pendingTxs = append(b.pendingTxs, tx) } -func (n *Node) peekLocalPendingTx() nodetypes.PendingTxInfo { - n.pendingTxMu.Lock() - defer n.pendingTxMu.Unlock() +func (b *Broadcaster) peekLocalPendingTx() btypes.PendingTxInfo { + b.pendingTxMu.Lock() + defer b.pendingTxMu.Unlock() - return n.pendingTxs[0] + return b.pendingTxs[0] } -func (n *Node) lenLocalPendingTx() int { - n.pendingTxMu.Lock() - defer n.pendingTxMu.Unlock() +func (b Broadcaster) lenLocalPendingTx() int { + b.pendingTxMu.Lock() + defer b.pendingTxMu.Unlock() - return len(n.pendingTxs) + return len(b.pendingTxs) } -func (n *Node) dequeueLocalPendingTx() { - n.pendingTxMu.Lock() - defer n.pendingTxMu.Unlock() +func (b *Broadcaster) dequeueLocalPendingTx() { + b.pendingTxMu.Lock() + defer b.pendingTxMu.Unlock() - n.pendingTxs = n.pendingTxs[1:] + b.pendingTxs = b.pendingTxs[1:] } -func (n *Node) EncodeTx(tx authsigning.Tx) ([]byte, error) { - txBytes, err := n.txConfig.TxEncoder()(tx) +func (b Broadcaster) EncodeTx(tx authsigning.Tx) ([]byte, error) { + txBytes, err := b.txConfig.TxEncoder()(tx) if err != nil { return nil, err } return txBytes, nil } -func (n *Node) DecodeTx(txBytes []byte) (authsigning.Tx, error) { - tx, err := n.txConfig.TxDecoder()(txBytes) +func (b Broadcaster) DecodeTx(txBytes []byte) (authsigning.Tx, error) { + tx, err := b.txConfig.TxDecoder()(txBytes) if err != nil { return nil, err } return tx.(authsigning.Tx), nil } -func TxHash(txBytes []byte) string { - return fmt.Sprintf("%X", comettypes.Tx(txBytes).Hash()) +func (n Broadcaster) ChangeMsgsFromTx(tx authsigning.Tx, msgs []sdk.Msg) (authsigning.Tx, error) { + builder, err := n.txConfig.WrapTxBuilder(tx) + if err != nil { + return nil, err + } + err = builder.SetMsgs(msgs...) + if err != nil { + return nil, err + } + return builder.GetTx(), nil +} + +// buildTxWithMessages creates a transaction from the given messages. +func (b Broadcaster) DefaultBuildTxWithMessages( + ctx context.Context, + msgs []sdk.Msg, +) ( + txBytes []byte, + txHash string, + err error, +) { + txf := b.txf + _, adjusted, err := b.CalculateGas(ctx, txf, msgs...) + if err != nil { + return nil, "", err + } + + txf = txf.WithGas(adjusted) + txb, err := txf.BuildUnsignedTx(msgs...) + if err != nil { + return nil, "", err + } + + if err = tx.Sign(ctx, txf, b.keyName, txb, false); err != nil { + return nil, "", err + } + + tx := txb.GetTx() + txBytes, err = b.EncodeTx(tx) + if err != nil { + return nil, "", err + } + return txBytes, btypes.TxHash(txBytes), nil +} + +func (b Broadcaster) DefaultPendingTxToProcessedMsgs( + txBytes []byte, +) ([]sdk.Msg, error) { + tx, err := b.DecodeTx(txBytes) + if err != nil { + return nil, err + } + + return tx.GetMsgs(), nil } diff --git a/node/broadcaster/types/config.go b/node/broadcaster/types/config.go new file mode 100644 index 0000000..7b63c81 --- /dev/null +++ b/node/broadcaster/types/config.go @@ -0,0 +1,135 @@ +package types + +import ( + "context" + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/initia-labs/opinit-bots-go/keys" +) + +type BuildTxWithMessagesFn func(context.Context, []sdk.Msg) ([]byte, string, error) +type PendingTxToProcessedMsgsFn func([]byte) ([]sdk.Msg, error) + +type BroadcasterConfig struct { + // ChainID is the chain ID. + ChainID string + + // GasPrice is the gas price. + GasPrice string + + // Bech32Prefix is the Bech32 prefix. + Bech32Prefix string + + // BuildTxWithMessages is the function to build a transaction with messages. + BuildTxWithMessages BuildTxWithMessagesFn + + // PendingTxToProcessedMsgs is the function to convert pending tx to processed messages. + PendingTxToProcessedMsgs PendingTxToProcessedMsgsFn + + // KeyringConfig is the keyring configuration. + KeyringConfig KeyringConfig +} + +func (bc *BroadcasterConfig) WithPendingTxToProcessedMsgsFn(fn PendingTxToProcessedMsgsFn) { + bc.PendingTxToProcessedMsgs = fn +} + +func (bc *BroadcasterConfig) WithBuildTxWithMessagesFn(fn BuildTxWithMessagesFn) { + bc.BuildTxWithMessages = fn +} + +func (bc BroadcasterConfig) Validate() error { + if bc.ChainID == "" { + return fmt.Errorf("chain id is empty") + } + + _, err := sdk.ParseDecCoins(bc.GasPrice) + if err != nil { + return fmt.Errorf("failed to parse gas price: %s", bc.GasPrice) + } + + if bc.GasPrice == "" { + return fmt.Errorf("gas price is empty") + } + + if bc.Bech32Prefix == "" { + return fmt.Errorf("bech32 prefix is empty") + } + + if bc.BuildTxWithMessages == nil { + return fmt.Errorf("build tx with messages is nil") + } + + if bc.PendingTxToProcessedMsgs == nil { + return fmt.Errorf("pending tx to processed msgs is nil") + } + + return bc.KeyringConfig.Validate() +} + +func (bc BroadcasterConfig) GetKeyringRecord(cdc codec.Codec, chainID string) (keyring.Keyring, *keyring.Record, error) { + keyBase, err := keys.GetKeyBase(chainID, bc.KeyringConfig.HomePath, cdc, nil) + if err != nil { + return nil, nil, err + } else if keyBase == nil { + return nil, nil, fmt.Errorf("failed to get key base") + } + + keyringRecord, err := bc.KeyringConfig.GetKeyRecord(keyBase, "") + if err != nil { + return nil, nil, err + } else if keyringRecord == nil { + return nil, nil, fmt.Errorf("keyring record is nil") + } + + return keyBase, keyringRecord, nil +} + +type KeyringConfig struct { + // HomePath is the path to the keyring. + HomePath string `json:"home_path"` + + // Name of key in keyring + Name string `json:"name"` + + // Address of key in keyring + Address string `json:"address"` + + // Mnemonic of key in keyring + // Mnemonic string `json:"mnemonic"` +} + +func (kc KeyringConfig) GetKeyRecord(keyBase keyring.Keyring, bech32Prefix string) (*keyring.Record, error) { + if kc.Address != "" { + addr, err := sdk.GetFromBech32(kc.Address, bech32Prefix) + if err != nil { + return nil, err + } + key, err := keyBase.KeyByAddress(sdk.AccAddress(addr)) + if err != nil { + return nil, fmt.Errorf("failed to get key by address from keyring: %s", kc.Address) + } + + return key, nil + } else if kc.Name != "" { + key, err := keyBase.Key(kc.Name) + if err != nil { + return nil, fmt.Errorf("failed to get key from keyring: %s", kc.Name) + } + + return key, nil + } + + return nil, fmt.Errorf("keyring config is invalid") +} + +func (kc KeyringConfig) Validate() error { + if kc.Name == "" && kc.Address == "" { + return fmt.Errorf("keyring config is invalid") + } + + return nil +} diff --git a/node/broadcaster/types/consts.go b/node/broadcaster/types/consts.go new file mode 100644 index 0000000..5ea79c3 --- /dev/null +++ b/node/broadcaster/types/consts.go @@ -0,0 +1,8 @@ +package types + +import "time" + +const ( + GAS_ADJUSTMENT = 1.5 + TX_TIMEOUT = 60 * time.Second +) diff --git a/node/types/db.go b/node/broadcaster/types/db.go similarity index 95% rename from node/types/db.go rename to node/broadcaster/types/db.go index 2cf5477..9d09e84 100644 --- a/node/types/db.go +++ b/node/broadcaster/types/db.go @@ -93,8 +93,8 @@ func (p *ProcessedMsgs) UnmarshalInterfaceJSON(cdc codec.Codec, data []byte) err func (p ProcessedMsgs) String() string { msgStr := "" for _, msg := range p.Msgs { - msgStr += msg.String() + "," + msgStr += sdk.MsgTypeURL(msg) + "," } tsStr := time.Unix(0, p.Timestamp).UTC().String() - return fmt.Sprintf("Pending msgs: %s at height: %d, %s", msgStr, p.Timestamp, tsStr) + return fmt.Sprintf("Pending msgs: %s at %s", msgStr, tsStr) } diff --git a/node/broadcaster/types/expected.go b/node/broadcaster/types/expected.go new file mode 100644 index 0000000..d98c5b7 --- /dev/null +++ b/node/broadcaster/types/expected.go @@ -0,0 +1,11 @@ +package types + +import ( + "context" + + abci "github.com/cometbft/cometbft/abci/types" +) + +type Querier interface { + QueryABCI(ctx context.Context, req abci.RequestQuery) (abci.ResponseQuery, error) +} diff --git a/node/broadcaster/types/keys.go b/node/broadcaster/types/keys.go new file mode 100644 index 0000000..9d8d690 --- /dev/null +++ b/node/broadcaster/types/keys.go @@ -0,0 +1,19 @@ +package types + +import ( + dbtypes "github.com/initia-labs/opinit-bots-go/db/types" +) + +var ( + // Keys + PendingTxsKey = []byte("pending_txs") + ProcessedMsgsKey = []byte("processed_msgs") +) + +func PrefixedPendingTx(sequence uint64) []byte { + return append(append(PendingTxsKey, dbtypes.Splitter), dbtypes.FromUint64Key(sequence)...) +} + +func PrefixedProcessedMsgs(timestamp uint64) []byte { + return append(append(ProcessedMsgsKey, dbtypes.Splitter), dbtypes.FromUint64Key(timestamp)...) +} diff --git a/node/broadcaster/types/tx.go b/node/broadcaster/types/tx.go new file mode 100644 index 0000000..06b59be --- /dev/null +++ b/node/broadcaster/types/tx.go @@ -0,0 +1,11 @@ +package types + +import ( + "fmt" + + comettypes "github.com/cometbft/cometbft/types" +) + +func TxHash(txBytes []byte) string { + return fmt.Sprintf("%X", comettypes.Tx(txBytes).Hash()) +} diff --git a/node/db.go b/node/db.go index 6b22c9c..7461496 100644 --- a/node/db.go +++ b/node/db.go @@ -9,16 +9,8 @@ import ( func (n *Node) SetSyncInfo(height uint64) { n.lastProcessedBlockHeight = height -} - -func (n *Node) SaveSyncInfo(height uint64) error { - return n.db.Set(nodetypes.LastProcessedBlockHeightKey, dbtypes.FromUint64(height)) -} - -func (n *Node) SyncInfoToRawKV(height uint64) types.RawKV { - return types.RawKV{ - Key: n.db.PrefixedKey(nodetypes.LastProcessedBlockHeightKey), - Value: dbtypes.FromUint64(height), + if n.broadcaster != nil { + n.broadcaster.SetSyncInfo(n.lastProcessedBlockHeight) } } @@ -30,124 +22,24 @@ func (n *Node) loadSyncInfo() error { return err } - n.lastProcessedBlockHeight, err = dbtypes.ToUint64(data) - if err != nil { - return err - } - - n.logger.Info("load sync info", zap.Uint64("last_processed_height", n.lastProcessedBlockHeight)) - return nil -} - -/////////////// -// PendingTx // -/////////////// - -func (n Node) savePendingTx(sequence uint64, txInfo nodetypes.PendingTxInfo) error { - data, err := txInfo.Marshal() + lastSyncedHeight, err := dbtypes.ToUint64(data) if err != nil { return err } - return n.db.Set(nodetypes.PrefixedPendingTx(sequence), data) -} - -func (n Node) deletePendingTx(sequence uint64) error { - return n.db.Delete(nodetypes.PrefixedPendingTx(sequence)) -} - -func (n *Node) loadPendingTxs() (txs []nodetypes.PendingTxInfo, err error) { - iterErr := n.db.PrefixedIterate(nodetypes.PendingTxsKey, func(_, value []byte) (stop bool, err error) { - txInfo := nodetypes.PendingTxInfo{} - err = txInfo.Unmarshal(value) - if err != nil { - return true, err - } - txs = append(txs, txInfo) - return false, nil - }) - if iterErr != nil { - return nil, iterErr - } - - n.logger.Info("load pending txs", zap.Int("count", len(txs))) - return txs, err -} -// PendingTxsToRawKV converts pending txs to raw kv pairs. -// If delete is true, it will return kv pairs for deletion (empty value). -func (n *Node) PendingTxsToRawKV(txInfos []nodetypes.PendingTxInfo, delete bool) ([]types.RawKV, error) { - kvs := make([]types.RawKV, 0, len(txInfos)) - for _, txInfo := range txInfos { - var data []byte - var err error + n.SetSyncInfo(lastSyncedHeight) + n.logger.Debug("load sync info", zap.Uint64("last_processed_height", n.lastProcessedBlockHeight)) - if !delete && txInfo.Save { - data, err = txInfo.Marshal() - if err != nil { - return nil, err - } - } - kvs = append(kvs, types.RawKV{ - Key: n.db.PrefixedKey(nodetypes.PrefixedPendingTx(txInfo.Sequence)), - Value: data, - }) - } - return kvs, nil + return nil } -/////////////////// -// ProcessedMsgs // -/////////////////// - -// ProcessedMsgsToRawKV converts processed data to raw kv pairs. -// If delete is true, it will return kv pairs for deletion (empty value). -func (n *Node) ProcessedMsgsToRawKV(ProcessedMsgs []nodetypes.ProcessedMsgs, delete bool) ([]types.RawKV, error) { - kvs := make([]types.RawKV, 0, len(ProcessedMsgs)) - for _, processedMsgs := range ProcessedMsgs { - var data []byte - var err error - - if !delete && processedMsgs.Save { - data, err = processedMsgs.MarshalInterfaceJSON(n.cdc) - if err != nil { - return nil, err - } - } - kvs = append(kvs, types.RawKV{ - Key: n.db.PrefixedKey(nodetypes.PrefixedProcessedMsgs(uint64(processedMsgs.Timestamp))), - Value: data, - }) - } - return kvs, nil +func (n Node) SaveSyncInfo(height uint64) error { + return n.db.Set(nodetypes.LastProcessedBlockHeightKey, dbtypes.FromUint64(height)) } -// currently no use case, but keep it for future use -// func (n *Node) saveProcessedMsgs(processedMsgs nodetypes.ProcessedMsgs) error { -// data, err := processedMsgs.Marshal() -// if err != nil { -// return err -// } -// return n.db.Set(nodetypes.PrefixedProcessedMsgs(uint64(processedMsgs.Timestamp)), data) -// } - -func (n *Node) loadProcessedMsgs() (ProcessedMsgs []nodetypes.ProcessedMsgs, err error) { - iterErr := n.db.PrefixedIterate(nodetypes.ProcessedMsgsKey, func(_, value []byte) (stop bool, err error) { - var processedMsgs nodetypes.ProcessedMsgs - err = processedMsgs.UnmarshalInterfaceJSON(n.cdc, value) - if err != nil { - return true, err - } - ProcessedMsgs = append(ProcessedMsgs, processedMsgs) - return false, nil - }) - - if iterErr != nil { - return nil, iterErr +func (n Node) SyncInfoToRawKV(height uint64) types.RawKV { + return types.RawKV{ + Key: n.db.PrefixedKey(nodetypes.LastProcessedBlockHeightKey), + Value: dbtypes.FromUint64(height), } - n.logger.Info("load pending processed msgs", zap.Int("count", len(ProcessedMsgs))) - return ProcessedMsgs, nil -} - -func (n *Node) deleteProcessedMsgs(timestamp int64) error { - return n.db.Delete(nodetypes.PrefixedProcessedMsgs(uint64(timestamp))) } diff --git a/node/node.go b/node/node.go index f2ef2ba..445c6c9 100644 --- a/node/node.go +++ b/node/node.go @@ -2,69 +2,56 @@ package node import ( "context" - "sync" - "time" + "fmt" - "errors" + "github.com/pkg/errors" + "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - clienthttp "github.com/initia-labs/opinit-bots-go/client" + "github.com/initia-labs/opinit-bots-go/node/broadcaster" + "github.com/initia-labs/opinit-bots-go/node/rpcclient" nodetypes "github.com/initia-labs/opinit-bots-go/node/types" "github.com/initia-labs/opinit-bots-go/types" "go.uber.org/zap" + "golang.org/x/sync/errgroup" ) type Node struct { - *clienthttp.HTTP - cfg nodetypes.NodeConfig db types.DB logger *zap.Logger + cdc codec.Codec + txConfig client.TxConfig + + rpcClient *rpcclient.RPCClient + broadcaster *broadcaster.Broadcaster + + // handlers eventHandlers map[string]nodetypes.EventHandlerFn txHandler nodetypes.TxHandlerFn beginBlockHandler nodetypes.BeginBlockHandlerFn endBlockHandler nodetypes.EndBlockHandlerFn rawBlockHandler nodetypes.RawBlockHandlerFn - cdc codec.Codec - txConfig client.TxConfig - keyBase keyring.Keyring - keyAddress sdk.AccAddress - txf tx.Factory - + // status info lastProcessedBlockHeight uint64 - - // local pending txs, which is following Queue data structure - pendingTxMu *sync.Mutex - pendingTxs []nodetypes.PendingTxInfo - - pendingProcessedMsgs []nodetypes.ProcessedMsgs - - txChannel chan nodetypes.ProcessedMsgs + running bool } func NewNode(cfg nodetypes.NodeConfig, db types.DB, logger *zap.Logger, cdc codec.Codec, txConfig client.TxConfig) (*Node, error) { - client, err := clienthttp.New(cfg.RPC, "/websocket") - if err != nil { + if err := cfg.Validate(); err != nil { return nil, err } - // Use memory keyring for now - // TODO: may use os keyring later - keyBase, err := keyring.New(cfg.ChainID, "memory", "", nil, cdc) + rpcClient, err := rpcclient.NewRPCClient(cdc, cfg.RPC) if err != nil { return nil, err } n := &Node{ - HTTP: client, + rpcClient: rpcClient, cfg: cfg, db: db, @@ -74,22 +61,10 @@ func NewNode(cfg nodetypes.NodeConfig, db types.DB, logger *zap.Logger, cdc code cdc: cdc, txConfig: txConfig, - keyBase: keyBase, - - pendingTxMu: &sync.Mutex{}, - pendingTxs: make([]nodetypes.PendingTxInfo, 0), - - pendingProcessedMsgs: make([]nodetypes.ProcessedMsgs, 0), - - txChannel: make(chan nodetypes.ProcessedMsgs), - } - - err = n.loadSyncInfo() - if err != nil { - return nil, err } - status, err := n.Status(context.Background()) + // check if node is catching up + status, err := rpcClient.Status(context.Background()) if err != nil { return nil, err } @@ -97,163 +72,116 @@ func NewNode(cfg nodetypes.NodeConfig, db types.DB, logger *zap.Logger, cdc code return nil, errors.New("node is catching up") } - if n.HasKey() { - err := n.prepareBroadcaster(uint64(status.SyncInfo.LatestBlockHeight), status.SyncInfo.LatestBlockTime) + // create broadcaster + if cfg.BroadcasterConfig != nil { + n.broadcaster, err = broadcaster.NewBroadcaster( + *cfg.BroadcasterConfig, + db, + logger, + cdc, + txConfig, + rpcClient, + status, + ) if err != nil { - return nil, err + return nil, errors.Wrap(err, "failed to create broadcaster") } } - return n, nil -} - -func (n Node) Start(ctx context.Context, errCh chan error, processType nodetypes.BlockProcessType) { - go func() { - err := n.txBroadcastLooper(ctx) - if err != nil { - errCh <- err - } - }() - - // broadcast pending msgs first before executing block process looper - // @dev: these pending processed data is filled at initialization(`NewNode`). - for _, processedMsg := range n.pendingProcessedMsgs { - n.BroadcastMsgs(processedMsg) + // load sync info + err = n.loadSyncInfo() + if err != nil { + return nil, err } - go func() { - err := n.blockProcessLooper(ctx, processType) - if err != nil { - errCh <- err - } - }() -} - -func (n Node) HasKey() bool { - return n.cfg.Mnemonic != "" + return n, nil } -func (n *Node) prepareBroadcaster(_ /*lastBlockHeight*/ uint64, lastBlockTime time.Time) error { - _, err := n.keyBase.NewAccount(nodetypes.KEY_NAME, n.cfg.Mnemonic, "", hd.CreateHDPath(sdk.GetConfig().GetCoinType(), 0, 0).String(), hd.Secp256k1) - if err != nil { - return err - } - // to check if the key is normally created - // TODO: delete this code - key, err := n.keyBase.Key(nodetypes.KEY_NAME) - if err != nil { - return err +func (n *Node) Start(ctx context.Context) { + if n.running { + return } + n.running = true - addr, err := key.GetAddress() - if err != nil { - return err - } - n.keyAddress = addr - - n.txf = tx.Factory{}. - WithAccountRetriever(n). - WithChainID(n.cfg.ChainID). - WithTxConfig(n.txConfig). - WithGasAdjustment(nodetypes.GAS_ADJUSTMENT). - WithGasPrices(n.cfg.GasPrice). - WithKeybase(n.keyBase). - WithSignMode(signing.SignMode_SIGN_MODE_DIRECT) - - err = n.loadAccount() - if err != nil { - return err - } + errGrp := ctx.Value("errGrp").(*errgroup.Group) + if n.broadcaster != nil { + errGrp.Go(func() (err error) { + defer func() { + n.logger.Info("tx broadcast looper stopped") + if r := recover(); r != nil { + n.logger.Error("tx broadcast looper panic", zap.Any("recover", r)) + err = fmt.Errorf("tx broadcast looper panic: %v", r) + } + }() - dbBatchKVs := make([]types.RawKV, 0) + return n.broadcaster.Start(ctx) + }) - loadedPendingTxs, err := n.loadPendingTxs() - if err != nil { - return err + // broadcast pending msgs first before executing block process looper + n.broadcaster.BroadcastPendingProcessedMsgs() } - // TODO: handle mismatched sequence & pending txs - if len(loadedPendingTxs) > 0 { - pendingTxTime := time.Unix(0, loadedPendingTxs[0].Timestamp) - - // if we have pending txs, wait until timeout - if timeoutTime := pendingTxTime.Add(nodetypes.TX_TIMEOUT); lastBlockTime.Before(timeoutTime) { - timer := time.NewTimer(timeoutTime.Sub(lastBlockTime)) - <-timer.C - } - // convert pending txs to raw kv pairs for deletion - pendingKVs, err := n.PendingTxsToRawKV(loadedPendingTxs, true) - if err != nil { - return err + if n.cfg.ProcessType == nodetypes.PROCESS_TYPE_ONLY_BROADCAST { + if n.broadcaster == nil { + panic("broadcaster cannot be nil with nodetypes.PROCESS_TYPE_ONLY_BROADCAST") } - // add pending txs delegation to db batch - dbBatchKVs = append(dbBatchKVs, pendingKVs...) - - // convert pending txs to pending msgs - for i, txInfo := range loadedPendingTxs { - tx, err := n.DecodeTx(txInfo.Tx) - if err != nil { - return err - } - if txInfo.Save { - n.pendingProcessedMsgs = append(n.pendingProcessedMsgs, nodetypes.ProcessedMsgs{ - Msgs: tx.GetMsgs(), - Timestamp: time.Now().UnixNano(), - Save: txInfo.Save, - }) - } - - n.logger.Debug("pending tx", zap.Int("index", i), zap.String("tx", txInfo.String())) - } - } - - loadedProcessedMsgs, err := n.loadProcessedMsgs() - if err != nil { - return err + errGrp.Go(func() (err error) { + defer func() { + n.logger.Info("tx checker looper stopped") + if r := recover(); r != nil { + n.logger.Error("tx checker panic", zap.Any("recover", r)) + err = fmt.Errorf("tx checker panic: %v", r) + } + }() + + return n.txChecker(ctx) + }) + } else { + errGrp.Go(func() (err error) { + defer func() { + n.logger.Info("block process looper stopped") + if r := recover(); r != nil { + n.logger.Error("block process looper panic", zap.Any("recover", r)) + err = fmt.Errorf("block process looper panic: %v", r) + } + }() + + return n.blockProcessLooper(ctx, n.cfg.ProcessType) + }) } +} - // need to remove processed msgs from db before updating the timestamp - // because the timestamp is used as a key. - kvProcessedMsgs, err := n.ProcessedMsgsToRawKV(loadedProcessedMsgs, true) - if err != nil { - return err - } - dbBatchKVs = append(dbBatchKVs, kvProcessedMsgs...) +func (n Node) AccountCodec() address.Codec { + return n.cdc.InterfaceRegistry().SigningContext().AddressCodec() +} - // update timestamp of loaded processed msgs - for i, pendingMsgs := range loadedProcessedMsgs { - loadedProcessedMsgs[i].Timestamp = time.Now().UnixNano() - n.logger.Debug("pending msgs", zap.Int("index", i), zap.String("msgs", pendingMsgs.String())) - } +func (n Node) GetHeight() uint64 { + return n.lastProcessedBlockHeight + 1 +} - // save all pending msgs with updated timestamp to db - n.pendingProcessedMsgs = append(n.pendingProcessedMsgs, loadedProcessedMsgs...) - kvProcessedMsgs, err = n.ProcessedMsgsToRawKV(n.pendingProcessedMsgs, false) - if err != nil { - return err - } - dbBatchKVs = append(dbBatchKVs, kvProcessedMsgs...) +func (n Node) HasBroadcaster() bool { + return n.broadcaster != nil +} - // save all pending msgs first, then broadcast them - err = n.db.RawBatchSet(dbBatchKVs...) - if err != nil { - return err +func (n Node) GetBroadcaster() (*broadcaster.Broadcaster, error) { + if n.broadcaster == nil { + return nil, errors.New("cannot get broadcaster without broadcaster") } - return nil + return n.broadcaster, nil } -func (n Node) GetHeight() uint64 { - return n.lastProcessedBlockHeight + 1 +func (n Node) MustGetBroadcaster() *broadcaster.Broadcaster { + if n.broadcaster == nil { + panic("cannot get broadcaster without broadcaster") + } + + return n.broadcaster } -func (n *Node) getClientCtx() client.Context { - return client.Context{}.WithClient(n). - WithInterfaceRegistry(n.cdc.InterfaceRegistry()). - WithChainID(n.cfg.ChainID). - WithCodec(n.cdc). - WithFromAddress(n.keyAddress) +func (n Node) GetRPCClient() *rpcclient.RPCClient { + return n.rpcClient } func (n *Node) RegisterTxHandler(fn nodetypes.TxHandlerFn) { diff --git a/node/process.go b/node/process.go index 968fe4e..b09eedb 100644 --- a/node/process.go +++ b/node/process.go @@ -11,8 +11,10 @@ import ( "go.uber.org/zap" ) +// blockProcessLooper fetches new blocks and processes them func (n *Node) blockProcessLooper(ctx context.Context, processType nodetypes.BlockProcessType) error { timer := time.NewTicker(nodetypes.POLLING_INTERVAL) + defer timer.Stop() for { select { @@ -21,7 +23,7 @@ func (n *Node) blockProcessLooper(ctx context.Context, processType nodetypes.Blo case <-timer.C: } - status, err := n.Status(ctx) + status, err := n.rpcClient.Status(ctx) if err != nil { n.logger.Error("failed to get node status ", zap.String("error", err.Error())) continue @@ -35,6 +37,11 @@ func (n *Node) blockProcessLooper(ctx context.Context, processType nodetypes.Blo switch processType { case nodetypes.PROCESS_TYPE_DEFAULT: for queryHeight := n.lastProcessedBlockHeight + 1; queryHeight <= latestChainHeight; { + select { + case <-ctx.Done(): + return nil + default: + } // TODO: may fetch blocks in batch block, blockResult, err := n.fetchNewBlock(ctx, int64(queryHeight)) if err != nil { @@ -60,13 +67,18 @@ func (n *Node) blockProcessLooper(ctx context.Context, processType nodetypes.Blo end = latestChainHeight } - blockBulk, err := n.QueryBlockBulk(start, end) + blockBulk, err := n.rpcClient.QueryBlockBulk(start, end) if err != nil { n.logger.Error("failed to fetch block bulk", zap.String("error", err.Error())) continue } for i := start; i <= end; i++ { + select { + case <-ctx.Done(): + return nil + default: + } err := n.rawBlockHandler(nodetypes.RawBlockArgs{ BlockHeight: i, BlockBytes: blockBulk[i-start], @@ -81,15 +93,16 @@ func (n *Node) blockProcessLooper(ctx context.Context, processType nodetypes.Blo } } +// fetch new block from the chain func (n *Node) fetchNewBlock(ctx context.Context, height int64) (block *rpccoretypes.ResultBlock, blockResult *rpccoretypes.ResultBlockResults, err error) { n.logger.Debug("fetch new block", zap.Int64("height", height)) - block, err = n.Block(ctx, &height) + block, err = n.rpcClient.Block(ctx, &height) if err != nil { return nil, nil, err } if len(n.eventHandlers) != 0 { - blockResult, err = n.BlockResults(ctx, &height) + blockResult, err = n.rpcClient.BlockResults(ctx, &height) if err != nil { return nil, nil, err } @@ -102,30 +115,12 @@ func (n *Node) handleNewBlock(block *rpccoretypes.ResultBlock, blockResult *rpcc if err != nil { return err } - // check pending txs first - // TODO: may handle pending txs with same level of other handlers - for _, tx := range block.Block.Txs { - if n.lenLocalPendingTx() == 0 { - break - } - // check if the first pending tx is included in the block - if pendingTx := n.peekLocalPendingTx(); TxHash(tx) == pendingTx.TxHash { - n.logger.Debug("tx inserted", zap.Int64("height", block.Block.Height), zap.Uint64("sequence", pendingTx.Sequence), zap.String("txHash", pendingTx.TxHash)) - err := n.deletePendingTx(pendingTx.Sequence) - if err != nil { - return err - } - n.dequeueLocalPendingTx() - } - } - - if length := n.lenLocalPendingTx(); length > 0 { - n.logger.Debug("remaining pending txs", zap.Int64("height", block.Block.Height), zap.Int("count", length)) - pendingTxTime := time.Unix(0, n.peekLocalPendingTx().Timestamp) - if block.Block.Time.After(pendingTxTime.Add(nodetypes.TX_TIMEOUT)) { - // @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert? - panic(fmt.Errorf("something wrong, pending txs are not processed for a long time; current block time: %s, pending tx processing time: %s", block.Block.Time.String(), pendingTxTime.String())) + // handle broadcaster first to check pending txs + if n.broadcaster != nil { + err := n.broadcaster.HandleNewBlock(block, blockResult, latestChainHeight) + if err != nil { + return err } } @@ -196,3 +191,50 @@ func (n *Node) handleEvent(blockHeight uint64, latestHeight uint64, event abcity EventAttributes: event.GetAttributes(), }) } + +// txChecker checks pending txs and handle events if the tx is included in the block +func (n *Node) txChecker(ctx context.Context) error { + if n.broadcaster != nil { + return nil + } + + timer := time.NewTicker(nodetypes.POLLING_INTERVAL) + defer timer.Stop() + for { + select { + case <-ctx.Done(): + return nil + case <-timer.C: + } + + pendingTx, res, err := n.broadcaster.CheckPendingTx() + if err != nil { + return err + } else if pendingTx == nil || res == nil { + // tx not found + continue + } + + if len(n.eventHandlers) != 0 { + events := res.TxResult.GetEvents() + for eventIndex, event := range events { + select { + case <-ctx.Done(): + return nil + default: + } + + err := n.handleEvent(uint64(res.Height), 0, event) + if err != nil { + n.logger.Error("failed to handle event", zap.String("txHash", pendingTx.TxHash), zap.Int("event_index", eventIndex), zap.String("error", err.Error())) + break + } + } + } + + err = n.broadcaster.RemovePendingTx(int64(res.Height), pendingTx.TxHash, pendingTx.Sequence) + if err != nil { + return err + } + } +} diff --git a/node/query.go b/node/rpcclient/client.go similarity index 68% rename from node/query.go rename to node/rpcclient/client.go index b00996a..ec89082 100644 --- a/node/query.go +++ b/node/rpcclient/client.go @@ -1,4 +1,4 @@ -package node +package rpcclient import ( "context" @@ -8,32 +8,56 @@ import ( "strconv" "time" + "google.golang.org/grpc" + "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" + "google.golang.org/grpc/metadata" + sdkerrors "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" client2 "github.com/cometbft/cometbft/rpc/client" + coretypes "github.com/cometbft/cometbft/rpc/core/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" legacyerrors "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" gogogrpc "github.com/cosmos/gogoproto/grpc" - "google.golang.org/grpc" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/encoding/proto" - "google.golang.org/grpc/metadata" + + clienthttp "github.com/initia-labs/opinit-bots-go/client" ) -var _ gogogrpc.ClientConn = &Node{} +var _ gogogrpc.ClientConn = &RPCClient{} var protoCodec = encoding.GetCodec(proto.Name) -// Invoke implements the grpc ClientConn.Invoke method -func (n *Node) Invoke(ctx context.Context, method string, req, reply interface{}, opts ...grpc.CallOption) (err error) { +// RPCClient defines a gRPC querier client. +type RPCClient struct { + *clienthttp.HTTP + + cdc codec.Codec +} + +func NewRPCClient(cdc codec.Codec, rpcAddr string) (*RPCClient, error) { + client, err := clienthttp.New(rpcAddr, "/websocket") + if err != nil { + return nil, err + } + + return &RPCClient{ + HTTP: client, + cdc: cdc, + }, nil +} + +// Invoke implements the grpc ClientConq.Invoke method +func (q RPCClient) Invoke(ctx context.Context, method string, req, reply interface{}, opts ...grpc.CallOption) (err error) { // In both cases, we don't allow empty request req (it will panic unexpectedly). if reflect.ValueOf(req).IsNil() { return sdkerrors.Wrap(legacyerrors.ErrInvalidRequest, "request cannot be nil") } inMd, _ := metadata.FromOutgoingContext(ctx) - abciRes, outMd, err := n.RunGRPCQuery(ctx, method, req, inMd) + abciRes, outMd, err := q.RunGRPCQuery(ctx, method, req, inMd) if err != nil { return err } @@ -51,15 +75,15 @@ func (n *Node) Invoke(ctx context.Context, method string, req, reply interface{} *header.HeaderAddr = outMd } - if n.cdc.InterfaceRegistry() != nil { - return types.UnpackInterfaces(reply, n.cdc) + if q.cdc.InterfaceRegistry() != nil { + return types.UnpackInterfaces(reply, q.cdc) } return nil } -// NewStream implements the grpc ClientConn.NewStream method -func (n *Node) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { +// NewStream implements the grpc ClientConq.NewStream method +func (q RPCClient) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("streaming rpc not supported") } @@ -67,7 +91,7 @@ func (n *Node) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.Call // arguments for the gRPC method, and returns the ABCI response. It is used // to factorize code between client (Invoke) and server (RegisterGRPCServer) // gRPC handlers. -func (n *Node) RunGRPCQuery(ctx context.Context, method string, req interface{}, md metadata.MD) (abci.ResponseQuery, metadata.MD, error) { +func (q RPCClient) RunGRPCQuery(ctx context.Context, method string, req interface{}, md metadata.MD) (abci.ResponseQuery, metadata.MD, error) { reqBz, err := protoCodec.Marshal(req) if err != nil { return abci.ResponseQuery{}, nil, err @@ -99,7 +123,7 @@ func (n *Node) RunGRPCQuery(ctx context.Context, method string, req interface{}, Prove: false, } - abciRes, err := n.QueryABCI(ctx, abciReq) + abciRes, err := q.QueryABCI(ctx, abciReq) if err != nil { return abci.ResponseQuery{}, nil, err } @@ -115,13 +139,13 @@ func (n *Node) RunGRPCQuery(ctx context.Context, method string, req interface{}, } // QueryABCI performs an ABCI query and returns the appropriate response and error sdk error code. -func (n *Node) QueryABCI(ctx context.Context, req abci.RequestQuery) (abci.ResponseQuery, error) { +func (q RPCClient) QueryABCI(ctx context.Context, req abci.RequestQuery) (abci.ResponseQuery, error) { opts := client2.ABCIQueryOptions{ Height: req.Height, Prove: req.Prove, } - result, err := n.ABCIQueryWithOptions(ctx, req.Path, req.Data, opts) + result, err := q.ABCIQueryWithOptions(ctx, req.Path, req.Data, opts) if err != nil { return abci.ResponseQuery{}, err } @@ -154,15 +178,21 @@ func GetQueryContext(height uint64) (context.Context, context.CancelFunc) { } // QueryRawCommit queries the raw commit at a given height. -func (n *Node) QueryRawCommit(height int64) ([]byte, error) { +func (q RPCClient) QueryRawCommit(height int64) ([]byte, error) { ctx, cancel := GetQueryContext(uint64(height)) defer cancel() - return n.RawCommit(ctx, &height) + return q.RawCommit(ctx, &height) } // QueryBlockBulk queries blocks in bulk. -func (n *Node) QueryBlockBulk(start uint64, end uint64) ([][]byte, error) { +func (q RPCClient) QueryBlockBulk(start uint64, end uint64) ([][]byte, error) { + ctx, cancel := GetQueryContext(0) + defer cancel() + return q.BlockBulk(ctx, &start, &end) +} + +func (q RPCClient) QueryTx(txHash []byte) (*coretypes.ResultTx, error) { ctx, cancel := GetQueryContext(0) defer cancel() - return n.BlockBulk(ctx, &start, &end) + return q.Tx(ctx, txHash, false) } diff --git a/node/types/config.go b/node/types/config.go index 7b6a85d..dbfc689 100644 --- a/node/types/config.go +++ b/node/types/config.go @@ -1,13 +1,45 @@ package types +import ( + "fmt" + + btypes "github.com/initia-labs/opinit-bots-go/node/broadcaster/types" +) + +type BlockProcessType uint8 + +const ( + PROCESS_TYPE_DEFAULT BlockProcessType = iota + PROCESS_TYPE_RAW + PROCESS_TYPE_ONLY_BROADCAST +) + type NodeConfig struct { - RPC string `json:"rpc"` - ChainID string `json:"chain_id"` + RPC string + + // BlockProcessType is the type of block process. + ProcessType BlockProcessType - // Mnemonic is the mnemonic phrase for the bot account. + // You can leave it empty, then the bot will skip the transaction submission. + BroadcasterConfig *btypes.BroadcasterConfig +} + +func (nc NodeConfig) Validate() error { + if nc.RPC == "" { + return fmt.Errorf("rpc is empty") + } + + if nc.ProcessType > PROCESS_TYPE_ONLY_BROADCAST { + return fmt.Errorf("invalid process type") + } + + // Validated in broadcaster // - // If you don't want to use the mnemonic, you can leave it empty. - // Then the bot will skip the tx submission. - Mnemonic string `json:"mnemonic"` - GasPrice string `json:"gas_price"` + // if nc.BroadcasterConfig != nil { + // if err := nc.BroadcasterConfig.Validate(); err != nil { + // return err + // } + // } + + return nil } diff --git a/node/types/const.go b/node/types/const.go index 129423b..152e43d 100644 --- a/node/types/const.go +++ b/node/types/const.go @@ -5,15 +5,3 @@ import ( ) const POLLING_INTERVAL = 1 * time.Second -const MSG_QUEUE_SIZE = 20 -const MAX_PENDING_TXS = 5 -const GAS_ADJUSTMENT = 1.5 -const KEY_NAME = "key" -const TX_TIMEOUT = 30 * time.Second - -type BlockProcessType uint8 - -const ( - PROCESS_TYPE_DEFAULT BlockProcessType = iota - PROCESS_TYPE_RAW -) diff --git a/node/types/key.go b/node/types/key.go index c88d120..bd2c9a1 100644 --- a/node/types/key.go +++ b/node/types/key.go @@ -1,20 +1,6 @@ package types -import ( - dbtypes "github.com/initia-labs/opinit-bots-go/db/types" -) - var ( // Keys LastProcessedBlockHeightKey = []byte("last_processed_block_height") - PendingTxsKey = []byte("pending_txs") - ProcessedMsgsKey = []byte("processed_msgs") ) - -func PrefixedPendingTx(sequence uint64) []byte { - return append(append(PendingTxsKey, dbtypes.Splitter), dbtypes.FromUint64Key(sequence)...) -} - -func PrefixedProcessedMsgs(timestamp uint64) []byte { - return append(append(ProcessedMsgsKey, dbtypes.Splitter), dbtypes.FromUint64Key(timestamp)...) -} diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml new file mode 100644 index 0000000..b071dd1 --- /dev/null +++ b/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: . + opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - name: grpc-gateway + out: . + opt: logtostderr=true,allow_colon_final_segments=true diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 0000000..50eeeb3 --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,48 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 05419252bcc241ea8023acf1ed4cadc5 + digest: shake256:1e54a48c19a8b59d35e0a7efa76402939f515f2d8005df099856f24c37c20a52800308f025abb8cffcd014d437b49707388aaca4865d9d063d8f25d5d4eb77d5 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: cosmos + repository: ibc + commit: 7ab44ae956a0488ea04e04511efa5f70 + digest: shake256:95cc5472ddf692d23654b7e5adfd79149469dcc90657f9a1f80ee3fea8af639cff59cd849efca0567d270118eea7c7ff2f7e60c562545bace410b8eece27577e + - remote: buf.build + owner: cosmos + repository: ics23 + commit: 55085f7c710a45f58fa09947208eb70b + digest: shake256:9bf0bc495b5a11c88d163d39ef521bc4b00bc1374a05758c91d82821bdc61f09e8c2c51dda8452529bf80137f34d852561eacbe9550a59015d51cecb0dacb628 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 8bc2c51e08c447cd8886cdea48a73e14 + digest: shake256:a969155953a5cedc5b2df5b42c368f2bc66ff8ce1804bc96e0f14ff2ee8a893687963058909df844d1643cdbc98ff099d2daa6bc9f9f5b8886c49afdc60e19af + - remote: buf.build + owner: penumbra-zone + repository: penumbra + commit: 0f19465cf9f74d0193ffcc296748edf5 + digest: shake256:c57bc789078e1a5ccc0332696c4dc8df0718ecb52d7129a9b4581a9051dcf92de75462420a46b31b496854f21d049c65338c23ee44aff1ea67ffd21aea04e322 + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: 657250e6a39648cbb169d079a60bd9ba + digest: shake256:00de25001b8dd2e29d85fc4bcc3ede7aed886d76d67f5e0f7a9b320b90f871d3eb73507d50818d823a0512f3f8db77a11c043685528403e31ff3fef18323a9fb + - remote: buf.build + owner: tendermint + repository: tendermint + commit: 33ed361a90514289beabf3189e1d7665 + digest: shake256:038267e06294714fd883610626554b04a127b576b4e253befb4206cb72d5d3c1eeccacd4b9ec8e3fb891f7c14e1cb0f770c077d2989638995b0a61c85afedb1d diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 0000000..008d820 --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,7 @@ +version: v1 +deps: + - buf.build/penumbra-zone/penumbra + - buf.build/cosmos/cosmos-sdk + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis \ No newline at end of file diff --git a/proto/celestia/blob/v1/tx.proto b/proto/celestia/blob/v1/tx.proto new file mode 100644 index 0000000..064be25 --- /dev/null +++ b/proto/celestia/blob/v1/tx.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package celestia.blob.v1; + +import "celestia/core/v1/blob/blob.proto"; + +option go_package = "github.com/initia-labs/opinit-bots-go/types/celestia"; + +// MsgPayForBlobs pays for the inclusion of a blob in the block. +message MsgPayForBlobs { + // signer is the bech32 encoded signer address. See + // https://en.bitcoin.it/wiki/Bech32. + string signer = 1; + // namespaces is a list of namespaces that the blobs are associated with. A + // namespace is a byte slice of length 29 where the first byte is the + // namespaceVersion and the subsequent 28 bytes are the namespaceId. + repeated bytes namespaces = 2; + // blob_sizes is a list of blob sizes (one per blob). Each size is in bytes. + repeated uint32 blob_sizes = 3; + // share_commitments is a list of share commitments (one per blob). + repeated bytes share_commitments = 4; + // share_versions are the versions of the share format that the blobs + // associated with this message should use when included in a block. The + // share_versions specified must match the share_versions used to generate the + // share_commitment in this message. + repeated uint32 share_versions = 8; +} + +// MsgPayForBlobsWithBlob is a wrapper message that includes a MsgPayForBlobs +message MsgPayForBlobsWithBlob { + MsgPayForBlobs msg_pay_for_blobs = 1; + celestia.core.v1.blob.Blob blob = 2; +} \ No newline at end of file diff --git a/proto/celestia/core/v1/blob/blob.proto b/proto/celestia/core/v1/blob/blob.proto new file mode 100644 index 0000000..a5b7755 --- /dev/null +++ b/proto/celestia/core/v1/blob/blob.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package celestia.core.v1.blob; + +option go_package = "github.com/initia-labs/opinit-bots-go/types/celestia"; + +// Blob (named after binary large object) is a chunk of data submitted by a user +// to be published to the Celestia blockchain. The data of a Blob is published +// to a namespace and is encoded into shares based on the format specified by +// share_version. +message Blob { + bytes namespace_id = 1; + bytes data = 2; + uint32 share_version = 3; + uint32 namespace_version = 4; +} + +// BlobTx wraps an encoded sdk.Tx with a second field to contain blobs of data. +// The raw bytes of the blobs are not signed over, instead we verify each blob +// using the relevant MsgPayForBlobs that is signed over in the encoded sdk.Tx. +message BlobTx { + bytes tx = 1; + repeated Blob blobs = 2; + string type_id = 3; +} \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh new file mode 100644 index 0000000..b11f78b --- /dev/null +++ b/scripts/protocgen.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# How to run manually: +# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" +# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh + +set -e +echo "Generating gogo proto code" + +cd proto +proto_dirs=$(find ./ -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +for dir in $proto_dirs; do + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... + # gogo proto files SHOULD ONLY be generated if this is false + # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf + if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then + buf generate --template buf.gen.gogo.yaml $file + fi + done +done + +# move proto files to the right places +cp -r github.com/initia-labs/opinit-bots-go/types/* ../types/ +rm -rf github.com diff --git a/types/celestia/blob.pb.go b/types/celestia/blob.pb.go new file mode 100644 index 0000000..acde3d4 --- /dev/null +++ b/types/celestia/blob.pb.go @@ -0,0 +1,740 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: celestia/core/v1/blob/blob.proto + +package celestia + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Blob (named after binary large object) is a chunk of data submitted by a user +// to be published to the Celestia blockchain. The data of a Blob is published +// to a namespace and is encoded into shares based on the format specified by +// share_version. +type Blob struct { + NamespaceId []byte `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ShareVersion uint32 `protobuf:"varint,3,opt,name=share_version,json=shareVersion,proto3" json:"share_version,omitempty"` + NamespaceVersion uint32 `protobuf:"varint,4,opt,name=namespace_version,json=namespaceVersion,proto3" json:"namespace_version,omitempty"` +} + +func (m *Blob) Reset() { *m = Blob{} } +func (m *Blob) String() string { return proto.CompactTextString(m) } +func (*Blob) ProtoMessage() {} +func (*Blob) Descriptor() ([]byte, []int) { + return fileDescriptor_c6da8a12c2dbf976, []int{0} +} +func (m *Blob) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Blob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Blob.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 *Blob) XXX_Merge(src proto.Message) { + xxx_messageInfo_Blob.Merge(m, src) +} +func (m *Blob) XXX_Size() int { + return m.Size() +} +func (m *Blob) XXX_DiscardUnknown() { + xxx_messageInfo_Blob.DiscardUnknown(m) +} + +var xxx_messageInfo_Blob proto.InternalMessageInfo + +func (m *Blob) GetNamespaceId() []byte { + if m != nil { + return m.NamespaceId + } + return nil +} + +func (m *Blob) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *Blob) GetShareVersion() uint32 { + if m != nil { + return m.ShareVersion + } + return 0 +} + +func (m *Blob) GetNamespaceVersion() uint32 { + if m != nil { + return m.NamespaceVersion + } + return 0 +} + +// BlobTx wraps an encoded sdk.Tx with a second field to contain blobs of data. +// The raw bytes of the blobs are not signed over, instead we verify each blob +// using the relevant MsgPayForBlobs that is signed over in the encoded sdk.Tx. +type BlobTx struct { + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + Blobs []*Blob `protobuf:"bytes,2,rep,name=blobs,proto3" json:"blobs,omitempty"` + TypeId string `protobuf:"bytes,3,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"` +} + +func (m *BlobTx) Reset() { *m = BlobTx{} } +func (m *BlobTx) String() string { return proto.CompactTextString(m) } +func (*BlobTx) ProtoMessage() {} +func (*BlobTx) Descriptor() ([]byte, []int) { + return fileDescriptor_c6da8a12c2dbf976, []int{1} +} +func (m *BlobTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlobTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlobTx.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 *BlobTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlobTx.Merge(m, src) +} +func (m *BlobTx) XXX_Size() int { + return m.Size() +} +func (m *BlobTx) XXX_DiscardUnknown() { + xxx_messageInfo_BlobTx.DiscardUnknown(m) +} + +var xxx_messageInfo_BlobTx proto.InternalMessageInfo + +func (m *BlobTx) GetTx() []byte { + if m != nil { + return m.Tx + } + return nil +} + +func (m *BlobTx) GetBlobs() []*Blob { + if m != nil { + return m.Blobs + } + return nil +} + +func (m *BlobTx) GetTypeId() string { + if m != nil { + return m.TypeId + } + return "" +} + +func init() { + proto.RegisterType((*Blob)(nil), "celestia.core.v1.blob.Blob") + proto.RegisterType((*BlobTx)(nil), "celestia.core.v1.blob.BlobTx") +} + +func init() { proto.RegisterFile("celestia/core/v1/blob/blob.proto", fileDescriptor_c6da8a12c2dbf976) } + +var fileDescriptor_c6da8a12c2dbf976 = []byte{ + // 299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4b, 0xf3, 0x30, + 0x18, 0xc7, 0x97, 0x6e, 0xef, 0x5e, 0xcc, 0x36, 0xd1, 0x80, 0x58, 0x10, 0x42, 0x9d, 0x97, 0x82, + 0x34, 0xa1, 0xea, 0x27, 0xd8, 0x6d, 0x17, 0x0f, 0x45, 0x3c, 0x78, 0x19, 0x49, 0x1b, 0xb6, 0x40, + 0xd7, 0x94, 0x26, 0x96, 0xfa, 0x29, 0xf4, 0x63, 0x79, 0xdc, 0xd1, 0xa3, 0xb4, 0x5f, 0x44, 0x92, + 0xad, 0xf3, 0xe2, 0x25, 0xe4, 0x79, 0xfe, 0xbf, 0x3c, 0xfc, 0x9e, 0xc0, 0x20, 0x15, 0xb9, 0xd0, + 0x46, 0x32, 0x9a, 0xaa, 0x4a, 0xd0, 0x3a, 0xa6, 0x3c, 0x57, 0xdc, 0x1d, 0xa4, 0xac, 0x94, 0x51, + 0xe8, 0xa2, 0x27, 0x88, 0x25, 0x48, 0x1d, 0x13, 0x1b, 0xce, 0xdf, 0x01, 0x1c, 0x2d, 0x72, 0xc5, + 0xd1, 0x35, 0x9c, 0x16, 0x6c, 0x2b, 0x74, 0xc9, 0x52, 0xb1, 0x92, 0x99, 0x0f, 0x02, 0x10, 0x4e, + 0x93, 0xc9, 0xb1, 0xb7, 0xcc, 0x10, 0x82, 0xa3, 0x8c, 0x19, 0xe6, 0x7b, 0x2e, 0x72, 0x77, 0x74, + 0x03, 0x67, 0x7a, 0xc3, 0x2a, 0xb1, 0xaa, 0x45, 0xa5, 0xa5, 0x2a, 0xfc, 0x61, 0x00, 0xc2, 0x59, + 0x32, 0x75, 0xcd, 0xe7, 0x7d, 0x0f, 0xdd, 0xc2, 0xf3, 0xdf, 0xd9, 0x3d, 0x38, 0x72, 0xe0, 0xd9, + 0x31, 0x38, 0xc0, 0xf3, 0x0c, 0x8e, 0xad, 0xd0, 0x53, 0x83, 0x4e, 0xa1, 0x67, 0x9a, 0x83, 0x88, + 0x67, 0x1a, 0x14, 0xc3, 0x7f, 0xd6, 0x59, 0xfb, 0x5e, 0x30, 0x0c, 0x27, 0x77, 0x57, 0xe4, 0xcf, + 0x95, 0x88, 0x7d, 0x9d, 0xec, 0x49, 0x74, 0x09, 0xff, 0x9b, 0xb7, 0xd2, 0x2d, 0x64, 0xc5, 0x4e, + 0x92, 0xb1, 0x2d, 0x97, 0xd9, 0xe2, 0xf1, 0xb3, 0xc5, 0x60, 0xd7, 0x62, 0xf0, 0xdd, 0x62, 0xf0, + 0xd1, 0xe1, 0xc1, 0xae, 0xc3, 0x83, 0xaf, 0x0e, 0x0f, 0x5e, 0x1e, 0xd6, 0xd2, 0x6c, 0x5e, 0x39, + 0x49, 0xd5, 0x96, 0xca, 0x42, 0x1a, 0xc9, 0xa2, 0x9c, 0x71, 0x4d, 0x55, 0x69, 0xab, 0x88, 0x2b, + 0xa3, 0xa3, 0xb5, 0xa2, 0x76, 0x8e, 0xa6, 0xbd, 0x01, 0x1f, 0xbb, 0x5f, 0xbe, 0xff, 0x09, 0x00, + 0x00, 0xff, 0xff, 0x27, 0x46, 0x48, 0xfa, 0x89, 0x01, 0x00, 0x00, +} + +func (m *Blob) 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 *Blob) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Blob) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamespaceVersion != 0 { + i = encodeVarintBlob(dAtA, i, uint64(m.NamespaceVersion)) + i-- + dAtA[i] = 0x20 + } + if m.ShareVersion != 0 { + i = encodeVarintBlob(dAtA, i, uint64(m.ShareVersion)) + i-- + dAtA[i] = 0x18 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintBlob(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.NamespaceId) > 0 { + i -= len(m.NamespaceId) + copy(dAtA[i:], m.NamespaceId) + i = encodeVarintBlob(dAtA, i, uint64(len(m.NamespaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlobTx) 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 *BlobTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlobTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TypeId) > 0 { + i -= len(m.TypeId) + copy(dAtA[i:], m.TypeId) + i = encodeVarintBlob(dAtA, i, uint64(len(m.TypeId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Blobs) > 0 { + for iNdEx := len(m.Blobs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Blobs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBlob(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Tx) > 0 { + i -= len(m.Tx) + copy(dAtA[i:], m.Tx) + i = encodeVarintBlob(dAtA, i, uint64(len(m.Tx))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBlob(dAtA []byte, offset int, v uint64) int { + offset -= sovBlob(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Blob) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NamespaceId) + if l > 0 { + n += 1 + l + sovBlob(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovBlob(uint64(l)) + } + if m.ShareVersion != 0 { + n += 1 + sovBlob(uint64(m.ShareVersion)) + } + if m.NamespaceVersion != 0 { + n += 1 + sovBlob(uint64(m.NamespaceVersion)) + } + return n +} + +func (m *BlobTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tx) + if l > 0 { + n += 1 + l + sovBlob(uint64(l)) + } + if len(m.Blobs) > 0 { + for _, e := range m.Blobs { + l = e.Size() + n += 1 + l + sovBlob(uint64(l)) + } + } + l = len(m.TypeId) + if l > 0 { + n += 1 + l + sovBlob(uint64(l)) + } + return n +} + +func sovBlob(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBlob(x uint64) (n int) { + return sovBlob(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Blob) 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 ErrIntOverflowBlob + } + 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: Blob: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Blob: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBlob + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBlob + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NamespaceId = append(m.NamespaceId[:0], dAtA[iNdEx:postIndex]...) + if m.NamespaceId == nil { + m.NamespaceId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBlob + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBlob + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareVersion", wireType) + } + m.ShareVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ShareVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceVersion", wireType) + } + m.NamespaceVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NamespaceVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBlob(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBlob + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlobTx) 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 ErrIntOverflowBlob + } + 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: BlobTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlobTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBlob + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBlob + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) + if m.Tx == nil { + m.Tx = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Blobs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBlob + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBlob + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Blobs = append(m.Blobs, &Blob{}) + if err := m.Blobs[len(m.Blobs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlob + } + 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 ErrInvalidLengthBlob + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBlob + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBlob(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBlob + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBlob(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBlob + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBlob + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBlob + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthBlob + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBlob + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBlob + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBlob = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBlob = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBlob = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/celestia/codec.go b/types/celestia/codec.go new file mode 100644 index 0000000..874d6f9 --- /dev/null +++ b/types/celestia/codec.go @@ -0,0 +1,17 @@ +package celestia + +import ( + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// RegisterInterfaces register the Ethermint key concrete types. +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), &MsgPayForBlobs{}, &MsgPayForBlobsWithBlob{}) +} + +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgPayForBlobs{}, "/celestia.blob.v1.MsgPayForBlobs", nil) + cdc.RegisterConcrete(&MsgPayForBlobsWithBlob{}, "/celestia.blob.v1.MsgPayForBlobsWithBlob", nil) +} diff --git a/types/celestia/tx.pb.go b/types/celestia/tx.pb.go new file mode 100644 index 0000000..5c9fbd0 --- /dev/null +++ b/types/celestia/tx.pb.go @@ -0,0 +1,906 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: celestia/blob/v1/tx.proto + +package celestia + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgPayForBlobs pays for the inclusion of a blob in the block. +type MsgPayForBlobs struct { + // signer is the bech32 encoded signer address. See + // https://en.bitcoin.it/wiki/Bech32. + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // namespaces is a list of namespaces that the blobs are associated with. A + // namespace is a byte slice of length 29 where the first byte is the + // namespaceVersion and the subsequent 28 bytes are the namespaceId. + Namespaces [][]byte `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + // blob_sizes is a list of blob sizes (one per blob). Each size is in bytes. + BlobSizes []uint32 `protobuf:"varint,3,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"` + // share_commitments is a list of share commitments (one per blob). + ShareCommitments [][]byte `protobuf:"bytes,4,rep,name=share_commitments,json=shareCommitments,proto3" json:"share_commitments,omitempty"` + // share_versions are the versions of the share format that the blobs + // associated with this message should use when included in a block. The + // share_versions specified must match the share_versions used to generate the + // share_commitment in this message. + ShareVersions []uint32 `protobuf:"varint,8,rep,packed,name=share_versions,json=shareVersions,proto3" json:"share_versions,omitempty"` +} + +func (m *MsgPayForBlobs) Reset() { *m = MsgPayForBlobs{} } +func (m *MsgPayForBlobs) String() string { return proto.CompactTextString(m) } +func (*MsgPayForBlobs) ProtoMessage() {} +func (*MsgPayForBlobs) Descriptor() ([]byte, []int) { + return fileDescriptor_9157fbf3d3cd004d, []int{0} +} +func (m *MsgPayForBlobs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayForBlobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayForBlobs.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 *MsgPayForBlobs) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayForBlobs.Merge(m, src) +} +func (m *MsgPayForBlobs) XXX_Size() int { + return m.Size() +} +func (m *MsgPayForBlobs) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayForBlobs.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayForBlobs proto.InternalMessageInfo + +func (m *MsgPayForBlobs) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgPayForBlobs) GetNamespaces() [][]byte { + if m != nil { + return m.Namespaces + } + return nil +} + +func (m *MsgPayForBlobs) GetBlobSizes() []uint32 { + if m != nil { + return m.BlobSizes + } + return nil +} + +func (m *MsgPayForBlobs) GetShareCommitments() [][]byte { + if m != nil { + return m.ShareCommitments + } + return nil +} + +func (m *MsgPayForBlobs) GetShareVersions() []uint32 { + if m != nil { + return m.ShareVersions + } + return nil +} + +// MsgPayForBlobsWithBlob is a wrapper message that includes a MsgPayForBlobs +type MsgPayForBlobsWithBlob struct { + MsgPayForBlobs *MsgPayForBlobs `protobuf:"bytes,1,opt,name=msg_pay_for_blobs,json=msgPayForBlobs,proto3" json:"msg_pay_for_blobs,omitempty"` + Blob *Blob `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"` +} + +func (m *MsgPayForBlobsWithBlob) Reset() { *m = MsgPayForBlobsWithBlob{} } +func (m *MsgPayForBlobsWithBlob) String() string { return proto.CompactTextString(m) } +func (*MsgPayForBlobsWithBlob) ProtoMessage() {} +func (*MsgPayForBlobsWithBlob) Descriptor() ([]byte, []int) { + return fileDescriptor_9157fbf3d3cd004d, []int{1} +} +func (m *MsgPayForBlobsWithBlob) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayForBlobsWithBlob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayForBlobsWithBlob.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 *MsgPayForBlobsWithBlob) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayForBlobsWithBlob.Merge(m, src) +} +func (m *MsgPayForBlobsWithBlob) XXX_Size() int { + return m.Size() +} +func (m *MsgPayForBlobsWithBlob) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayForBlobsWithBlob.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayForBlobsWithBlob proto.InternalMessageInfo + +func (m *MsgPayForBlobsWithBlob) GetMsgPayForBlobs() *MsgPayForBlobs { + if m != nil { + return m.MsgPayForBlobs + } + return nil +} + +func (m *MsgPayForBlobsWithBlob) GetBlob() *Blob { + if m != nil { + return m.Blob + } + return nil +} + +func init() { + proto.RegisterType((*MsgPayForBlobs)(nil), "celestia.blob.v1.MsgPayForBlobs") + proto.RegisterType((*MsgPayForBlobsWithBlob)(nil), "celestia.blob.v1.MsgPayForBlobsWithBlob") +} + +func init() { proto.RegisterFile("celestia/blob/v1/tx.proto", fileDescriptor_9157fbf3d3cd004d) } + +var fileDescriptor_9157fbf3d3cd004d = []byte{ + // 352 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0x4f, 0x4a, 0x33, 0x31, + 0x14, 0xef, 0xb4, 0xa5, 0x7c, 0xcd, 0x67, 0x4b, 0x3b, 0x8b, 0x32, 0x2a, 0x86, 0xa1, 0x20, 0x14, + 0xa4, 0x13, 0xaa, 0x9e, 0xa0, 0x82, 0x1b, 0x51, 0x64, 0x04, 0x05, 0x37, 0x43, 0x32, 0xc4, 0x69, + 0x60, 0x32, 0x19, 0xf2, 0x62, 0xb1, 0x9e, 0xc2, 0x95, 0x97, 0xf1, 0x02, 0x2e, 0xbb, 0x74, 0x29, + 0xed, 0x45, 0x24, 0xb1, 0xb5, 0xd6, 0x5d, 0xde, 0xef, 0x5f, 0x5e, 0x7e, 0x41, 0xbb, 0x29, 0xcf, + 0x39, 0x18, 0x41, 0x09, 0xcb, 0x15, 0x23, 0xd3, 0x11, 0x31, 0x4f, 0x51, 0xa9, 0x95, 0x51, 0x7e, + 0x67, 0x4d, 0x45, 0x96, 0x8a, 0xa6, 0xa3, 0xbd, 0xf0, 0x47, 0x9c, 0x2a, 0xcd, 0xad, 0xd8, 0x99, + 0x1c, 0xed, 0x3c, 0xfd, 0x37, 0x0f, 0xb5, 0x2f, 0x21, 0xbb, 0xa6, 0xb3, 0x73, 0xa5, 0xc7, 0xb9, + 0x62, 0xe0, 0xf7, 0x50, 0x03, 0x44, 0x56, 0x70, 0x1d, 0x78, 0xa1, 0x37, 0x68, 0xc6, 0xab, 0xc9, + 0xc7, 0x08, 0x15, 0x54, 0x72, 0x28, 0x69, 0xca, 0x21, 0xa8, 0x86, 0xb5, 0xc1, 0x4e, 0xfc, 0x0b, + 0xf1, 0x0f, 0x10, 0xb2, 0xc1, 0x09, 0x88, 0x67, 0x0e, 0x41, 0x2d, 0xac, 0x0d, 0x5a, 0x71, 0xd3, + 0x22, 0x37, 0x16, 0xf0, 0x8f, 0x50, 0x17, 0x26, 0x54, 0xf3, 0x24, 0x55, 0x52, 0x0a, 0x23, 0x79, + 0x61, 0x20, 0xa8, 0xbb, 0x94, 0x8e, 0x23, 0xce, 0x36, 0xb8, 0x7f, 0x88, 0xda, 0xdf, 0xe2, 0x29, + 0xd7, 0x20, 0x54, 0x01, 0xc1, 0x3f, 0x97, 0xd7, 0x72, 0xe8, 0xed, 0x0a, 0xec, 0xbf, 0x7a, 0xa8, + 0xb7, 0xbd, 0xfd, 0x9d, 0x30, 0x13, 0x7b, 0xf0, 0x2f, 0x50, 0x57, 0x42, 0x96, 0x94, 0x74, 0x96, + 0x3c, 0x28, 0x9d, 0xd8, 0x3d, 0xc0, 0x3d, 0xe8, 0xff, 0x71, 0x18, 0xfd, 0x2d, 0x2a, 0xda, 0x0e, + 0x89, 0xdb, 0x72, 0xbb, 0x12, 0x82, 0xea, 0x56, 0x19, 0x54, 0x9d, 0x7f, 0x7f, 0xe3, 0xb7, 0xb5, + 0x5a, 0xbf, 0xcb, 0xb1, 0xda, 0xd8, 0x09, 0xc7, 0x57, 0xef, 0x0b, 0xec, 0xcd, 0x17, 0xd8, 0xfb, + 0x5c, 0x60, 0xef, 0x65, 0x89, 0x2b, 0xf3, 0x25, 0xae, 0x7c, 0x2c, 0x71, 0xe5, 0xfe, 0x34, 0x13, + 0x66, 0xf2, 0xc8, 0xa2, 0x54, 0x49, 0x22, 0x0a, 0x61, 0x04, 0x1d, 0xe6, 0x94, 0x01, 0x51, 0xa5, + 0x9d, 0x86, 0x4c, 0x19, 0x18, 0x66, 0x8a, 0x98, 0x59, 0xc9, 0x81, 0xac, 0xef, 0x61, 0x0d, 0xf7, + 0x5b, 0x27, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xe5, 0xaf, 0xdb, 0xfe, 0x01, 0x00, 0x00, +} + +func (m *MsgPayForBlobs) 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 *MsgPayForBlobs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayForBlobs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ShareVersions) > 0 { + dAtA2 := make([]byte, len(m.ShareVersions)*10) + var j1 int + for _, num := range m.ShareVersions { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintTx(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x42 + } + if len(m.ShareCommitments) > 0 { + for iNdEx := len(m.ShareCommitments) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ShareCommitments[iNdEx]) + copy(dAtA[i:], m.ShareCommitments[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.ShareCommitments[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.BlobSizes) > 0 { + dAtA4 := make([]byte, len(m.BlobSizes)*10) + var j3 int + for _, num := range m.BlobSizes { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintTx(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x1a + } + if len(m.Namespaces) > 0 { + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Namespaces[iNdEx]) + copy(dAtA[i:], m.Namespaces[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPayForBlobsWithBlob) 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 *MsgPayForBlobsWithBlob) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayForBlobsWithBlob) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Blob != nil { + { + size, err := m.Blob.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MsgPayForBlobs != nil { + { + size, err := m.MsgPayForBlobs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgPayForBlobs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Namespaces) > 0 { + for _, b := range m.Namespaces { + l = len(b) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.BlobSizes) > 0 { + l = 0 + for _, e := range m.BlobSizes { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + if len(m.ShareCommitments) > 0 { + for _, b := range m.ShareCommitments { + l = len(b) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.ShareVersions) > 0 { + l = 0 + for _, e := range m.ShareVersions { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + return n +} + +func (m *MsgPayForBlobsWithBlob) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MsgPayForBlobs != nil { + l = m.MsgPayForBlobs.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Blob != nil { + l = m.Blob.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgPayForBlobs) 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: MsgPayForBlobs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayForBlobs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, make([]byte, postIndex-iNdEx)) + copy(m.Namespaces[len(m.Namespaces)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BlobSizes = append(m.BlobSizes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.BlobSizes) == 0 { + m.BlobSizes = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BlobSizes = append(m.BlobSizes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field BlobSizes", wireType) + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareCommitments", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShareCommitments = append(m.ShareCommitments, make([]byte, postIndex-iNdEx)) + copy(m.ShareCommitments[len(m.ShareCommitments)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ShareVersions = append(m.ShareVersions, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.ShareVersions) == 0 { + m.ShareVersions = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ShareVersions = append(m.ShareVersions, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ShareVersions", wireType) + } + 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 *MsgPayForBlobsWithBlob) 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: MsgPayForBlobsWithBlob: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayForBlobsWithBlob: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgPayForBlobs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MsgPayForBlobs == nil { + m.MsgPayForBlobs = &MsgPayForBlobs{} + } + if err := m.MsgPayForBlobs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Blob == nil { + m.Blob = &Blob{} + } + if err := m.Blob.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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)