diff --git a/.env b/.env index 4b932f5..5b6ba0d 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ # Application settings START_TIMEOUT=20s # Start application timeout duration STOP_TIMEOUT=20s # Stop application timeout duration -MODULES=bank,core,auth,authz,distribution,gov,mint,staking,slashing,feegrant,ibc,liquidity # Modules for processing +MODULES=auth,authz,bandwidth,bank,core,distribution,dmn,feegrant,gov,graph,grid,ibc,liquidity,mint,rank,slashing,staking,wasm # Modules for processing CHAIN_PREFIX=cosmos # Prefix of indexing chain DEFAULT_DEMON=uatom # Default demon of chain coins PARSE_AVATAR_URL=false # Parse avatar url for validator from keychain. It will decrease index performance!!! @@ -14,6 +14,8 @@ METRICS_ENABLED=true RPC_URL=http://127.0.0.1:26657 # RPC API GRPC_URL=http://127.0.0.1:8090 # GRPC API GRPC_SECURE_CONNECTION=false # GRPC secure connection +GRPC_TIMEOUT=15s # GRPC requests timeout +RPC_TIMEOUT=15s # RPC requests timeout WS_ENABLED=true # Websocket enabled # Broker settings diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index dcd41b7..6c32d4d 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -18,15 +18,13 @@ jobs: DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} run: | docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - - name: Build specify tag + - name: Build and push specify tag run: | echo 'build image: bronbro/spacebox-crawler:${{github.ref_name}}' docker build -t bronbro/spacebox-crawler:${{github.ref_name}} --target=app --build-arg version=${{github.ref_name}} . - - name: Build latest tag + docker push bronbro/spacebox-crawler:${{github.ref_name}} + - name: Build and push latest tag if: startsWith(github.ref, 'refs/tags/v') - run: docker build -t bronbro/spacebox-crawler:latest --target=app --build-arg version=latest . - - name: push specify tag to registry - run: docker push bronbro/spacebox-crawler:${{github.ref_name}} - - name: push latest tag to registry - if: startsWith(github.ref, 'refs/tags/v') - run: docker push bronbro/spacebox-crawler:latest + run: | + docker build -t bronbro/spacebox-crawler:latest --target=app --build-arg version=latest . + docker push bronbro/spacebox-crawler:latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f44c5f..a456ee2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: 1.20.5 + go-version: 1.21.4 - name: lint run: make lint diff --git a/.gitignore b/.gitignore index 984eb20..22a0ed6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ vendor/ .idea/ volumes/ -.env.local \ No newline at end of file +.env.local +tmp +bin \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0360b1a..1dde372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.5-alpine as builder +FROM golang:1.21.4-alpine as builder ARG version @@ -8,10 +8,18 @@ RUN apk update && apk add --no-cache make git build-base musl-dev librdkafka lib WORKDIR /go/src/github.com/spacebox-crawler COPY . ./ + +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 465e3a088e96fd009a11bfd234c69fb8a0556967677e54511c084f815cf9ce63 + +# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` +RUN cp /lib/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.a + + RUN echo "build binary" && \ export PATH=$PATH:/usr/local/go/bin && \ go mod download && \ - go build -ldflags="-X 'main.Version=$version'" -tags musl /go/src/github.com/spacebox-crawler/cmd/main.go && \ + go build -ldflags="-X 'main.Version=$version' -linkmode=external -extldflags '-Wl,-z,muldefs -static'" -tags musl,muslc,netgo /go/src/github.com/spacebox-crawler/cmd/main.go && \ mkdir -p /spacebox-crawler && \ mv main /spacebox-crawler/main && \ rm -Rf /usr/local/go/src diff --git a/Makefile b/Makefile index ce2006e..e337b25 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,9 @@ race: dep ## Run data race detector @go test -race ./... -count=1 install-linter: ## Install golangci-lint - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 + @mkdir -p bin + @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b bin v1.55.2 + @bin/golangci-lint --version lint: install-linter ## Lint the files ./scripts/golint.sh diff --git a/adapter/storage/block.go b/adapter/storage/block.go index 57ca499..4539f4b 100644 --- a/adapter/storage/block.go +++ b/adapter/storage/block.go @@ -98,7 +98,7 @@ func (s *Storage) GetErrorBlockHeights(ctx context.Context) ([]int64, error) { return res, nil } -func (s *Storage) GetAllBlocks(ctx context.Context) ([]*model.Block, error) { +func (s *Storage) GetAllBlocks(ctx context.Context) (blocks []*model.Block, err error) { cursor, err := s.blocksCollection.Find(ctx, bson.D{}) if err != nil { return nil, err @@ -109,7 +109,6 @@ func (s *Storage) GetAllBlocks(ctx context.Context) ([]*model.Block, error) { } }() - blocks := make([]*model.Block, 0) if err = cursor.All(ctx, &blocks); err != nil { return nil, err } diff --git a/adapter/storage/model/tx.go b/adapter/storage/model/tx.go new file mode 100644 index 0000000..21c39cd --- /dev/null +++ b/adapter/storage/model/tx.go @@ -0,0 +1,10 @@ +package model + +import "time" + +type Tx struct { + Created time.Time + ErrorMessage string `bson:"error_message"` + Hash string `bson:"hash"` + Height int64 `bson:"height"` +} diff --git a/adapter/storage/storage.go b/adapter/storage/storage.go index 56f4983..6623e27 100644 --- a/adapter/storage/storage.go +++ b/adapter/storage/storage.go @@ -15,6 +15,7 @@ type Storage struct { cli *mongo.Client blocksCollection *mongo.Collection messagesCollection *mongo.Collection + txCollection *mongo.Collection cfg Config } @@ -61,6 +62,7 @@ func (s *Storage) Start(ctx context.Context) error { blocksCollection := s.cli.Database("spacebox").Collection("blocks") s.blocksCollection = blocksCollection s.messagesCollection = s.cli.Database("spacebox").Collection("error_messages") + s.txCollection = s.cli.Database("spacebox").Collection("error_txs") mod := mongo.IndexModel{ Keys: bson.M{"height": 1}, // index in ascending order or -1 for descending order diff --git a/adapter/storage/tx.go b/adapter/storage/tx.go new file mode 100644 index 0000000..112579e --- /dev/null +++ b/adapter/storage/tx.go @@ -0,0 +1,21 @@ +package storage + +import ( + "context" + + "go.mongodb.org/mongo-driver/bson" + + "github.com/bro-n-bro/spacebox-crawler/adapter/storage/model" +) + +func (s *Storage) InsertErrorTx(ctx context.Context, tx model.Tx) error { + if _, err := s.txCollection.InsertOne(ctx, tx); err != nil { + return err + } + + return nil +} + +func (s *Storage) CountErrorTxs(ctx context.Context) (int64, error) { + return s.txCollection.CountDocuments(ctx, bson.D{}) +} diff --git a/client/grpc/client.go b/client/grpc/client.go index e10ecd7..2d5090c 100644 --- a/client/grpc/client.go +++ b/client/grpc/client.go @@ -17,53 +17,75 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + bandwidthtypes "github.com/cybercongress/go-cyber/x/bandwidth/types" + dmntypes "github.com/cybercongress/go-cyber/x/dmn/types" + graphtypes "github.com/cybercongress/go-cyber/x/graph/types" + gridtypes "github.com/cybercongress/go-cyber/x/grid/types" + ranktypes "github.com/cybercongress/go-cyber/x/rank/types" + resourcestypes "github.com/cybercongress/go-cyber/x/resources/types" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/timeout" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/rs/zerolog" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" + "github.com/bro-n-bro/spacebox-crawler/adapter/storage/model" liquiditytypes "github.com/bro-n-bro/spacebox-crawler/types/liquidity" ) -type Client struct { - SlashingQueryClient slashingtypes.QueryClient - TmsService tmservice.ServiceClient - TxService tx.ServiceClient - BankQueryClient banktypes.QueryClient - AuthQueryClient authtypes.QueryClient - GovQueryClient govtypes.QueryClient - MintQueryClient minttypes.QueryClient - StakingQueryClient stakingtypes.QueryClient - DistributionQueryClient distributiontypes.QueryClient - AuthzQueryClient authztypes.QueryClient - FeegrantQueryClient feegranttypes.QueryClient - IbcTransferQueryClient ibctransfertypes.QueryClient - LiquidityQueryClient liquiditytypes.QueryClient - conn *grpc.ClientConn - log *zerolog.Logger - cfg Config -} +type ( + storage interface { + InsertErrorTx(ctx context.Context, tx model.Tx) error + } + + Client struct { + SlashingQueryClient slashingtypes.QueryClient + TmsService tmservice.ServiceClient + TxService tx.ServiceClient + BankQueryClient banktypes.QueryClient + AuthQueryClient authtypes.QueryClient + GovQueryClient govtypes.QueryClient + MintQueryClient minttypes.QueryClient + StakingQueryClient stakingtypes.QueryClient + DistributionQueryClient distributiontypes.QueryClient + AuthzQueryClient authztypes.QueryClient + FeegrantQueryClient feegranttypes.QueryClient + IbcTransferQueryClient ibctransfertypes.QueryClient + LiquidityQueryClient liquiditytypes.QueryClient + GraphQueryClient graphtypes.QueryClient + BandwidthQueryClient bandwidthtypes.QueryClient + DMNQueryClient dmntypes.QueryClient + GridQueryClient gridtypes.QueryClient + RankQueryClient ranktypes.QueryClient + ResourcesQueryClient resourcestypes.QueryClient + conn *grpc.ClientConn + log *zerolog.Logger + storage storage + cfg Config + } +) -func New(cfg Config, l zerolog.Logger) *Client { +func New(cfg Config, l zerolog.Logger, st storage) *Client { l = l.With().Str("cmp", "grpc-client").Logger() - return &Client{cfg: cfg, log: &l} + return &Client{cfg: cfg, log: &l, storage: st} } func (c *Client) Start(ctx context.Context) error { - ctx, cancel := context.WithTimeout(ctx, 15*time.Second) + ctx, cancel := context.WithTimeout(ctx, 15*time.Second) // dial timeout defer cancel() options := []grpc.DialOption{ grpc.WithBlock(), + grpc.WithChainUnaryInterceptor(timeout.UnaryClientInterceptor(c.cfg.Timeout)), // request timeout } if c.cfg.MetricsEnabled { options = append( options, - grpc.WithUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor), - grpc.WithStreamInterceptor(grpc_prometheus.StreamClientInterceptor), + grpc.WithChainUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor), + grpc.WithChainStreamInterceptor(grpc_prometheus.StreamClientInterceptor), ) grpc_prometheus.EnableClientHandlingTimeHistogram() @@ -99,12 +121,16 @@ func (c *Client) Start(ctx context.Context) error { c.IbcTransferQueryClient = ibctransfertypes.NewQueryClient(grpcConn) c.LiquidityQueryClient = liquiditytypes.NewQueryClient(grpcConn) c.AuthQueryClient = authtypes.NewQueryClient(grpcConn) + c.GraphQueryClient = graphtypes.NewQueryClient(grpcConn) + c.BandwidthQueryClient = bandwidthtypes.NewQueryClient(grpcConn) + c.DMNQueryClient = dmntypes.NewQueryClient(grpcConn) + c.GridQueryClient = gridtypes.NewQueryClient(grpcConn) + c.RankQueryClient = ranktypes.NewQueryClient(grpcConn) + c.ResourcesQueryClient = resourcestypes.NewQueryClient(grpcConn) c.conn = grpcConn return nil } -func (c *Client) Stop(_ context.Context) error { - return c.conn.Close() -} +func (c *Client) Stop(_ context.Context) error { return c.conn.Close() } diff --git a/client/grpc/config.go b/client/grpc/config.go index c01e8b4..cd82d23 100644 --- a/client/grpc/config.go +++ b/client/grpc/config.go @@ -1,7 +1,12 @@ package grpc -type Config struct { - Host string `env:"GRPC_URL" envDefault:"http://localhost:9090"` - SecureConnection bool `env:"GRPC_SECURE_CONNECTION" envDefault:"false"` - MetricsEnabled bool `env:"METRICS_ENABLED" envDefault:"false"` -} +import "time" + +type ( + Config struct { + Host string `env:"GRPC_URL" envDefault:"http://localhost:9090"` + SecureConnection bool `env:"GRPC_SECURE_CONNECTION" envDefault:"false"` + MetricsEnabled bool `env:"METRICS_ENABLED" envDefault:"false"` + Timeout time.Duration `env:"GRPC_TIMEOUT" envDefault:"15s"` + } +) diff --git a/client/grpc/tx.go b/client/grpc/tx.go index c5cf021..75914c0 100644 --- a/client/grpc/tx.go +++ b/client/grpc/tx.go @@ -3,9 +3,12 @@ package grpc import ( "context" "encoding/hex" + "time" cometbfttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/types/tx" + + "github.com/bro-n-bro/spacebox-crawler/adapter/storage/model" ) // Txs queries for all the transactions in a block. Transactions are returned @@ -15,9 +18,18 @@ func (c *Client) Txs(ctx context.Context, height int64, txs cometbfttypes.Txs) ( txResponses := make([]*tx.GetTxResponse, 0, len(txs)) for _, tmTx := range txs { - respPb, err := c.TxService.GetTx(ctx, &tx.GetTxRequest{Hash: hex.EncodeToString(tmTx.Hash())}) + hash := hex.EncodeToString(tmTx.Hash()) + + respPb, err := c.TxService.GetTx(ctx, &tx.GetTxRequest{Hash: hash}) if err != nil { - c.log.Error().Err(err).Int64("height", height).Msg("GetTx error") + _ = c.storage.InsertErrorTx(ctx, model.Tx{ + Created: time.Now(), + ErrorMessage: err.Error(), + Hash: hash, + Height: height, + }) + + c.log.Warn().Err(err).Int64("height", height).Msg("GetTx error") continue } diff --git a/client/grpc/utls.go b/client/grpc/utils.go similarity index 100% rename from client/grpc/utls.go rename to client/grpc/utils.go diff --git a/client/rpc/blocker.go b/client/rpc/blocker.go index 7c208c0..46dbbb8 100644 --- a/client/rpc/blocker.go +++ b/client/rpc/blocker.go @@ -8,6 +8,9 @@ import ( // GetBlockEvents returns begin block and end block events. func (c *Client) GetBlockEvents(ctx context.Context, height int64) (begin, end types.BlockerEvents, err error) { + ctx, cancel := context.WithTimeout(ctx, c.cfg.Timeout) + defer cancel() + result, err := c.RPCClient.BlockResults(ctx, &height) if err != nil { return nil, nil, err diff --git a/client/rpc/client.go b/client/rpc/client.go index 3dc8b7a..c6bc547 100644 --- a/client/rpc/client.go +++ b/client/rpc/client.go @@ -2,7 +2,6 @@ package rpc import ( "context" - "net/http" cometbftHttp "github.com/cometbft/cometbft/rpc/client/http" jsonrpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" @@ -12,8 +11,7 @@ type Client struct { *jsonrpcclient.WSClient *cometbftHttp.WSEvents - RPCClient *cometbftHttp.HTTP - HTTPClient *http.Client + RPCClient *cometbftHttp.HTTP cfg Config } @@ -23,17 +21,11 @@ func New(cfg Config) *Client { } func (c *Client) Start(ctx context.Context) error { - httpCli, err := jsonrpcclient.DefaultHTTPClient(c.cfg.Host) - if err != nil { - return err - } - - c.HTTPClient = httpCli - // FIXME: does not work without websocket connection var rpcCli *cometbftHttp.HTTP if c.cfg.WSEnabled { - rpcCli, err = cometbftHttp.NewWithClient(c.cfg.Host, "/websocket", httpCli) + var err error + rpcCli, err = cometbftHttp.NewWithTimeout(c.cfg.Host, "/websocket", uint(c.cfg.Timeout.Seconds())) if err != nil { return err } @@ -42,7 +34,8 @@ func (c *Client) Start(ctx context.Context) error { return err } } else { - rpcCli, err = cometbftHttp.NewWithClient(c.cfg.Host, "", httpCli) + var err error + rpcCli, err = cometbftHttp.NewWithTimeout(c.cfg.Host, "", uint(c.cfg.Timeout.Seconds())) if err != nil { return err } @@ -56,9 +49,7 @@ func (c *Client) Start(ctx context.Context) error { return nil } -func (c *Client) Stop(ctx context.Context) error { - c.HTTPClient.CloseIdleConnections() - +func (c *Client) Stop(_ context.Context) error { if c.cfg.WSEnabled { if err := c.RPCClient.Stop(); err != nil { return err diff --git a/client/rpc/config.go b/client/rpc/config.go index 86d3318..0d63055 100644 --- a/client/rpc/config.go +++ b/client/rpc/config.go @@ -1,6 +1,9 @@ package rpc +import "time" + type Config struct { - Host string `env:"RPC_URL" envDefault:"http://localhost:26657"` - WSEnabled bool `env:"WS_ENABLED" envDefault:"true"` + Host string `env:"RPC_URL" envDefault:"http://localhost:26657"` + WSEnabled bool `env:"WS_ENABLED" envDefault:"true"` + Timeout time.Duration `env:"RPC_TIMEOUT" envDefault:"15s"` } diff --git a/client/rpc/last_block.go b/client/rpc/last_block.go index e4124fe..81cac5c 100644 --- a/client/rpc/last_block.go +++ b/client/rpc/last_block.go @@ -1,8 +1,13 @@ package rpc -import "context" +import ( + "context" +) func (c *Client) GetLastBlockHeight(ctx context.Context) (int64, error) { + ctx, cancel := context.WithTimeout(ctx, c.cfg.Timeout) + defer cancel() + resp, err := c.RPCClient.ABCIInfo(ctx) if err != nil { return 0, err diff --git a/client/rpc/tx_results.go b/client/rpc/tx_results.go index 8b22d1d..02443d8 100644 --- a/client/rpc/tx_results.go +++ b/client/rpc/tx_results.go @@ -7,6 +7,9 @@ import ( ) func (c *Client) GetTxResults(ctx context.Context, height int64) ([]*abci.ResponseDeliverTx, error) { + ctx, cancel := context.WithTimeout(ctx, c.cfg.Timeout) + defer cancel() + result, err := c.RPCClient.BlockResults(ctx, &height) if err != nil { return nil, err diff --git a/delivery/broker/account.go b/delivery/broker/account.go index a2fdbaf..9ae0392 100644 --- a/delivery/broker/account.go +++ b/delivery/broker/account.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishAccount(ctx context.Context, account model.Account) error { - data, err := jsoniter.Marshal(account) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Account, data) + return b.marshalAndProduce(Account, account) } diff --git a/delivery/broker/account_balance.go b/delivery/broker/account_balance.go index 8b9d6fb..28cb7ce 100644 --- a/delivery/broker/account_balance.go +++ b/delivery/broker/account_balance.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishAccountBalance(ctx context.Context, ab model.AccountBalance) error { - data, err := jsoniter.Marshal(ab) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(AccountBalance, data) + return b.marshalAndProduce(AccountBalance, ab) } diff --git a/delivery/broker/acknowledgement_message.go b/delivery/broker/acknowledgement_message.go index 4969707..fed21dc 100644 --- a/delivery/broker/acknowledgement_message.go +++ b/delivery/broker/acknowledgement_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishAcknowledgementMessage(ctx context.Context, msg model.AcknowledgementMessage) error { - data, err := jsoniter.Marshal(msg) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(AcknowledgementMessage, data) + return b.marshalAndProduce(AcknowledgementMessage, msg) } diff --git a/delivery/broker/annual_provision.go b/delivery/broker/annual_provision.go index ce25a43..f8dcaf7 100644 --- a/delivery/broker/annual_provision.go +++ b/delivery/broker/annual_provision.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishAnnualProvision(ctx context.Context, ap model.AnnualProvision) error { - data, err := jsoniter.Marshal(ap) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(AnnualProvision, data) + return b.marshalAndProduce(AnnualProvision, ap) } diff --git a/delivery/broker/authz_grant.go b/delivery/broker/authz_grant.go index c900789..d65a386 100644 --- a/delivery/broker/authz_grant.go +++ b/delivery/broker/authz_grant.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishAuthzGrant(ctx context.Context, grant model.AuthzGrant) error { - data, err := jsoniter.Marshal(grant) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(AuthzGrant, data) + return b.marshalAndProduce(AuthzGrant, grant) } diff --git a/delivery/broker/bandwidth.go b/delivery/broker/bandwidth.go new file mode 100644 index 0000000..ded1b37 --- /dev/null +++ b/delivery/broker/bandwidth.go @@ -0,0 +1,11 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishBandwidthParams(ctx context.Context, msg model.BandwidthParams) error { + return b.marshalAndProduce(BandwidthParams, msg) +} diff --git a/delivery/broker/block.go b/delivery/broker/block.go index 9758123..124298d 100644 --- a/delivery/broker/block.go +++ b/delivery/broker/block.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishBlock(ctx context.Context, block model.Block) error { - data, err := jsoniter.Marshal(block) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Block, data) + return b.marshalAndProduce(Block, block) } diff --git a/delivery/broker/broker.go b/delivery/broker/broker.go index a3296fb..5b683f4 100644 --- a/delivery/broker/broker.go +++ b/delivery/broker/broker.go @@ -4,17 +4,19 @@ import ( "context" "fmt" - "github.com/confluentinc/confluent-kafka-go/kafka" + "github.com/confluentinc/confluent-kafka-go/v2/kafka" + jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/rs/zerolog" ) const ( MsgErrJSONMarshalFail = "json marshal fail: %w" - MsgErrCreateProducer = "cant create producer connection to broker: %w " - MsgErrCreateAdminClient = "cant create admin client connection to broker: %w" - MsgErrCreateTopics = "cant create topics in broker: %w" - MsgErrCreatePartitions = "cant create partitions in broker: %w" + MsgErrCreateProducer = "can't create producer connection to broker: %w " + MsgErrCreateAdminClient = "can't create admin client connection to broker: %w" + MsgErrCreateTopics = "can't create topics in broker: %w" + MsgErrProduceTopic = "can't produce topic: %w" + MsgErrCreatePartitions = "can't create partitions in broker: %w" ) type ( @@ -28,21 +30,21 @@ type ( } lruCache struct { - validator cacheI[string, int64] - valCommission cacheI[string, int64] - valDescription cacheI[string, int64] - valInfo cacheI[string, int64] - valStatus cacheI[string, int64] + validator cache[string, int64] + valCommission cache[string, int64] + valDescription cache[string, int64] + valInfo cache[string, int64] + valStatus cache[string, int64] } - cacheI[K, V comparable] interface { + cache[K, V comparable] interface { UpdateCacheValue(K, V) bool } - opts func(b *Broker) + opt func(b *Broker) ) -func New(cfg Config, modules []string, l zerolog.Logger, opts ...opts) *Broker { +func New(cfg Config, modules []string, l zerolog.Logger, opts ...opt) *Broker { l = l.With().Str("cmp", "broker").Logger() b := &Broker{ @@ -51,8 +53,8 @@ func New(cfg Config, modules []string, l zerolog.Logger, opts ...opts) *Broker { modules: modules, } - for _, opt := range opts { - opt(b) + for _, apply := range opts { + apply(b) } return b @@ -111,7 +113,7 @@ func (b *Broker) Start(ctx context.Context) error { } if err := m.TopicPartition.Error; err != nil { - b.log.Error().Err(err).Msgf("Delivery error: %v", m.TopicPartition) + b.log.Error().Str("topic_partition", m.TopicPartition.String()).Err(err).Msg("delivery error") } } }(p.Events()) @@ -135,6 +137,21 @@ func (b *Broker) Stop(ctx context.Context) error { return nil } +// marshalAndProduce marshals the message to JSON and produces it to the kafka. +func (b *Broker) marshalAndProduce(topic Topic, msg interface{}) error { + data, err := jsoniter.Marshal(msg) + if err != nil { + return errors.Wrap(err, MsgErrJSONMarshalFail) + } + + if err = b.produce(topic, data); err != nil { + return errors.Wrap(err, MsgErrProduceTopic) + } + + return nil +} + +// produce produces the message to the kafka. func (b *Broker) produce(topic Topic, data []byte) error { if !b.cfg.Enabled { return nil @@ -146,10 +163,10 @@ func (b *Broker) produce(topic Topic, data []byte) error { }, nil) if kafkaError, ok := err.(kafka.Error); ok && kafkaError.Code() == kafka.ErrQueueFull { - b.log.Info().Str("topic", *topic).Msg("Kafka local queue full error - Going to Flush then retry...") + b.log.Info().Str("topic", *topic).Msg("kafka local queue full error. Going to Flush then retry") flushedMessages := b.p.Flush(30 * 1000) - b.log.Info().Str("topic", *topic). - Msgf("Flushed kafka messages. Outstanding events still un-flushed: %d", flushedMessages) + b.log.Info().Str("topic", *topic).Int("flushed_messages", flushedMessages). + Msg("flushed kafka messages. Outstanding events still un-flushed") return b.produce(topic, data) } @@ -161,6 +178,8 @@ func (b *Broker) produce(topic Topic, data []byte) error { return nil } +// getCurrentTopics returns the list of topics based on enabled modules. +// nolint:gocyclo func (b *Broker) getCurrentTopics(modules []string) []string { topics := make([]string, 0) @@ -190,41 +209,69 @@ func (b *Broker) getCurrentTopics(modules []string) []string { topics = append(topics, ibcTopics.ToStringSlice()...) case "liquidity": topics = append(topics, liquidityTopics.ToStringSlice()...) + case "graph": + topics = append(topics, graphTopics.ToStringSlice()...) + case "bandwidth": + topics = append(topics, bandwidthTopics.ToStringSlice()...) + case "dmn": + topics = append(topics, dmnTopics.ToStringSlice()...) + case "grid": + topics = append(topics, gridTopics.ToStringSlice()...) + case "rank": + topics = append(topics, rankTopics.ToStringSlice()...) + case "resources": + topics = append(topics, resourcesTopics.ToStringSlice()...) + case "wasm": + topics = append(topics, wasmTopics.ToStringSlice()...) default: - b.log.Warn().Msgf("unknown module in config: %v", m) + b.log.Warn().Str("name", m).Msg("unknown module in config") continue } } - return topics + return removeDuplicates(topics) } -func WithValidatorCache(valCache cacheI[string, int64]) func(b *Broker) { +func WithValidatorCache(valCache cache[string, int64]) func(b *Broker) { return func(b *Broker) { b.cache.validator = valCache } } -func WithValidatorCommissionCache(valCommissionCache cacheI[string, int64]) func(b *Broker) { +func WithValidatorCommissionCache(valCommissionCache cache[string, int64]) func(b *Broker) { return func(b *Broker) { b.cache.valCommission = valCommissionCache } } -func WithValidatorDescriptionCache(valDescriptionCache cacheI[string, int64]) func(b *Broker) { +func WithValidatorDescriptionCache(valDescriptionCache cache[string, int64]) func(b *Broker) { return func(b *Broker) { b.cache.valDescription = valDescriptionCache } } -func WithValidatorInfoCache(valInfoCache cacheI[string, int64]) func(b *Broker) { +func WithValidatorInfoCache(valInfoCache cache[string, int64]) func(b *Broker) { return func(b *Broker) { b.cache.valInfo = valInfoCache } } -func WithValidatorStatusCache(valStatusCache cacheI[string, int64]) func(b *Broker) { +func WithValidatorStatusCache(valStatusCache cache[string, int64]) func(b *Broker) { return func(b *Broker) { b.cache.valStatus = valStatusCache } } + +func removeDuplicates[T comparable](s []T) []T { + res := make([]T, 0) + uniq := make(map[T]struct{}) + + for i := 0; i < len(s); i++ { + if _, ok := uniq[s[i]]; !ok { + uniq[s[i]] = struct{}{} + res = append(res, s[i]) + } + } + + return res +} diff --git a/delivery/broker/community_pool.go b/delivery/broker/community_pool.go index d480617..e937701 100644 --- a/delivery/broker/community_pool.go +++ b/delivery/broker/community_pool.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishCommunityPool(ctx context.Context, cp model.CommunityPool) error { - data, err := jsoniter.Marshal(cp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(CommunityPool, data) + return b.marshalAndProduce(CommunityPool, cp) } diff --git a/delivery/broker/config.go b/delivery/broker/config.go index 3902b40..eb20ddf 100644 --- a/delivery/broker/config.go +++ b/delivery/broker/config.go @@ -1,7 +1,9 @@ package broker -type Config struct { - ServerURL string `env:"BROKER_SERVER"` - PartitionsCount int `env:"PARTITIONS_COUNT" envDefault:"1"` - Enabled bool `env:"BROKER_ENABLED"` -} +type ( + Config struct { + ServerURL string `env:"BROKER_SERVER"` + PartitionsCount int `env:"PARTITIONS_COUNT" envDefault:"1"` + Enabled bool `env:"BROKER_ENABLED"` + } +) diff --git a/delivery/broker/create_validator_message.go b/delivery/broker/create_validator_message.go index b62cf23..8ae4935 100644 --- a/delivery/broker/create_validator_message.go +++ b/delivery/broker/create_validator_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishCreateValidatorMessage(_ context.Context, cvm model.CreateValidatorMessage) error { - data, err := jsoniter.Marshal(cvm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(CreateValidatorMessage, data) + return b.marshalAndProduce(CreateValidatorMessage, cvm) } diff --git a/delivery/broker/cyberlink.go b/delivery/broker/cyberlink.go new file mode 100644 index 0000000..140594c --- /dev/null +++ b/delivery/broker/cyberlink.go @@ -0,0 +1,19 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishCyberlink(ctx context.Context, msg model.Cyberlink) error { + return b.marshalAndProduce(Cyberlink, msg) +} + +func (b *Broker) PublishCyberlinkMessage(ctx context.Context, msg model.CyberlinkMessage) error { + return b.marshalAndProduce(CyberlinkMessage, msg) +} + +func (b *Broker) PublishParticle(ctx context.Context, msg model.Particle) error { + return b.marshalAndProduce(Particle, msg) +} diff --git a/delivery/broker/delegation.go b/delivery/broker/delegation.go index 8a64b1d..8ee313c 100644 --- a/delivery/broker/delegation.go +++ b/delivery/broker/delegation.go @@ -3,28 +3,15 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDelegation(ctx context.Context, d model.Delegation) error { d.IsActive = true - data, err := jsoniter.Marshal(d) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Delegation, data) + return b.marshalAndProduce(Delegation, d) } func (b *Broker) PublishDisabledDelegation(ctx context.Context, d model.Delegation) error { d.IsActive = false - data, err := jsoniter.Marshal(d) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Delegation, data) + return b.marshalAndProduce(Delegation, d) } diff --git a/delivery/broker/delegation_message.go b/delivery/broker/delegation_message.go index 3e7d243..a25e095 100644 --- a/delivery/broker/delegation_message.go +++ b/delivery/broker/delegation_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDelegationMessage(ctx context.Context, dm model.DelegationMessage) error { - data, err := jsoniter.Marshal(dm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DelegationMessage, data) + return b.marshalAndProduce(DelegationMessage, dm) } diff --git a/delivery/broker/delegation_reward.go b/delivery/broker/delegation_reward.go index 012bf59..cbae8fb 100644 --- a/delivery/broker/delegation_reward.go +++ b/delivery/broker/delegation_reward.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDelegationReward(ctx context.Context, dr model.DelegationReward) error { - data, err := jsoniter.Marshal(dr) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DelegationReward, data) + return b.marshalAndProduce(DelegationReward, dr) } diff --git a/delivery/broker/delegation_reward_message.go b/delivery/broker/delegation_reward_message.go index a0e77f2..53a80cc 100644 --- a/delivery/broker/delegation_reward_message.go +++ b/delivery/broker/delegation_reward_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDelegationRewardMessage(ctx context.Context, drm model.DelegationRewardMessage) error { - data, err := jsoniter.Marshal(drm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DelegationRewardMessage, data) + return b.marshalAndProduce(DelegationRewardMessage, drm) } diff --git a/delivery/broker/denom_trace.go b/delivery/broker/denom_trace.go index b6c921d..72abe88 100644 --- a/delivery/broker/denom_trace.go +++ b/delivery/broker/denom_trace.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDenomTrace(ctx context.Context, dt model.DenomTrace) error { - data, err := jsoniter.Marshal(dt) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DenomTrace, data) + return b.marshalAndProduce(DenomTrace, dt) } diff --git a/delivery/broker/distribution.go b/delivery/broker/distribution.go index 2bec8c8..8d1390d 100644 --- a/delivery/broker/distribution.go +++ b/delivery/broker/distribution.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDistributionParams(ctx context.Context, dp model.DistributionParams) error { - data, err := jsoniter.Marshal(dp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DistributionParams, data) + return b.marshalAndProduce(DistributionParams, dp) } diff --git a/delivery/broker/distribution_commission.go b/delivery/broker/distribution_commission.go index 5fff93e..dbf02e7 100644 --- a/delivery/broker/distribution_commission.go +++ b/delivery/broker/distribution_commission.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDistributionCommission(_ context.Context, commission model.DistributionCommission) error { - data, err := jsoniter.Marshal(commission) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DistributionCommission, data) + return b.marshalAndProduce(DistributionCommission, commission) } diff --git a/delivery/broker/distribution_reward.go b/delivery/broker/distribution_reward.go index c10498d..4c71e5b 100644 --- a/delivery/broker/distribution_reward.go +++ b/delivery/broker/distribution_reward.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishDistributionReward(_ context.Context, reward model.DistributionReward) error { - data, err := jsoniter.Marshal(reward) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(DistributionReward, data) + return b.marshalAndProduce(DistributionReward, reward) } diff --git a/delivery/broker/dmn.go b/delivery/broker/dmn.go new file mode 100644 index 0000000..5feff68 --- /dev/null +++ b/delivery/broker/dmn.go @@ -0,0 +1,11 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishDMNParams(ctx context.Context, msg model.DMNParams) error { + return b.marshalAndProduce(DMNParams, msg) +} diff --git a/delivery/broker/edit_validator_message.go b/delivery/broker/edit_validator_message.go index 798e614..9d440e8 100644 --- a/delivery/broker/edit_validator_message.go +++ b/delivery/broker/edit_validator_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishEditValidatorMessage(_ context.Context, msg model.EditValidatorMessage) error { - data, err := jsoniter.Marshal(msg) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(EditValidatorMessage, data) + return b.marshalAndProduce(EditValidatorMessage, msg) } diff --git a/delivery/broker/exec_message.go b/delivery/broker/exec_message.go index a9c71b8..fd89023 100644 --- a/delivery/broker/exec_message.go +++ b/delivery/broker/exec_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishExecMessage(ctx context.Context, em model.ExecMessage) error { - data, err := jsoniter.Marshal(em) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ExecMessage, data) + return b.marshalAndProduce(ExecMessage, em) } diff --git a/delivery/broker/fee_allowance.go b/delivery/broker/fee_allowance.go index d88ff2e..79ff69e 100644 --- a/delivery/broker/fee_allowance.go +++ b/delivery/broker/fee_allowance.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishFeeAllowance(ctx context.Context, feeAllowance model.FeeAllowance) error { - data, err := jsoniter.Marshal(feeAllowance) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(FeeAllowance, data) + return b.marshalAndProduce(FeeAllowance, feeAllowance) } diff --git a/delivery/broker/gov.go b/delivery/broker/gov.go index a8d2e2b..85259de 100644 --- a/delivery/broker/gov.go +++ b/delivery/broker/gov.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishGovParams(ctx context.Context, params model.GovParams) error { - data, err := jsoniter.Marshal(params) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(GovParams, data) + return b.marshalAndProduce(GovParams, params) } diff --git a/delivery/broker/grant_allowance_message.go b/delivery/broker/grant_allowance_message.go index 6e2a82e..b95e4e7 100644 --- a/delivery/broker/grant_allowance_message.go +++ b/delivery/broker/grant_allowance_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishGrantAllowanceMessage(ctx context.Context, gam model.GrantAllowanceMessage) error { - data, err := jsoniter.Marshal(gam) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(GrantAllowanceMessage, data) + return b.marshalAndProduce(GrantAllowanceMessage, gam) } diff --git a/delivery/broker/grant_message.go b/delivery/broker/grant_message.go index e5e59c3..488d83b 100644 --- a/delivery/broker/grant_message.go +++ b/delivery/broker/grant_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishGrantMessage(ctx context.Context, gm model.GrantMessage) error { - data, err := jsoniter.Marshal(gm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(GrantMessage, data) + return b.marshalAndProduce(GrantMessage, gm) } diff --git a/delivery/broker/grid.go b/delivery/broker/grid.go new file mode 100644 index 0000000..e7f2570 --- /dev/null +++ b/delivery/broker/grid.go @@ -0,0 +1,31 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishGridParams(ctx context.Context, msg model.GridParams) error { + return b.marshalAndProduce(GridParams, msg) +} + +func (b *Broker) PublishCreateRouteMessage(ctx context.Context, msg model.CreateRouteMessage) error { + return b.marshalAndProduce(CreateRouteMessage, msg) +} + +func (b *Broker) PublishEditRouteMessage(ctx context.Context, msg model.EditRouteMessage) error { + return b.marshalAndProduce(EditRouteMessage, msg) +} + +func (b *Broker) PublishEditRouteNameMessage(ctx context.Context, msg model.EditRouteNameMessage) error { + return b.marshalAndProduce(EditRouteNameMessage, msg) +} + +func (b *Broker) PublishDeleteRouteMessage(ctx context.Context, msg model.DeleteRouteMessage) error { + return b.marshalAndProduce(DeleteRouteMessage, msg) +} + +func (b *Broker) PublishRoute(ctx context.Context, msg model.Route) error { + return b.marshalAndProduce(Route, msg) +} diff --git a/delivery/broker/handle_validator_signature.go b/delivery/broker/handle_validator_signature.go index bf1c278..b2f5bb1 100644 --- a/delivery/broker/handle_validator_signature.go +++ b/delivery/broker/handle_validator_signature.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishHandleValidatorSignature(ctx context.Context, hvs model.HandleValidatorSignature) error { - data, err := jsoniter.Marshal(hvs) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(HandleValidatorSignature, data) + return b.marshalAndProduce(HandleValidatorSignature, hvs) } diff --git a/delivery/broker/liquidity_pool.go b/delivery/broker/liquidity_pool.go index 660cb0c..52e6df6 100644 --- a/delivery/broker/liquidity_pool.go +++ b/delivery/broker/liquidity_pool.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishLiquidityPool(_ context.Context, v model.LiquidityPool) error { - data, err := jsoniter.Marshal(v) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(LiquidityPool, data) + return b.marshalAndProduce(LiquidityPool, v) } diff --git a/delivery/broker/message.go b/delivery/broker/message.go index eef5879..758b59a 100644 --- a/delivery/broker/message.go +++ b/delivery/broker/message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishMessage(ctx context.Context, message model.Message) error { - data, err := jsoniter.Marshal(message) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Message, data) + return b.marshalAndProduce(Message, message) } diff --git a/delivery/broker/mint_params.go b/delivery/broker/mint_params.go index 92ab06f..b7cd1d7 100644 --- a/delivery/broker/mint_params.go +++ b/delivery/broker/mint_params.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishMintParams(ctx context.Context, mp model.MintParams) error { - data, err := jsoniter.Marshal(mp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(MintParams, data) + return b.marshalAndProduce(MintParams, mp) } diff --git a/delivery/broker/multi_send_message.go b/delivery/broker/multi_send_message.go index 2c611c3..a011baa 100644 --- a/delivery/broker/multi_send_message.go +++ b/delivery/broker/multi_send_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishMultiSendMessage(ctx context.Context, msm model.MultiSendMessage) error { - data, err := jsoniter.Marshal(msm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(MultiSendMessage, data) + return b.marshalAndProduce(MultiSendMessage, msm) } diff --git a/delivery/broker/proposal.go b/delivery/broker/proposal.go index bed9c46..f051180 100644 --- a/delivery/broker/proposal.go +++ b/delivery/broker/proposal.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposal(ctx context.Context, proposal model.Proposal) error { - data, err := jsoniter.Marshal(proposal) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Proposal, data) + return b.marshalAndProduce(Proposal, proposal) } diff --git a/delivery/broker/proposal_deposit.go b/delivery/broker/proposal_deposit.go index 658f589..b243032 100644 --- a/delivery/broker/proposal_deposit.go +++ b/delivery/broker/proposal_deposit.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposalDeposit(ctx context.Context, pvm model.ProposalDeposit) error { - data, err := jsoniter.Marshal(pvm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ProposalDeposit, data) + return b.marshalAndProduce(ProposalDeposit, pvm) } diff --git a/delivery/broker/proposal_deposit_message.go b/delivery/broker/proposal_deposit_message.go index 6ca6c7b..ac86495 100644 --- a/delivery/broker/proposal_deposit_message.go +++ b/delivery/broker/proposal_deposit_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposalDepositMessage(ctx context.Context, pvm model.ProposalDepositMessage) error { - data, err := jsoniter.Marshal(pvm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ProposalDepositMessage, data) + return b.marshalAndProduce(ProposalDepositMessage, pvm) } diff --git a/delivery/broker/proposal_tally_result.go b/delivery/broker/proposal_tally_result.go index 1d7c623..dd9361b 100644 --- a/delivery/broker/proposal_tally_result.go +++ b/delivery/broker/proposal_tally_result.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposalTallyResult(ctx context.Context, ptr model.ProposalTallyResult) error { - data, err := jsoniter.Marshal(ptr) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ProposalTallyResult, data) + return b.marshalAndProduce(ProposalTallyResult, ptr) } diff --git a/delivery/broker/proposal_vote_message.go b/delivery/broker/proposal_vote_message.go index a4c767d..610d229 100644 --- a/delivery/broker/proposal_vote_message.go +++ b/delivery/broker/proposal_vote_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposalVoteMessage(ctx context.Context, pvm model.ProposalVoteMessage) error { - data, err := jsoniter.Marshal(pvm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ProposalVoteMessage, data) + return b.marshalAndProduce(ProposalVoteMessage, pvm) } diff --git a/delivery/broker/proposer_reward.go b/delivery/broker/proposer_reward.go index c3dd929..8d02516 100644 --- a/delivery/broker/proposer_reward.go +++ b/delivery/broker/proposer_reward.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishProposerReward(ctx context.Context, r model.ProposerReward) error { - data, err := jsoniter.Marshal(r) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ProposerReward, data) + return b.marshalAndProduce(ProposerReward, r) } diff --git a/delivery/broker/publish_cancel_unbonding_delegation_message.go b/delivery/broker/publish_cancel_unbonding_delegation_message.go index 746aeb4..0aeb7c7 100644 --- a/delivery/broker/publish_cancel_unbonding_delegation_message.go +++ b/delivery/broker/publish_cancel_unbonding_delegation_message.go @@ -3,21 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) -func (b *Broker) PublishCancelUnbondingDelegationMessage( - _ context.Context, - description model.CancelUnbondingDelegationMessage, -) error { - - data, err := jsoniter.Marshal(description) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(CancelUnbondingDelegationMessage, data) +func (b *Broker) PublishCancelUnbondingDelegationMessage(_ context.Context, d model.CancelUnbondingDelegationMessage) error { + return b.marshalAndProduce(CancelUnbondingDelegationMessage, d) } diff --git a/delivery/broker/rank.go b/delivery/broker/rank.go new file mode 100644 index 0000000..b6ca093 --- /dev/null +++ b/delivery/broker/rank.go @@ -0,0 +1,11 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishRankParams(ctx context.Context, msg model.RankParams) error { + return b.marshalAndProduce(RankParams, msg) +} diff --git a/delivery/broker/receive_packet_message.go b/delivery/broker/receive_packet_message.go index 95cace0..0bc7a22 100644 --- a/delivery/broker/receive_packet_message.go +++ b/delivery/broker/receive_packet_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishReceivePacketMessage(ctx context.Context, r model.RecvPacketMessage) error { - data, err := jsoniter.Marshal(r) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ReceivePacketMessage, data) + return b.marshalAndProduce(ReceivePacketMessage, r) } diff --git a/delivery/broker/redelegation.go b/delivery/broker/redelegation.go index 68f3f6c..fec749a 100644 --- a/delivery/broker/redelegation.go +++ b/delivery/broker/redelegation.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishRedelegation(ctx context.Context, r model.Redelegation) error { - data, err := jsoniter.Marshal(r) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Redelegation, data) + return b.marshalAndProduce(Redelegation, r) } diff --git a/delivery/broker/redelegation_message.go b/delivery/broker/redelegation_message.go index f077286..2f3dff6 100644 --- a/delivery/broker/redelegation_message.go +++ b/delivery/broker/redelegation_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishRedelegationMessage(ctx context.Context, rm model.RedelegationMessage) error { - data, err := jsoniter.Marshal(rm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(RedelegationMessage, data) + return b.marshalAndProduce(RedelegationMessage, rm) } diff --git a/delivery/broker/resources.go b/delivery/broker/resources.go new file mode 100644 index 0000000..a5effb7 --- /dev/null +++ b/delivery/broker/resources.go @@ -0,0 +1,11 @@ +package broker + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (b *Broker) PublishInvestmintMessage(ctx context.Context, msg model.InvestmintMessage) error { + return b.marshalAndProduce(InvestmintMessage, msg) +} diff --git a/delivery/broker/revoke_allowance_message.go b/delivery/broker/revoke_allowance_message.go index 4e12558..6ff4709 100644 --- a/delivery/broker/revoke_allowance_message.go +++ b/delivery/broker/revoke_allowance_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishRevokeAllowanceMessage(ctx context.Context, ram model.RevokeAllowanceMessage) error { - data, err := jsoniter.Marshal(ram) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(RevokeAllowanceMessage, data) + return b.marshalAndProduce(RevokeAllowanceMessage, ram) } diff --git a/delivery/broker/revoke_message.go b/delivery/broker/revoke_message.go index 4eb788d..7102146 100644 --- a/delivery/broker/revoke_message.go +++ b/delivery/broker/revoke_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishRevokeMessage(ctx context.Context, rm model.RevokeMessage) error { - data, err := jsoniter.Marshal(rm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(RevokeMessage, data) + return b.marshalAndProduce(RevokeMessage, rm) } diff --git a/delivery/broker/send_message.go b/delivery/broker/send_message.go index 827fccf..118ea92 100644 --- a/delivery/broker/send_message.go +++ b/delivery/broker/send_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSendMessage(ctx context.Context, sm model.SendMessage) error { - data, err := jsoniter.Marshal(sm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(SendMessage, data) + return b.marshalAndProduce(SendMessage, sm) } diff --git a/delivery/broker/set_withdraw_adress_message.go b/delivery/broker/set_withdraw_adress_message.go index 9efdd99..91d2fbf 100644 --- a/delivery/broker/set_withdraw_adress_message.go +++ b/delivery/broker/set_withdraw_adress_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSetWithdrawAddressMessage(_ context.Context, swm model.SetWithdrawAddressMessage) error { - data, err := jsoniter.Marshal(swm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(SetWithdrawAddressMessage, data) + return b.marshalAndProduce(SetWithdrawAddressMessage, swm) } diff --git a/delivery/broker/slashing_params.go b/delivery/broker/slashing_params.go index 2c46a1f..8fd37ff 100644 --- a/delivery/broker/slashing_params.go +++ b/delivery/broker/slashing_params.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSlashingParams(_ context.Context, params model.SlashingParams) error { - data, err := jsoniter.Marshal(params) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(SlashingParams, data) + return b.marshalAndProduce(SlashingParams, params) } diff --git a/delivery/broker/staking_params.go b/delivery/broker/staking_params.go index df0c5bf..6606fae 100644 --- a/delivery/broker/staking_params.go +++ b/delivery/broker/staking_params.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishStakingParams(ctx context.Context, sp model.StakingParams) error { - data, err := jsoniter.Marshal(sp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(StakingParams, data) + return b.marshalAndProduce(StakingParams, sp) } diff --git a/delivery/broker/staking_pool.go b/delivery/broker/staking_pool.go index a80d38a..ffa2194 100644 --- a/delivery/broker/staking_pool.go +++ b/delivery/broker/staking_pool.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishStakingPool(ctx context.Context, sp model.StakingPool) error { - data, err := jsoniter.Marshal(sp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(StakingPool, data) + return b.marshalAndProduce(StakingPool, sp) } diff --git a/delivery/broker/submit_proposal_message.go b/delivery/broker/submit_proposal_message.go index 95b9fff..84b0f50 100644 --- a/delivery/broker/submit_proposal_message.go +++ b/delivery/broker/submit_proposal_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSubmitProposalMessage(_ context.Context, spm model.SubmitProposalMessage) error { - data, err := jsoniter.Marshal(spm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(SubmitProposalMessage, data) + return b.marshalAndProduce(SubmitProposalMessage, spm) } diff --git a/delivery/broker/supply.go b/delivery/broker/supply.go index ec8f020..3e78c4c 100644 --- a/delivery/broker/supply.go +++ b/delivery/broker/supply.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSupply(ctx context.Context, supply model.Supply) error { - data, err := jsoniter.Marshal(supply) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Supply, data) + return b.marshalAndProduce(Supply, supply) } diff --git a/delivery/broker/swap.go b/delivery/broker/swap.go index 237d768..0655a34 100644 --- a/delivery/broker/swap.go +++ b/delivery/broker/swap.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishSwap(ctx context.Context, swap model.Swap) error { - data, err := jsoniter.Marshal(swap) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Swap, data) + return b.marshalAndProduce(Swap, swap) } diff --git a/delivery/broker/topics.go b/delivery/broker/topics.go index 86f9316..469bff5 100644 --- a/delivery/broker/topics.go +++ b/delivery/broker/topics.go @@ -7,8 +7,11 @@ var ( AccountBalance Topic = newTopic("account_balance") AnnualProvision Topic = newTopic("annual_provision") Block Topic = newTopic("block") + BandwidthParams Topic = newTopic("bandwidth_params") CancelUnbondingDelegationMessage Topic = newTopic("cancel_unbonding_delegation_message") CommunityPool Topic = newTopic("community_pool") + CyberlinkMessage Topic = newTopic("cyberlink_message") + Cyberlink Topic = newTopic("cyberlink") CreateValidatorMessage Topic = newTopic("create_validator_message") DistributionCommission Topic = newTopic("distribution_commission") DistributionReward Topic = newTopic("distribution_reward") @@ -17,18 +20,25 @@ var ( DelegationRewardMessage Topic = newTopic("delegation_reward_message") Delegation Topic = newTopic("delegation") DelegationMessage Topic = newTopic("delegation_message") + DeleteRouteMessage Topic = newTopic("delete_route_message") + EditRouteNameMessage Topic = newTopic("edit_route_name_message") + EditRouteMessage Topic = newTopic("edit_route_message") + CreateRouteMessage Topic = newTopic("create_route_message") DenomTrace Topic = newTopic("denom_trace") + DMNParams Topic = newTopic("dmn_params") EditValidatorMessage Topic = newTopic("edit_validator_message") ExecMessage Topic = newTopic("exec_message") FeeAllowance Topic = newTopic("fee_allowance") GovParams Topic = newTopic("gov_params") GrantMessage Topic = newTopic("grant_message") GrantAllowanceMessage Topic = newTopic("grant_allowance_message") + GridParams Topic = newTopic("grid_params") HandleValidatorSignature Topic = newTopic("handle_validator_signature") LiquidityPool Topic = newTopic("liquidity_pool") Message Topic = newTopic("message") MintParams Topic = newTopic("mint_params") MultiSendMessage Topic = newTopic("multisend_message") + Particle Topic = newTopic("particle") Proposal Topic = newTopic("proposal") ProposalVoteMessage Topic = newTopic("proposal_vote_message") ProposalTallyResult Topic = newTopic("proposal_tally_result") @@ -36,6 +46,9 @@ var ( ProposalDepositMessage Topic = newTopic("proposal_deposit_message") ProposerReward Topic = newTopic("proposer_reward") RevokeAllowanceMessage Topic = newTopic("revoke_allowance_message") + RankParams Topic = newTopic("rank_params") + Route Topic = newTopic("route") + InvestmintMessage Topic = newTopic("investmint_message") Redelegation Topic = newTopic("redelegation") RedelegationMessage Topic = newTopic("redelegation_message") RevokeMessage Topic = newTopic("revoke_message") @@ -58,11 +71,12 @@ var ( ValidatorStatus Topic = newTopic("validator_status") ValidatorDescription Topic = newTopic("validator_description") ValidatorCommission Topic = newTopic("validator_commission") - ValidatorPrecommit Topic = newTopic("validator_precommit") + ValidatorPreCommit Topic = newTopic("validator_precommit") ValidatorVotingPower Topic = newTopic("validator_voting_power") VoteWeightedMessage Topic = newTopic("vote_weighted_message") WithdrawValidatorCommissionMessage Topic = newTopic("withdraw_validator_commission_message") - authTopics = Topics{Account} + + authTopics = Topics{Account} bankTopics = Topics{Supply, AccountBalance, SendMessage, MultiSendMessage} @@ -81,7 +95,7 @@ var ( Delegation, DelegationMessage, CreateValidatorMessage, EditValidatorMessage, CancelUnbondingDelegationMessage, } - coreTopics = Topics{Block, Transaction, Message, ValidatorPrecommit} + coreTopics = Topics{Block, Transaction, Message, ValidatorPreCommit} authzTopics = Topics{AuthzGrant, GrantMessage, RevokeMessage, ExecMessage} @@ -92,6 +106,20 @@ var ( ibcTopics = Topics{TransferMessage, AcknowledgementMessage, ReceivePacketMessage, DenomTrace} liquidityTopics = Topics{Swap, LiquidityPool} + + graphTopics = Topics{Cyberlink, CyberlinkMessage, Particle} + + bandwidthTopics = Topics{BandwidthParams} + + dmnTopics = Topics{DMNParams} + + gridTopics = Topics{GridParams, CreateRouteMessage, EditRouteMessage, EditRouteNameMessage, DeleteRouteMessage, Route} + + rankTopics = Topics{RankParams} + + resourcesTopics = Topics{InvestmintMessage} + + wasmTopics = Topics{Cyberlink, Particle} ) type ( diff --git a/delivery/broker/transaction.go b/delivery/broker/transaction.go index 0265089..7c2cba2 100644 --- a/delivery/broker/transaction.go +++ b/delivery/broker/transaction.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishTransaction(ctx context.Context, tx model.Transaction) error { - data, err := jsoniter.Marshal(tx) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(Transaction, data) + return b.marshalAndProduce(Transaction, tx) } diff --git a/delivery/broker/transfer_message.go b/delivery/broker/transfer_message.go index 3699e11..d851754 100644 --- a/delivery/broker/transfer_message.go +++ b/delivery/broker/transfer_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishTransferMessage(ctx context.Context, tm model.TransferMessage) error { - data, err := jsoniter.Marshal(tm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(TransferMessage, data) + return b.marshalAndProduce(TransferMessage, tm) } diff --git a/delivery/broker/unbonding_delegation.go b/delivery/broker/unbonding_delegation.go index 5f64e39..c7726d3 100644 --- a/delivery/broker/unbonding_delegation.go +++ b/delivery/broker/unbonding_delegation.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishUnbondingDelegation(ctx context.Context, ud model.UnbondingDelegation) error { - data, err := jsoniter.Marshal(ud) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(UnbondingDelegation, data) + return b.marshalAndProduce(UnbondingDelegation, ud) } diff --git a/delivery/broker/unbonding_delegation_message.go b/delivery/broker/unbonding_delegation_message.go index d4d7523..020cce1 100644 --- a/delivery/broker/unbonding_delegation_message.go +++ b/delivery/broker/unbonding_delegation_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishUnbondingDelegationMessage(ctx context.Context, udm model.UnbondingDelegationMessage) error { - data, err := jsoniter.Marshal(udm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(UnbondingDelegationMessage, data) + return b.marshalAndProduce(UnbondingDelegationMessage, udm) } diff --git a/delivery/broker/unjail_message.go b/delivery/broker/unjail_message.go index 1d34066..9fd0397 100644 --- a/delivery/broker/unjail_message.go +++ b/delivery/broker/unjail_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishUnjailMessage(_ context.Context, msg model.UnjailMessage) error { - data, err := jsoniter.Marshal(msg) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(UnjailMessage, data) + return b.marshalAndProduce(UnjailMessage, msg) } diff --git a/delivery/broker/utils.go b/delivery/broker/utils.go index 191256a..eb62446 100644 --- a/delivery/broker/utils.go +++ b/delivery/broker/utils.go @@ -1,6 +1,6 @@ package broker // checkCache checks the cache to see if it needs to do something with the new value. -func checkCache[K, V comparable](key K, val V, cache cacheI[K, V]) bool { +func checkCache[K, V comparable](key K, val V, cache cache[K, V]) bool { return cache != nil && cache.UpdateCacheValue(key, val) } diff --git a/delivery/broker/validator_comission.go b/delivery/broker/validator_comission.go index 8678561..7f9bffb 100644 --- a/delivery/broker/validator_comission.go +++ b/delivery/broker/validator_comission.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidatorCommission(ctx context.Context, commission model.ValidatorCommission) error { - if !checkCache(commission.OperatorAddress, commission.Height, b.cache.valCommission) { - return nil - } - - data, err := jsoniter.Marshal(commission) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) + if checkCache(commission.OperatorAddress, commission.Height, b.cache.valCommission) { + return b.marshalAndProduce(ValidatorCommission, commission) } - return b.produce(ValidatorCommission, data) + return nil } diff --git a/delivery/broker/validator_description.go b/delivery/broker/validator_description.go index ef8e34a..f3010bd 100644 --- a/delivery/broker/validator_description.go +++ b/delivery/broker/validator_description.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidatorDescription(ctx context.Context, description model.ValidatorDescription) error { - if !checkCache(description.OperatorAddress, description.Height, b.cache.valDescription) { - return nil - } - - data, err := jsoniter.Marshal(description) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) + if checkCache(description.OperatorAddress, description.Height, b.cache.valDescription) { + return b.marshalAndProduce(ValidatorDescription, description) } - return b.produce(ValidatorDescription, data) + return nil } diff --git a/delivery/broker/validator_info.go b/delivery/broker/validator_info.go index 163d899..23cc152 100644 --- a/delivery/broker/validator_info.go +++ b/delivery/broker/validator_info.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidatorInfo(ctx context.Context, info model.ValidatorInfo) error { - if !checkCache(info.ConsensusAddress, info.Height, b.cache.valInfo) { - return nil - } - - data, err := jsoniter.Marshal(info) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) + if checkCache(info.ConsensusAddress, info.Height, b.cache.valInfo) { + return b.marshalAndProduce(ValidatorInfo, info) } - return b.produce(ValidatorInfo, data) + return nil } diff --git a/delivery/broker/validator_precommit.go b/delivery/broker/validator_precommit.go index 295256e..95fbe31 100644 --- a/delivery/broker/validator_precommit.go +++ b/delivery/broker/validator_precommit.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) -func (b *Broker) PublishValidatorPrecommit(_ context.Context, v model.ValidatorPrecommit) error { - data, err := jsoniter.Marshal(v) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ValidatorPrecommit, data) +func (b *Broker) PublishValidatorPreCommit(_ context.Context, v model.ValidatorPreCommit) error { + return b.marshalAndProduce(ValidatorPreCommit, v) } diff --git a/delivery/broker/validator_status.go b/delivery/broker/validator_status.go index a0239df..3b5d20a 100644 --- a/delivery/broker/validator_status.go +++ b/delivery/broker/validator_status.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidatorStatus(ctx context.Context, status model.ValidatorStatus) error { - if !checkCache(status.ConsensusAddress, status.Height, b.cache.valStatus) { - return nil - } - - data, err := jsoniter.Marshal(status) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) + if checkCache(status.ConsensusAddress, status.Height, b.cache.valStatus) { + return b.marshalAndProduce(ValidatorStatus, status) } - return b.produce(ValidatorStatus, data) + return nil } diff --git a/delivery/broker/validator_voting_power.go b/delivery/broker/validator_voting_power.go index 1d9d33d..788a9fd 100644 --- a/delivery/broker/validator_voting_power.go +++ b/delivery/broker/validator_voting_power.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidatorVotingPower(_ context.Context, vp model.ValidatorVotingPower) error { - data, err := jsoniter.Marshal(vp) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(ValidatorVotingPower, data) + return b.marshalAndProduce(ValidatorVotingPower, vp) } diff --git a/delivery/broker/validators.go b/delivery/broker/validators.go index a0f715d..b24bbc6 100644 --- a/delivery/broker/validators.go +++ b/delivery/broker/validators.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishValidator(ctx context.Context, val model.Validator) error { - if !checkCache(val.ConsensusAddress, val.Height, b.cache.validator) { - return nil - } - - data, err := jsoniter.Marshal(val) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) + if checkCache(val.ConsensusAddress, val.Height, b.cache.validator) { + return b.marshalAndProduce(Validator, val) } - return b.produce(Validator, data) + return nil } diff --git a/delivery/broker/vote_weighted_message.go b/delivery/broker/vote_weighted_message.go index ad08a45..a985822 100644 --- a/delivery/broker/vote_weighted_message.go +++ b/delivery/broker/vote_weighted_message.go @@ -3,17 +3,9 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishVoteWeightedMessage(_ context.Context, vwm model.VoteWeightedMessage) error { - data, err := jsoniter.Marshal(vwm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(VoteWeightedMessage, data) + return b.marshalAndProduce(VoteWeightedMessage, vwm) } diff --git a/delivery/broker/withdraw_validator_commission_message.go b/delivery/broker/withdraw_validator_commission_message.go index 8296f03..6f88c42 100644 --- a/delivery/broker/withdraw_validator_commission_message.go +++ b/delivery/broker/withdraw_validator_commission_message.go @@ -3,21 +3,13 @@ package broker import ( "context" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "github.com/bro-n-bro/spacebox/broker/model" ) func (b *Broker) PublishWithdrawValidatorCommissionMessage( _ context.Context, - wvcm model.WithdrawValidatorCommissionMessage, + msg model.WithdrawValidatorCommissionMessage, ) error { - data, err := jsoniter.Marshal(wvcm) - if err != nil { - return errors.Wrap(err, MsgErrJSONMarshalFail) - } - - return b.produce(WithdrawValidatorCommissionMessage, data) + return b.marshalAndProduce(WithdrawValidatorCommissionMessage, msg) } diff --git a/delivery/server/scraper.go b/delivery/server/scraper.go index ff1b5b0..0779dcb 100644 --- a/delivery/server/scraper.go +++ b/delivery/server/scraper.go @@ -39,10 +39,18 @@ func (s *Server) startMetricsScrapper() { Name: "total_error_messages", Help: "Total error messages", }) + // count of error txs in storage + errorTxsCount = promauto.NewGauge(prometheus.GaugeOpts{ + Namespace: namespace, + Name: "total_error_txs", + Help: "Total error txs", + }) statusMap map[string]int ctx = context.Background() ticker = time.NewTicker(1 * time.Minute) + blocks []*model.Block + err error ) defer ticker.Stop() @@ -53,10 +61,11 @@ func (s *Server) startMetricsScrapper() { s.log.Info().Msg("stop metrics scraper") return case <-ticker.C: - if err := s.storage.Ping(ctx); err != nil { + if err = s.storage.Ping(ctx); err != nil { continue } - blocks, err := s.storage.GetAllBlocks(ctx) + + blocks, err = s.storage.GetAllBlocks(ctx) if err != nil { s.log.Error().Err(err).Msg("can't get all blocks from storage") continue @@ -82,12 +91,20 @@ func (s *Server) startMetricsScrapper() { statusMetric.With(prometheus.Labels{"status": statusName}).Set(float64(count)) } - count, err := s.storage.CountErrorMessages(ctx) + var count int64 + count, err = s.storage.CountErrorMessages(ctx) if err != nil { s.log.Error().Err(err).Msg("can't get count of error messages") continue } errorMessagesCount.Set(float64(count)) + + count, err = s.storage.CountErrorTxs(ctx) + if err != nil { + s.log.Error().Err(err).Msg("can't get count of error txs") + continue + } + errorTxsCount.Set(float64(count)) } } } diff --git a/go.mod b/go.mod index 2b75592..a29b066 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bro-n-bro/spacebox-crawler -go 1.21 +go 1.21.4 replace ( github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.47.5 @@ -13,26 +13,29 @@ replace ( ) require ( - github.com/bro-n-bro/spacebox v1.1.1 + github.com/CosmWasm/wasmd v0.43.0 + github.com/bro-n-bro/spacebox v1.2.0 github.com/caarlos0/env/v6 v6.10.1 github.com/cometbft/cometbft v0.37.2 - github.com/confluentinc/confluent-kafka-go v1.9.2 - github.com/cosmos/cosmos-sdk v0.47.3 + github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.2.0 + github.com/cosmos/ibc-go/v7 v7.3.0 github.com/cosmos/interchain-security/v3 v3.0.0-rc2 + github.com/cybercongress/go-cyber v0.3.2 github.com/globocom/mongo-go-prometheus v0.1.1 + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/golang-lru/v2 v2.0.1 github.com/iqlusioninc/liquidity-staking-module v1.0.1-0.20230328111802-7516902199bb github.com/joho/godotenv v1.4.0 github.com/json-iterator/go v1.1.12 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.16.0 github.com/rs/zerolog v1.30.0 github.com/stretchr/testify v1.8.4 - go.mongodb.org/mongo-driver v1.11.1 - golang.org/x/crypto v0.11.0 + go.mongodb.org/mongo-driver v1.12.1 + golang.org/x/crypto v0.12.0 golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb golang.org/x/sync v0.2.0 golang.org/x/time v0.3.0 @@ -58,12 +61,14 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/CosmWasm/wasmvm v1.4.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -91,6 +96,7 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect @@ -133,6 +139,7 @@ require ( github.com/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/ipfs/go-cid v0.0.7 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.16.3 // indirect @@ -147,25 +154,35 @@ require ( github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/minio/highwayhash v1.0.2 // indirect + github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect + github.com/mr-tron/base58 v1.1.3 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/multiformats/go-base32 v0.0.3 // indirect + github.com/multiformats/go-base36 v0.1.0 // indirect + github.com/multiformats/go-multibase v0.0.3 // indirect + github.com/multiformats/go-multihash v0.0.13 // indirect + github.com/multiformats/go-varint v0.0.5 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/cobra v1.7.0 // indirect @@ -175,20 +192,21 @@ require ( github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tendermint/tendermint v0.34.19 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.1.1 // indirect - github.com/xdg-go/stringprep v1.0.3 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.10.0 // indirect + golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect diff --git a/go.sum b/go.sum index 71444b0..f0b1b31 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= 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= @@ -100,6 +101,7 @@ cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1 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/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= 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= @@ -210,16 +212,31 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/CosmWasm/wasmd v0.43.0 h1:4xQAiNf6Ej+TuYe4PXwrtVJ9C+xyFrbsdqHH/kU9Vxk= +github.com/CosmWasm/wasmd v0.43.0/go.mod h1:gpri8YvkRErBz+qDme5jOThGZmSlHfyN532bWibXOl4= +github.com/CosmWasm/wasmvm v1.4.1 h1:YgodVlBrXa2HJZzOXjWDH0EIRwQzK3zuA73dDPRRLS4= +github.com/CosmWasm/wasmvm v1.4.1/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= +github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= 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= @@ -228,12 +245,13 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/actgardner/gogen-avro/v10 v10.1.0/go.mod h1:o+ybmVjEa27AAr35FRqU98DJu1fXES56uXniYFv4yDA= -github.com/actgardner/gogen-avro/v10 v10.2.1/go.mod h1:QUhjeHPchheYmMDni/Nx7VB0RsT/ee8YIgGY/xpEQgQ= -github.com/actgardner/gogen-avro/v9 v9.1.0/go.mod h1:nyTj6wPqDJoxM3qdnjcLv+EnMDSDFqE0qDpva2QRmKc= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -245,16 +263,23 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb 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= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 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.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -265,30 +290,48 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bro-n-bro/spacebox v1.1.1 h1:NV8bKnd/YvPv0cU4mYLRxKEgyVOtEMmB9hEPbvR4U60= -github.com/bro-n-bro/spacebox v1.1.1/go.mod h1:HtLDKfstS5gaocXKym0e1LLygmxLFHgn4UxBbDzTyLg= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bro-n-bro/spacebox v1.2.0 h1:7fbuq1KzXT65EpPeBi7xaviu1Cy3xmJZbAPxADpnx9I= +github.com/bro-n-bro/spacebox v1.2.0/go.mod h1:HtLDKfstS5gaocXKym0e1LLygmxLFHgn4UxBbDzTyLg= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= +github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/caarlos0/env/v6 v6.10.1 h1:t1mPSxNpei6M5yAeu1qtRdPAK29Nbcf/n3G7x+b3/II= github.com/caarlos0/env/v6 v6.10.1/go.mod h1:hvp/ryKXKipEkcuYjs9mI4bBCg+UI0Yhgm5Zu0ddvwc= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= 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= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= 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= @@ -299,8 +342,10 @@ github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObk 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/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= 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/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= 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= @@ -312,6 +357,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH 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-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 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= @@ -330,16 +376,27 @@ github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AK github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= -github.com/confluentinc/confluent-kafka-go v1.9.2 h1:gV/GxhMBUb03tFWkN+7kdhg+zf+QUM+wVkI9zwh770Q= -github.com/confluentinc/confluent-kafka-go v1.9.2/go.mod h1:ptXNqsuDfYbAE/LBW6pnwWZElUoWxHoV8E43DCrliyo= +github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 h1:icCHutJouWlQREayFwCc7lxDAhws08td+W3/gdqgZts= +github.com/confluentinc/confluent-kafka-go/v2 v2.3.0/go.mod h1:/VTy8iEpe6mD9pkCH5BhijlUl8ulUXymKv1Qig5Rgb8= +github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= +github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= +github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= +github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= @@ -356,8 +413,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ibc-go/v7 v7.3.0 h1:QtGeVMi/3JeLWuvEuC60sBHpAF40Oenx/y+bP8+wRRw= +github.com/cosmos/ibc-go/v7 v7.3.0/go.mod h1:mUmaHFXpXrEdcxfdXyau+utZf14pGKVUiXwYftRZZfQ= 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/v3 v3.0.0-rc2 h1:bCPsPX8pDRizqRV1i+9gX9RYAeKRBCmVd3C7NC3weTE= @@ -368,13 +425,19 @@ github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzU github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= 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.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= 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/cybercongress/go-cyber v0.3.2 h1:ixSZNv3S3BkH3JGajLzjTcrSSY7pzmDLbfpA/ewoZs0= +github.com/cybercongress/go-cyber v0.3.2/go.mod h1:JuK2uI3S+ksVk6RTtaTHbJHjaf+ozFED8tXXU5ynn6I= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -382,8 +445,11 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -393,8 +459,15 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/UP4DvJwvyKYq64= +github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -416,24 +489,32 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m 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.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= 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 v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= -github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -458,11 +539,13 @@ github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgO github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= 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-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -476,8 +559,10 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -517,10 +602,15 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= 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-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/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= @@ -566,7 +656,6 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 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= @@ -611,7 +700,6 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe 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/pprof v0.0.0-20211008130755-947d60d73cc0/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -646,15 +734,21 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 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= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -665,9 +759,11 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hamba/avro v1.5.6/go.mod h1:3vNT0RLXXpFm2Tb/5KC71ZRJlOroggq1Rcitb6k4Fr8= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -675,13 +771,18 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -696,6 +797,7 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 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= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4= @@ -704,35 +806,39 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/heetch/avro v0.3.1/go.mod h1:4xn38Oz/+hiEUTpbVfGVLfvOg0yKLlRP7Q9+gJJILgA= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= 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.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.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/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= 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= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 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/invopop/jsonschema v0.4.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/iqlusioninc/liquidity-staking-module v1.0.1-0.20230328111802-7516902199bb h1:0+UrfRJlHo555Z0A2wnm9hP67hh97WkbKne6aXtGihs= github.com/iqlusioninc/liquidity-staking-module v1.0.1-0.20230328111802-7516902199bb/go.mod h1:hjyixoT2AkKqhZA8QePHunOoI+hYWh3RQaHS0LH0ufo= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -747,6 +853,7 @@ github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -758,17 +865,19 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm 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/juju/qthttptest v0.1.1/go.mod h1:aTlAv8TYaflIiTDIQYzxnl1QdPjAg8Q8qJMErpKy6A4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= 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.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= @@ -780,7 +889,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -790,20 +899,20 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= 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/linkedin/goavro v2.1.0+incompatible/go.mod h1:bBCwI2eGYpUI/4820s67MElg9tdeLbINjLjiM2xZFYM= -github.com/linkedin/goavro/v2 v2.10.0/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= -github.com/linkedin/goavro/v2 v2.10.1/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= -github.com/linkedin/goavro/v2 v2.11.1/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= @@ -811,11 +920,18 @@ github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GW github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -823,16 +939,26 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/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-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 h1:MHkK1uRtFbVqvAgvWxafZe54+5uBxLluGylDiKgdhwo= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -843,8 +969,17 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= +github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= +github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -852,39 +987,66 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= +github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= +github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= +github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= +github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= +github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= +github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= +github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= +github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= 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/nrwiersma/avro-benchmarks v0.0.0-20210913175520-21aec48c8f76/go.mod h1:iKyFMidsk/sVYONJRE372sJuX/QTRPacU7imPqqsu7g= 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= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= @@ -892,18 +1054,24 @@ github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeR github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/oxyno-zeta/gomock-extra-matcher v1.1.0 h1:Yyk5ov0ZPKBXtVEeIWtc4J2XVrHuNoIK+0F2BUJgtsc= @@ -915,35 +1083,43 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 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.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= 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= @@ -952,43 +1128,49 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= 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.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= 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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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-20200313005456-10cdbea86bc0/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/rogpeppe/clock v0.0.0-20190514195947-2896927a307a/go.mod h1:4r5QyqhjIWCcK8DO4KMclc5Iknq5qVBAlbYYzAbUScQ= 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.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -998,11 +1180,13 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -1010,23 +1194,30 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= 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.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1037,11 +1228,15 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn 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.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= 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/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -1049,7 +1244,6 @@ github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -1061,19 +1255,31 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= +github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +github.com/testcontainers/testcontainers-go v0.14.0 h1:h0D5GaYG9mhOWr2qHdEKDXpkce/VlvaYOCzTRi6UBi8= +github.com/testcontainers/testcontainers-go v0.14.0/go.mod h1:hSRGJ1G8Q5Bw2gXgPulJOLlEBaYJHeBSOkQM5JLG+JQ= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -1085,14 +1291,16 @@ 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= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= 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/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= @@ -1107,13 +1315,22 @@ github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.mongodb.org/mongo-driver v1.7.1/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= -go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= -go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= +go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= 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= @@ -1130,14 +1347,20 @@ 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= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1145,20 +1368,34 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= 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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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= @@ -1171,6 +1408,7 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -1196,9 +1434,11 @@ 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.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -1213,12 +1453,14 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn 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-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 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-20190923162816-aa69164e4478/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= @@ -1228,13 +1470,13 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL 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-20200505041828-1ed23360d12c/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-20200813134508-3edf25e44fcc/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= @@ -1245,10 +1487,17 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v 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-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= 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-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/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= @@ -1261,8 +1510,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug 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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= 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= @@ -1278,6 +1527,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ 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-20211005180243-6b3c2da341f1/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= @@ -1318,6 +1568,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1327,22 +1578,29 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/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= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20191210023423-ac6580df4449/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-20200124204421-9fbb57f87de9/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= @@ -1353,11 +1611,15 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200519105757-fe76b779f299/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-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/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= @@ -1367,12 +1629,15 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/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-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/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-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1382,15 +1647,19 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc 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-20210816183151-1e6c022a8912/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-20210917161153-d61c044b1678/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-20211007075335-d3039528d8ac/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-20211205182925-97ca703d548d/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-20220114195835-da31bd327af9/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= @@ -1416,8 +1685,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= @@ -1429,17 +1698,22 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/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= @@ -1456,6 +1730,7 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw 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-20190907020128-2ca718005c18/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= @@ -1481,7 +1756,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs 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-20200505023115-26f46d2f7ef8/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= @@ -1490,6 +1764,7 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc 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-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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= @@ -1515,6 +1790,10 @@ golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNq golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= 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= @@ -1545,6 +1824,7 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 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.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= 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= @@ -1638,7 +1918,10 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc 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-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/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= @@ -1657,7 +1940,6 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX 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-20220503193339-ba3ae3f07e29/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= @@ -1723,6 +2005,8 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD 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.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= 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= @@ -1753,25 +2037,22 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/avro.v0 v0.0.0-20171217001914-a730b5802183/go.mod h1:FvqrFXt+jCsyQibeRv4xxEJBL5iG2DDW5aeJwzDiq4A= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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.v1 v1.0.0/go.mod h1:CxwszS/Xz1C49Ucd2i6Zil5UToP1EmyrFhKaMVbg1mk= 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= -gopkg.in/httprequest.v1 v1.2.1/go.mod h1:x2Otw96yda5+8+6ZeWwHIJTFkEHWP/qP8pJOzqEtWPM= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/retry.v1 v1.0.3/go.mod h1:FJkXmWiMaAo7xB+xhvDF59zhfjDWyzmyAxiT4dB688g= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1781,7 +2062,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1791,6 +2071,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1806,9 +2087,11 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0 pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= 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.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/app/app.go b/internal/app/app.go index b3e59fd..9b52fde 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -4,6 +4,7 @@ import ( "context" "time" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/codec" cdc "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -38,6 +39,10 @@ import ( ibclightclient "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" interchainprovider "github.com/cosmos/interchain-security/v3/x/ccv/provider" interchaintypes "github.com/cosmos/interchain-security/v3/x/ccv/types" + dmntypes "github.com/cybercongress/go-cyber/x/dmn/types" + graphtypes "github.com/cybercongress/go-cyber/x/graph/types" + gridtypes "github.com/cybercongress/go-cyber/x/grid/types" + resourcestypes "github.com/cybercongress/go-cyber/x/resources/types" liqdibutiontypes "github.com/iqlusioninc/liquidity-staking-module/x/distribution/types" liqslashingtypes "github.com/iqlusioninc/liquidity-staking-module/x/slashing/types" liqstakingtypes "github.com/iqlusioninc/liquidity-staking-module/x/staking/types" @@ -58,6 +63,7 @@ import ( tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" ts "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_storage" "github.com/bro-n-bro/spacebox-crawler/pkg/worker" + _ "github.com/bro-n-bro/spacebox-crawler/types/bostrom" liquiditytypes "github.com/bro-n-bro/spacebox-crawler/types/liquidity" ) @@ -100,9 +106,6 @@ func New(cfg Config, version string, l zerolog.Logger) *App { func (a *App) Start(ctx context.Context) error { a.log.Info().Msg("starting app") - grpcCli := grpcClient.New(a.cfg.GRPCConfig, *a.log) - rpcCli := rpcClient.New(a.cfg.RPCConfig) - // TODO: use redis valCache, err := cache.New[string, int64](defaultCacheSize, cache.WithCompareFunc[string, int64](lessInt64)) if err != nil { @@ -130,13 +133,19 @@ func (a *App) Start(ctx context.Context) error { } // collect data only from bigger height - tallyCache, err := cache.New[uint64, int64](defaultCacheSize, cache.WithCompareFunc[uint64, int64](lessInt64)) + tCache, err := cache.New[uint64, int64](defaultCacheSize, cache.WithCompareFunc[uint64, int64](lessInt64)) if err != nil { return err } // collect data only from earlier height - accCache, err := cache.New[string, int64](defaultCacheSize, cache.WithCompareFunc[string, int64](greaterInt64)) + aCache, err := cache.New[string, int64](defaultCacheSize, cache.WithCompareFunc[string, int64](greaterInt64)) + if err != nil { + return err + } + + // collect data only from bigger height + rCache, err := cache.New[string, int64](defaultCacheSize, cache.WithCompareFunc[string, int64](lessInt64)) if err != nil { return err } @@ -149,8 +158,8 @@ func (a *App) Start(ctx context.Context) error { valDescriptionCache.Patch(cache.WithMetrics[string, int64]("validators_description")) valInfoCache.Patch(cache.WithMetrics[string, int64]("validators_info")) valStatusCache.Patch(cache.WithMetrics[string, int64]("validators_status")) - tallyCache.Patch(cache.WithMetrics[uint64, int64]("tally")) - accCache.Patch(cache.WithMetrics[string, int64]("account")) + tCache.Patch(cache.WithMetrics[uint64, int64]("tally")) + aCache.Patch(cache.WithMetrics[string, int64]("account")) promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "spacebox_crawler", @@ -160,43 +169,44 @@ func (a *App) Start(ctx context.Context) error { }).Inc() } - b := broker.New(a.cfg.BrokerConfig, a.cfg.Modules, *a.log, - broker.WithValidatorCache(valCache), - broker.WithValidatorCommissionCache(valCommissionCache), - broker.WithValidatorDescriptionCache(valDescriptionCache), - broker.WithValidatorInfoCache(valInfoCache), - broker.WithValidatorStatusCache(valStatusCache), + var ( + cod, amn = MakeEncodingConfig() + sto = storage.New(a.cfg.StorageConfig, *a.log) + rpcCli = rpcClient.New(a.cfg.RPCConfig) + grpcCli = grpcClient.New(a.cfg.GRPCConfig, *a.log, sto) + tbr = tb.NewToBroker(cod, amn.LegacyAmino) + par = core.JoinMessageParsers(core.CosmosMessageAddressesParser) + + brk = broker.New(a.cfg.BrokerConfig, a.cfg.Modules, *a.log, + broker.WithValidatorCache(valCache), + broker.WithValidatorCommissionCache(valCommissionCache), + broker.WithValidatorDescriptionCache(valDescriptionCache), + broker.WithValidatorInfoCache(valInfoCache), + broker.WithValidatorStatusCache(valStatusCache), + ) + + mds = modules.BuildModules(a.log, a.cfg.Modules, a.cfg.DefaultDenom, grpcCli, rpcCli, brk, cod, *tbr, par, tCache, aCache, rCache) //nolint:lll + tos = ts.NewToStorage() + wrk = worker.New(a.cfg.WorkerConfig, *a.log, brk, rpcCli, grpcCli, mds, sto, cod, *tbr, *tos) + srv = server.New(a.cfg.Server, sto, *a.log) ) - s := storage.New(a.cfg.StorageConfig, *a.log) - - cdc, amino := MakeEncodingConfig() - tb := tb.NewToBroker(cdc, amino.LegacyAmino) - parser := core.JoinMessageParsers(core.CosmosMessageAddressesParser) - - modules := modules.BuildModules(b, a.log, grpcCli, rpcCli, *tb, cdc, a.cfg.Modules, parser, a.cfg.DefaultDenom, - tallyCache, accCache) - ts := ts.NewToStorage() - w := worker.New(a.cfg.WorkerConfig, *a.log, b, rpcCli, grpcCli, modules, s, cdc, *tb, *ts) - server := server.New(a.cfg.Server, s, *a.log) + MakeSDKConfig(a.cfg, sdk.GetConfig()) - MakeSdkConfig(a.cfg, sdk.GetConfig()) - - a.cmps = append( - a.cmps, - cmp{s, "storage"}, - cmp{grpcCli, "grpcClient"}, - cmp{rpcCli, "rpcClient"}, - cmp{b, "broker"}, - cmp{w, "worker"}, - cmp{server, "server"}, + a.cmps = append(a.cmps, + cmp{sto, "storage"}, + cmp{grpcCli, "grpc_client"}, + cmp{rpcCli, "rpc_client"}, + cmp{brk, "broker"}, + cmp{wrk, "worker"}, + cmp{srv, "server"}, ) okCh, errCh := make(chan struct{}), make(chan error) go func() { for _, c := range a.cmps { - a.log.Info().Msgf("%v is starting", c.Name) + a.log.Info().Str("service", c.Name).Msg("starting") if err := c.Service.Start(ctx); err != nil { a.log.Error().Err(err).Msgf(FmtCannotStart, c.Name) @@ -205,8 +215,9 @@ func (a *App) Start(ctx context.Context) error { return } - a.log.Info().Msgf("%v started", c.Name) + a.log.Info().Str("service", c.Name).Msg("started") } + okCh <- struct{}{} }() @@ -216,7 +227,7 @@ func (a *App) Start(ctx context.Context) error { case err := <-errCh: return err case <-okCh: - a.log.Info().Msg("Application started!") + a.log.Info().Msg("application started") return nil } } @@ -229,10 +240,11 @@ func (a *App) Stop(ctx context.Context) error { go func() { for i := len(a.cmps) - 1; i > 0; i-- { c := a.cmps[i] - a.log.Info().Msgf("stopping %q...", c.Name) + + a.log.Info().Str("service", c.Name).Msg("stopping") if err := c.Service.Stop(ctx); err != nil { - a.log.Error().Err(err).Msgf("cannot stop %q", c.Name) + a.log.Error().Str("service", c.Name).Err(err).Msg("cannot stop") errCh <- err return @@ -248,7 +260,7 @@ func (a *App) Stop(ctx context.Context) error { case err := <-errCh: return err case <-okCh: - a.log.Info().Msg("Application stopped!") + a.log.Info().Msg("application stopped") return nil } } @@ -258,69 +270,82 @@ func (a *App) GetStopTimeout() time.Duration { return a.cfg.StopTimeout } // MakeEncodingConfig creates an EncodingConfig to properly handle and marshal all messages func MakeEncodingConfig() (codec.Codec, *codec.AminoCodec) { - ir := cdc.NewInterfaceRegistry() - - var basicManager = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distribution.AppModuleBasic{}, - gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - }, - ), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - authzmodule.AppModuleBasic{}, - groupmodule.AppModuleBasic{}, - vesting.AppModuleBasic{}, - nftmodule.AppModuleBasic{}, - consensus.AppModuleBasic{}, - ibc.AppModuleBasic{}, - ibclightclient.AppModuleBasic{}, - interchainprovider.AppModuleBasic{}, + var ( + registry = cdc.NewInterfaceRegistry() + basicManager = module.NewBasicManager( + auth.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + bank.AppModuleBasic{}, + capability.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distribution.AppModuleBasic{}, + params.AppModuleBasic{}, + crisis.AppModuleBasic{}, + slashing.AppModuleBasic{}, + feegrantmodule.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + evidence.AppModuleBasic{}, + authzmodule.AppModuleBasic{}, + groupmodule.AppModuleBasic{}, + vesting.AppModuleBasic{}, + nftmodule.AppModuleBasic{}, + consensus.AppModuleBasic{}, + ibc.AppModuleBasic{}, + ibclightclient.AppModuleBasic{}, + interchainprovider.AppModuleBasic{}, + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + }, + ), + ) ) - basicManager.RegisterInterfaces(ir) - std.RegisterInterfaces(ir) - ibctransfertypes.RegisterInterfaces(ir) - cryptocodec.RegisterInterfaces(ir) - interchaintypes.RegisterInterfaces(ir) - liquiditytypes.RegisterInterfaces(ir) - liqstakingtypes.RegisterInterfaces(ir) - liqslashingtypes.RegisterInterfaces(ir) - liqdibutiontypes.RegisterInterfaces(ir) - + // + basicManager.RegisterInterfaces(registry) + std.RegisterInterfaces(registry) + ibctransfertypes.RegisterInterfaces(registry) + cryptocodec.RegisterInterfaces(registry) + interchaintypes.RegisterInterfaces(registry) + liquiditytypes.RegisterInterfaces(registry) + liqstakingtypes.RegisterInterfaces(registry) + liqslashingtypes.RegisterInterfaces(registry) + liqdibutiontypes.RegisterInterfaces(registry) + + // bostrom + graphtypes.RegisterInterfaces(registry) + dmntypes.RegisterInterfaces(registry) + gridtypes.RegisterInterfaces(registry) + resourcestypes.RegisterInterfaces(registry) + wasmtypes.RegisterInterfaces(registry) + + // amino := codec.NewAminoCodec(codec.NewLegacyAmino()) std.RegisterLegacyAminoCodec(amino.LegacyAmino) // FIXME: not needed? ibctransfertypes.RegisterLegacyAminoCodec(amino.LegacyAmino) liquiditytypes.RegisterLegacyAminoCodec(amino.LegacyAmino) - return codec.NewProtoCodec(ir), amino + return codec.NewProtoCodec(registry), amino } -// MakeSdkConfig represents a handy implementation of SdkConfigSetup that simply setups the prefix +// MakeSDKConfig represents a handy implementation of SdkConfigSetup that simply setups the prefix // inside the configuration -func MakeSdkConfig(cfg Config, sdkConfig *sdk.Config) { +func MakeSDKConfig(cfg Config, sdkConfig *sdk.Config) { prefix := cfg.ChainPrefix + sdkConfig.SetBech32PrefixForAccount( prefix, prefix+sdk.PrefixPublic, ) + sdkConfig.SetBech32PrefixForValidator( prefix+sdk.PrefixValidator+sdk.PrefixOperator, prefix+sdk.PrefixValidator+sdk.PrefixOperator+sdk.PrefixPublic, ) + sdkConfig.SetBech32PrefixForConsensusNode( prefix+sdk.PrefixValidator+sdk.PrefixConsensus, prefix+sdk.PrefixValidator+sdk.PrefixConsensus+sdk.PrefixPublic, diff --git a/internal/rep/broker.go b/internal/rep/broker.go index c4dd676..da8ee8c 100644 --- a/internal/rep/broker.go +++ b/internal/rep/broker.go @@ -7,65 +7,65 @@ import ( ) type Broker interface { - // auth + // auth module PublishAccount(context.Context, model.Account) error - // core + // core module PublishBlock(context.Context, model.Block) error - PublishMessage(ctx context.Context, message model.Message) error - PublishTransaction(ctx context.Context, tx model.Transaction) error - PublishValidatorPrecommit(ctx context.Context, vp model.ValidatorPrecommit) error - PublishValidatorVotingPower(ctx context.Context, vp model.ValidatorVotingPower) error + PublishMessage(context.Context, model.Message) error + PublishTransaction(context.Context, model.Transaction) error + PublishValidatorPreCommit(context.Context, model.ValidatorPreCommit) error + PublishValidatorVotingPower(context.Context, model.ValidatorVotingPower) error - // bank + // bank module PublishSupply(context.Context, model.Supply) error PublishSendMessage(context.Context, model.SendMessage) error - PublishMultiSendMessage(ctx context.Context, msm model.MultiSendMessage) error - PublishAccountBalance(ctx context.Context, ab model.AccountBalance) error + PublishMultiSendMessage(context.Context, model.MultiSendMessage) error + PublishAccountBalance(context.Context, model.AccountBalance) error - // distribution + // distribution module PublishDelegationReward(context.Context, model.DelegationReward) error PublishDelegationRewardMessage(context.Context, model.DelegationRewardMessage) error - PublishDistributionParams(ctx context.Context, dp model.DistributionParams) error - PublishValidatorCommission(ctx context.Context, commission model.ValidatorCommission) error - PublishSetWithdrawAddressMessage(_ context.Context, swm model.SetWithdrawAddressMessage) error - PublishProposerReward(ctx context.Context, pr model.ProposerReward) error - PublishDistributionCommission(ctx context.Context, commission model.DistributionCommission) error - PublishDistributionReward(ctx context.Context, reward model.DistributionReward) error - PublishWithdrawValidatorCommissionMessage(_ context.Context, wvcm model.WithdrawValidatorCommissionMessage) error - - // staking - PublishCommunityPool(ctx context.Context, cp model.CommunityPool) error + PublishDistributionParams(context.Context, model.DistributionParams) error + PublishValidatorCommission(context.Context, model.ValidatorCommission) error + PublishSetWithdrawAddressMessage(context.Context, model.SetWithdrawAddressMessage) error + PublishProposerReward(context.Context, model.ProposerReward) error + PublishDistributionCommission(context.Context, model.DistributionCommission) error + PublishDistributionReward(context.Context, model.DistributionReward) error + PublishWithdrawValidatorCommissionMessage(context.Context, model.WithdrawValidatorCommissionMessage) error + + // staking module + PublishCommunityPool(context.Context, model.CommunityPool) error PublishUnbondingDelegation(context.Context, model.UnbondingDelegation) error PublishUnbondingDelegationMessage(context.Context, model.UnbondingDelegationMessage) error - PublishStakingParams(ctx context.Context, sp model.StakingParams) error - PublishDelegation(ctx context.Context, d model.Delegation) error - PublishDisabledDelegation(ctx context.Context, d model.Delegation) error - PublishDelegationMessage(ctx context.Context, dm model.DelegationMessage) error + PublishStakingParams(context.Context, model.StakingParams) error + PublishDelegation(context.Context, model.Delegation) error + PublishDisabledDelegation(context.Context, model.Delegation) error + PublishDelegationMessage(context.Context, model.DelegationMessage) error PublishRedelegationMessage(context.Context, model.RedelegationMessage) error PublishRedelegation(context.Context, model.Redelegation) error - PublishStakingPool(ctx context.Context, sp model.StakingPool) error - PublishValidator(ctx context.Context, val model.Validator) error - PublishValidatorInfo(ctx context.Context, info model.ValidatorInfo) error - PublishValidatorStatus(ctx context.Context, status model.ValidatorStatus) error - PublishValidatorDescription(ctx context.Context, description model.ValidatorDescription) error - PublishCreateValidatorMessage(ctx context.Context, cvm model.CreateValidatorMessage) error - PublishEditValidatorMessage(ctx context.Context, message model.EditValidatorMessage) error - PublishCancelUnbondingDelegationMessage(_ context.Context, description model.CancelUnbondingDelegationMessage) error + PublishStakingPool(context.Context, model.StakingPool) error + PublishValidator(context.Context, model.Validator) error + PublishValidatorInfo(context.Context, model.ValidatorInfo) error + PublishValidatorStatus(context.Context, model.ValidatorStatus) error + PublishValidatorDescription(context.Context, model.ValidatorDescription) error + PublishCreateValidatorMessage(context.Context, model.CreateValidatorMessage) error + PublishEditValidatorMessage(context.Context, model.EditValidatorMessage) error + PublishCancelUnbondingDelegationMessage(context.Context, model.CancelUnbondingDelegationMessage) error // mint module - PublishMintParams(ctx context.Context, mp model.MintParams) error - PublishAnnualProvision(ctx context.Context, ap model.AnnualProvision) error + PublishMintParams(context.Context, model.MintParams) error + PublishAnnualProvision(context.Context, model.AnnualProvision) error // gov module - PublishProposal(ctx context.Context, proposal model.Proposal) error - PublishGovParams(ctx context.Context, params model.GovParams) error - PublishProposalDeposit(ctx context.Context, pvm model.ProposalDeposit) error - PublishProposalDepositMessage(ctx context.Context, pvm model.ProposalDepositMessage) error + PublishProposal(context.Context, model.Proposal) error + PublishGovParams(context.Context, model.GovParams) error + PublishProposalDeposit(context.Context, model.ProposalDeposit) error + PublishProposalDepositMessage(context.Context, model.ProposalDepositMessage) error PublishProposalVoteMessage(context.Context, model.ProposalVoteMessage) error - PublishProposalTallyResult(ctx context.Context, ptr model.ProposalTallyResult) error - PublishSubmitProposalMessage(ctx context.Context, spm model.SubmitProposalMessage) error - PublishVoteWeightedMessage(ctx context.Context, vwm model.VoteWeightedMessage) error + PublishProposalTallyResult(context.Context, model.ProposalTallyResult) error + PublishSubmitProposalMessage(context.Context, model.SubmitProposalMessage) error + PublishVoteWeightedMessage(context.Context, model.VoteWeightedMessage) error // authz module PublishGrantMessage(context.Context, model.GrantMessage) error @@ -83,13 +83,38 @@ type Broker interface { PublishUnjailMessage(context.Context, model.UnjailMessage) error PublishHandleValidatorSignature(ctx context.Context, msg model.HandleValidatorSignature) error - // ibc + // ibc module PublishTransferMessage(context.Context, model.TransferMessage) error PublishAcknowledgementMessage(context.Context, model.AcknowledgementMessage) error PublishReceivePacketMessage(context.Context, model.RecvPacketMessage) error PublishDenomTrace(context.Context, model.DenomTrace) error - // liquidity + // liquidity module PublishSwap(context.Context, model.Swap) error PublishLiquidityPool(context.Context, model.LiquidityPool) error + + // graph module + PublishCyberlink(context.Context, model.Cyberlink) error + PublishCyberlinkMessage(context.Context, model.CyberlinkMessage) error + PublishParticle(context.Context, model.Particle) error + + // bandwidth module + PublishBandwidthParams(context.Context, model.BandwidthParams) error + + // dmn module + PublishDMNParams(context.Context, model.DMNParams) error + + // grid module + PublishGridParams(context.Context, model.GridParams) error + PublishRoute(context.Context, model.Route) error + PublishCreateRouteMessage(context.Context, model.CreateRouteMessage) error + PublishEditRouteMessage(context.Context, model.EditRouteMessage) error + PublishEditRouteNameMessage(context.Context, model.EditRouteNameMessage) error + PublishDeleteRouteMessage(context.Context, model.DeleteRouteMessage) error + + // rank module + PublishRankParams(context.Context, model.RankParams) error + + // resources module + PublishInvestmintMessage(context.Context, model.InvestmintMessage) error } diff --git a/internal/rep/storage.go b/internal/rep/storage.go index 47c3914..fbe893a 100644 --- a/internal/rep/storage.go +++ b/internal/rep/storage.go @@ -15,6 +15,7 @@ type Storage interface { UpdateStatus(ctx context.Context, height int64, status model.Status) error GetErrorBlockHeights(ctx context.Context) ([]int64, error) + InsertErrorTx(ctx context.Context, message model.Tx) error InsertErrorMessage(ctx context.Context, message model.Message) error Ping(ctx context.Context) error diff --git a/modules/auth/module.go b/modules/auth/module.go index 22a4067..d130f31 100644 --- a/modules/auth/module.go +++ b/modules/auth/module.go @@ -1,19 +1,18 @@ package auth import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" "github.com/bro-n-bro/spacebox-crawler/modules/core" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "auth" + ModuleName = "auth" ) var ( @@ -33,19 +32,14 @@ type ( broker broker tbM tb.ToBroker cdc codec.Codec - parser core.MessageAddressesParser + parser core.MsgAddrParser accCache AccountCache[string, int64] } ) -func New(b broker, cli *grpcClient.Client, tb tb.ToBroker, cdc codec.Codec, - parser core.MessageAddressesParser) *Module { - - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - +func New(b broker, cli *grpcClient.Client, tb tb.ToBroker, cdc codec.Codec, parser core.MsgAddrParser) *Module { return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, tbM: tb, client: cli, @@ -54,8 +48,12 @@ func New(b broker, cli *grpcClient.Client, tb tb.ToBroker, cdc codec.Codec, } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } + +func (m *Module) WithAccountCache(cache AccountCache[string, int64]) *Module { + if cache != nil { + m.accCache = cache + } -func (m *Module) SetAccountCache(cache AccountCache[string, int64]) { - m.accCache = cache + return m } diff --git a/modules/authz/module.go b/modules/authz/module.go index 80a3e2a..1b83f32 100644 --- a/modules/authz/module.go +++ b/modules/authz/module.go @@ -1,18 +1,17 @@ package authz import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "authz" + ModuleName = "authz" ) var ( @@ -31,11 +30,8 @@ type Module struct { // New creates a new authz module. func New(b broker, cli *grpcClient.Client, tb tb.ToBroker, cdc codec.Codec) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, tbM: tb, client: cli, @@ -44,4 +40,4 @@ func New(b broker, cli *grpcClient.Client, tb tb.ToBroker, cdc codec.Codec) *Mod } // Name returns the module name. -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/bandwidth/block.go b/modules/bandwidth/block.go new file mode 100644 index 0000000..32bbbce --- /dev/null +++ b/modules/bandwidth/block.go @@ -0,0 +1,39 @@ +package bandwidth + +import ( + "context" + + bandwidthtypes "github.com/cybercongress/go-cyber/x/bandwidth/types" + "github.com/pkg/errors" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { + paramsResp, err := m.client.BandwidthQueryClient.Params( + ctx, + &bandwidthtypes.QueryParamsRequest{}, + grpcClient.GetHeightRequestHeader(block.Height), + ) + if err != nil { + m.log.Error().Err(err).Int64("height", block.Height).Msg("error while getting params") + return err + } + + if err = m.broker.PublishBandwidthParams(ctx, model.BandwidthParams{ + Height: block.Height, + Params: model.RawBandwidthParams{ + RecoveryPeriod: paramsResp.Params.RecoveryPeriod, + AdjustPricePeriod: paramsResp.Params.AdjustPricePeriod, + BasePrice: paramsResp.Params.BasePrice.MustFloat64(), + BaseLoad: paramsResp.Params.BaseLoad.MustFloat64(), + MaxBlockBandwidth: paramsResp.Params.MaxBlockBandwidth, + }, + }); err != nil { + return errors.Wrap(err, "PublishBandwidthParams error") + } + + return nil +} diff --git a/modules/bandwidth/broker.go b/modules/bandwidth/broker.go new file mode 100644 index 0000000..896c2ff --- /dev/null +++ b/modules/bandwidth/broker.go @@ -0,0 +1,11 @@ +package bandwidth + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishBandwidthParams(ctx context.Context, mp model.BandwidthParams) error +} diff --git a/modules/bandwidth/module.go b/modules/bandwidth/module.go new file mode 100644 index 0000000..d6be35c --- /dev/null +++ b/modules/bandwidth/module.go @@ -0,0 +1,37 @@ +package bandwidth + +import ( + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "bandwidth" +) + +var ( + _ types.Module = &Module{} + _ types.BlockHandler = &Module{} +) + +type Module struct { + log *zerolog.Logger + client *grpcClient.Client + broker broker + tbM tb.ToBroker +} + +func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + client: cli, + tbM: tbM, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/modules/bank/block.go b/modules/bank/block.go index 35b4a4b..de1941c 100644 --- a/modules/bank/block.go +++ b/modules/bank/block.go @@ -37,7 +37,7 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { supply.Coins = make(model.Coins, 0, respPb.Pagination.Total) } - supply.Coins = append(supply.Coins, m.tbM.MapCoins(types.NewCoinsFromCdk(respPb.Supply))...) + supply.Coins = append(supply.Coins, m.tbM.MapCoins(types.NewCoinsFromSDK(respPb.Supply))...) nextKey = respPb.Pagination.NextKey if len(nextKey) == 0 { diff --git a/modules/bank/genesis.go b/modules/bank/genesis.go index a78c1c9..62583a7 100644 --- a/modules/bank/genesis.go +++ b/modules/bank/genesis.go @@ -44,7 +44,7 @@ func (m *Module) HandleGenesis( if err = m.broker.PublishAccountBalance(ctx, model.AccountBalance{ Address: balance.Address, Height: doc.InitialHeight, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(balance.Coins)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(balance.Coins)), }); err != nil { return err } diff --git a/modules/bank/helper.go b/modules/bank/helper.go index d0fd5d6..b124d2e 100644 --- a/modules/bank/helper.go +++ b/modules/bank/helper.go @@ -28,7 +28,7 @@ func (m *Module) updateBalance(ctx context.Context, addresses []string, height i model.AccountBalance{ Address: address, Height: height, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(balRes.Balances)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(balRes.Balances)), }); err != nil { return err } diff --git a/modules/bank/message.go b/modules/bank/message.go index 83a5a6e..75729af 100644 --- a/modules/bank/message.go +++ b/modules/bank/message.go @@ -30,7 +30,7 @@ func (m *Module) HandleMessage(ctx context.Context, index int, cosmosMsg sdk.Msg for _, to := range msg.Outputs { message.AddressesTo = append(message.AddressesTo, to.Address) - message.Coins = append(message.Coins, m.tbM.MapCoins(types.NewCoinsFromCdk(to.Coins))...) + message.Coins = append(message.Coins, m.tbM.MapCoins(types.NewCoinsFromSDK(to.Coins))...) } if err := m.broker.PublishMultiSendMessage(ctx, message); err != nil { @@ -40,7 +40,7 @@ func (m *Module) HandleMessage(ctx context.Context, index int, cosmosMsg sdk.Msg case *banktypes.MsgSend: // TODO: test it if err := m.broker.PublishSendMessage(ctx, model.SendMessage{ - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(msg.Amount)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(msg.Amount)), AddressFrom: msg.FromAddress, AddressTo: msg.ToAddress, TxHash: tx.TxHash, diff --git a/modules/bank/module.go b/modules/bank/module.go index aa0aeac..9a6c681 100644 --- a/modules/bank/module.go +++ b/modules/bank/module.go @@ -1,19 +1,18 @@ package bank import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" "github.com/bro-n-bro/spacebox-crawler/modules/core" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "bank" + ModuleName = "bank" ) var ( @@ -29,17 +28,14 @@ type Module struct { tbM tb.ToBroker broker broker cdc codec.Codec - parser core.MessageAddressesParser + parser core.MsgAddrParser } func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec, - parser core.MessageAddressesParser) *Module { - - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() + parser core.MsgAddrParser) *Module { return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -48,4 +44,4 @@ func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec, } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/core/account_parser.go b/modules/core/account_parser.go index 125c086..356c350 100644 --- a/modules/core/account_parser.go +++ b/modules/core/account_parser.go @@ -13,30 +13,37 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + graph "github.com/cybercongress/go-cyber/x/graph/types" ) -// CosmosMessageAddressesParser represents a MessageAddressesParser that parses a -// Cosmos message and returns all the involved addresses (both accounts and validators) -var CosmosMessageAddressesParser = JoinMessageParsers( - BankMessagesParser, - CrisisMessagesParser, - DistributionMessagesParser, - EvidenceMessagesParser, - GovMessagesParser, - IBCTransferMessagesParser, - SlashingMessagesParser, - StakingMessagesParser, - FeeGrantMessagesParser, - AuthzMessagesParser, - DefaultMessagesParser, +var ( + // CosmosMessageAddressesParser represents a MsgAddrParser that parses a + // Cosmos message and returns all the involved addresses (both accounts and validators) + CosmosMessageAddressesParser = JoinMessageParsers( + BankMessagesParser, + CrisisMessagesParser, + DistributionMessagesParser, + EvidenceMessagesParser, + GovMessagesParser, + IBCTransferMessagesParser, + SlashingMessagesParser, + StakingMessagesParser, + FeeGrantMessagesParser, + AuthzMessagesParser, + GraphMessagesParser, + + DefaultMessagesParser, + ) ) -// MessageAddressesParser represents a function that extracts all the -// involved addresses from a provided message (both accounts and validators) -type MessageAddressesParser = func(cdc codec.Codec, msg sdk.Msg) []string +type ( + // MsgAddrParser represents a function that extracts all the + // involved addresses from a provided message (both accounts and validators) + MsgAddrParser = func(cdc codec.Codec, msg sdk.Msg) []string +) // JoinMessageParsers joins together all the given parsers, calling them in order -func JoinMessageParsers(parsers ...MessageAddressesParser) MessageAddressesParser { +func JoinMessageParsers(parsers ...MsgAddrParser) MsgAddrParser { return func(cdc codec.Codec, msg sdk.Msg) []string { // https://github.com/bro-n-bro/spacebox-crawler/issues/131 if msg == nil { @@ -58,9 +65,12 @@ func JoinMessageParsers(parsers ...MessageAddressesParser) MessageAddressesParse // DefaultMessagesParser represents the default messages parser that simply returns the list // of all the signers of a message -func DefaultMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - cosmosSigners := cosmosMsg.GetSigners() - signers := make([]string, len(cosmosSigners)) +func DefaultMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + var ( + cosmosSigners = incomingMsg.GetSigners() + signers = make([]string, len(cosmosSigners)) + ) + for index, signer := range cosmosSigners { signers[index] = signer.String() } @@ -70,16 +80,17 @@ func DefaultMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // BankMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/bank module -func BankMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func BankMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *banktypes.MsgSend: return []string{msg.ToAddress, msg.FromAddress} - case *banktypes.MsgMultiSend: var addresses []string + for _, i := range msg.Inputs { addresses = append(addresses, i.Address) } + for _, o := range msg.Outputs { addresses = append(addresses, o.Address) } @@ -92,9 +103,9 @@ func BankMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // CrisisMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/crisis module -func CrisisMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { +func CrisisMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { // nolint:gocritic - switch msg := cosmosMsg.(type) { + switch msg := incomingMsg.(type) { case *crisistypes.MsgVerifyInvariant: return []string{msg.Sender} } @@ -104,17 +115,14 @@ func CrisisMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // DistributionMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/distribution module -func DistributionMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func DistributionMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *distrtypes.MsgSetWithdrawAddress: return []string{msg.DelegatorAddress, msg.WithdrawAddress} - case *distrtypes.MsgWithdrawDelegatorReward: return []string{msg.DelegatorAddress, msg.ValidatorAddress} - case *distrtypes.MsgWithdrawValidatorCommission: return []string{msg.ValidatorAddress} - case *distrtypes.MsgFundCommunityPool: return []string{msg.Depositor} } @@ -124,9 +132,9 @@ func DistributionMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // EvidenceMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/evidence module -func EvidenceMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { +func EvidenceMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { // nolint:gocritic - switch msg := cosmosMsg.(type) { + switch msg := incomingMsg.(type) { case *evidencetypes.MsgSubmitEvidence: return []string{msg.Submitter} } @@ -136,17 +144,19 @@ func EvidenceMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // GovMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/gov module -func GovMessagesParser(cdc codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func GovMessagesParser(cdc codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *govtypes.MsgSubmitProposal: - addresses := []string{msg.Proposer} + var ( + addresses = []string{msg.Proposer} + content govtypes.Content + ) - var content govtypes.Content if err := cdc.UnpackAny(msg.Content, &content); err != nil { return nil } - // nolint:gocritic,staticcheck + //nolint:gocritic,staticcheck // Get addresses from contents switch content := content.(type) { case *distrtypes.CommunityPoolSpendProposal: @@ -154,10 +164,8 @@ func GovMessagesParser(cdc codec.Codec, cosmosMsg sdk.Msg) []string { } return addresses - case *govtypes.MsgDeposit: return []string{msg.Depositor} - case *govtypes.MsgVote: return []string{msg.Voter} } @@ -181,9 +189,9 @@ func GovMessagesParser(cdc codec.Codec, cosmosMsg sdk.Msg) []string { // SlashingMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/slashing module -func SlashingMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { +func SlashingMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { // nolint:gocritic - switch msg := cosmosMsg.(type) { + switch msg := incomingMsg.(type) { case *slashingtypes.MsgUnjail: return []string{msg.ValidatorAddr} } @@ -193,20 +201,16 @@ func SlashingMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // StakingMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/staking module -func StakingMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func StakingMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *stakingtypes.MsgCreateValidator: return []string{msg.ValidatorAddress, msg.DelegatorAddress} - case *stakingtypes.MsgEditValidator: return []string{msg.ValidatorAddress} - case *stakingtypes.MsgDelegate: return []string{msg.DelegatorAddress, msg.ValidatorAddress} - case *stakingtypes.MsgBeginRedelegate: return []string{msg.DelegatorAddress, msg.ValidatorSrcAddress, msg.ValidatorDstAddress} - case *stakingtypes.MsgUndelegate: return []string{msg.DelegatorAddress, msg.ValidatorAddress} } @@ -216,9 +220,9 @@ func StakingMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // IBCTransferMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/IBCTransfer module -func IBCTransferMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { +func IBCTransferMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { // nolint:gocritic - switch msg := cosmosMsg.(type) { + switch msg := incomingMsg.(type) { case *ibctransfertypes.MsgTransfer: return []string{msg.Sender, msg.Receiver} } @@ -228,8 +232,8 @@ func IBCTransferMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // FeeGrantMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/feegrant module -func FeeGrantMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func FeeGrantMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *feegranttypes.MsgGrantAllowance: return []string{msg.Granter, msg.Grantee} case *feegranttypes.MsgRevokeAllowance: @@ -241,8 +245,8 @@ func FeeGrantMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { // AuthzMessagesParser returns the list of all the accounts involved in the given // message if it's related to the x/authz module -func AuthzMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { - switch msg := cosmosMsg.(type) { +func AuthzMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { case *authztypes.MsgGrant: return []string{msg.Grantee, msg.Granter} case *authztypes.MsgRevoke: @@ -253,3 +257,19 @@ func AuthzMessagesParser(_ codec.Codec, cosmosMsg sdk.Msg) []string { return nil } + +// GraphMessagesParser returns the list of all the accounts involved in the given +// message if it's related to the x/graph module +func GraphMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string { + switch msg := incomingMsg.(type) { //nolint:gocritic + case *graph.MsgCyberlink: + resp := make([]string, 0, len(msg.Links)*2) + for _, link := range msg.Links { + resp = append(resp, link.From, link.To) + } + + return resp + } + + return nil +} diff --git a/modules/core/block.go b/modules/core/block.go index 4d9a60a..6a82691 100644 --- a/modules/core/block.go +++ b/modules/core/block.go @@ -18,22 +18,18 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { TotalGas: block.TotalGas, Timestamp: block.Timestamp, }); err != nil { - m.log.Error(). - Err(err). - Int64("block_height", block.Height). - Msg("PublishBlock error") - + m.log.Error().Err(err).Int64("block_height", block.Height).Msg("PublishBlock error") return err } - for _, precommit := range block.ValidatorPrecommits { - if err := m.broker.PublishValidatorPrecommit(ctx, model.ValidatorPrecommit{ + for _, preCommit := range block.ValidatorPreCommits { + if err := m.broker.PublishValidatorPreCommit(ctx, model.ValidatorPreCommit{ Height: block.Height, - ValidatorAddress: precommit.ValidatorAddress, - BlockIDFlag: precommit.BlockIDFlag, - Timestamp: precommit.Timestamp, + ValidatorAddress: preCommit.ValidatorAddress, + BlockIDFlag: preCommit.BlockIDFlag, + Timestamp: preCommit.Timestamp, }); err != nil { - return errors.Wrap(err, "PublishValidatorPrecommit error") + return errors.Wrap(err, "PublishValidatorPreCommit error") } } diff --git a/modules/core/broker.go b/modules/core/broker.go index 37697db..b012d54 100644 --- a/modules/core/broker.go +++ b/modules/core/broker.go @@ -10,6 +10,6 @@ type broker interface { PublishBlock(context.Context, model.Block) error PublishMessage(ctx context.Context, message model.Message) error PublishTransaction(ctx context.Context, tx model.Transaction) error - PublishValidatorPrecommit(ctx context.Context, vp model.ValidatorPrecommit) error + PublishValidatorPreCommit(ctx context.Context, vp model.ValidatorPreCommit) error PublishValidatorVotingPower(_ context.Context, vp model.ValidatorVotingPower) error } diff --git a/modules/core/message.go b/modules/core/message.go index f1aef23..3aa85ea 100644 --- a/modules/core/message.go +++ b/modules/core/message.go @@ -16,6 +16,12 @@ func (m *Module) HandleMessage(ctx context.Context, index int, msg sdk.Msg, tx * return err } - return m.broker.PublishMessage(ctx, - m.tbM.MapMessage(tx.TxHash, proto.MessageName(msg), tx.Signer, index, m.parser(m.cdc, msg), msgValue)) + return m.broker.PublishMessage(ctx, m.tbM.MapMessage( + tx.TxHash, + proto.MessageName(msg), + tx.Signer, + index, + m.parser(m.cdc, msg), + msgValue, + )) } diff --git a/modules/core/module.go b/modules/core/module.go index 85c8809..9fa037a 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -1,17 +1,16 @@ package core import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "core" + ModuleName = "core" ) var ( @@ -26,15 +25,12 @@ type Module struct { tbM tb.ToBroker broker broker cdc codec.Codec - parser MessageAddressesParser + parser MsgAddrParser } -func New(b broker, tbM tb.ToBroker, cdc codec.Codec, parser MessageAddressesParser) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - +func New(b broker, tbM tb.ToBroker, cdc codec.Codec, parser MsgAddrParser) *Module { return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, tbM: tbM, cdc: cdc, @@ -42,4 +38,4 @@ func New(b broker, tbM tb.ToBroker, cdc codec.Codec, parser MessageAddressesPars } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/distribution/block.go b/modules/distribution/block.go index cec2908..66276ac 100644 --- a/modules/distribution/block.go +++ b/modules/distribution/block.go @@ -37,7 +37,7 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { // TODO: test it if err := m.broker.PublishCommunityPool(ctx, model.CommunityPool{ Height: block.Height, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdkDec(res.Pool)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDKDec(res.Pool)), }); err != nil { return errors.Wrap(err, "publish CommunityPool error") } @@ -57,7 +57,7 @@ func (m *Module) updateParams(ctx context.Context, height int64) error { if err := m.broker.PublishDistributionParams(ctx, model.DistributionParams{ Height: height, - Params: model.DParams{ + Params: model.RawDistributionParams{ CommunityTax: res.Params.CommunityTax.MustFloat64(), BaseProposerReward: res.Params.BaseProposerReward.MustFloat64(), //nolint:staticcheck BonusProposerReward: res.Params.BonusProposerReward.MustFloat64(), //nolint:staticcheck diff --git a/modules/distribution/module.go b/modules/distribution/module.go index 3891bc3..4dd970b 100644 --- a/modules/distribution/module.go +++ b/modules/distribution/module.go @@ -1,19 +1,18 @@ package distribution import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" "github.com/bro-n-bro/spacebox-crawler/client/rpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "distribution" + ModuleName = "distribution" ) var ( @@ -33,11 +32,8 @@ type Module struct { } func New(b broker, cli *grpcClient.Client, rpcCli *rpc.Client, tbM tb.ToBroker, cdc codec.Codec) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -46,4 +42,4 @@ func New(b broker, cli *grpcClient.Client, rpcCli *rpc.Client, tbM tb.ToBroker, } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/dmn/block.go b/modules/dmn/block.go new file mode 100644 index 0000000..e7b3582 --- /dev/null +++ b/modules/dmn/block.go @@ -0,0 +1,37 @@ +package dmn + +import ( + "context" + + dmntypes "github.com/cybercongress/go-cyber/x/dmn/types" + "github.com/pkg/errors" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { + paramsResp, err := m.client.DMNQueryClient.Params( + ctx, + &dmntypes.QueryParamsRequest{}, + grpcClient.GetHeightRequestHeader(block.Height), + ) + if err != nil { + m.log.Error().Err(err).Int64("height", block.Height).Msg("error while getting params") + return err + } + + if err = m.broker.PublishDMNParams(ctx, model.DMNParams{ + Height: block.Height, + Params: model.RawDMNParams{ + MaxSlots: int64(paramsResp.Params.MaxSlots), + MaxGas: int64(paramsResp.Params.MaxGas), + FeeTTL: int64(paramsResp.Params.FeeTtl), + }, + }); err != nil { + return errors.Wrap(err, "PublishDMNParams error") + } + + return nil +} diff --git a/modules/dmn/broker.go b/modules/dmn/broker.go new file mode 100644 index 0000000..6174ad9 --- /dev/null +++ b/modules/dmn/broker.go @@ -0,0 +1,11 @@ +package dmn + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishDMNParams(ctx context.Context, mp model.DMNParams) error +} diff --git a/modules/dmn/module.go b/modules/dmn/module.go new file mode 100644 index 0000000..161b118 --- /dev/null +++ b/modules/dmn/module.go @@ -0,0 +1,37 @@ +package dmn + +import ( + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "dmn" +) + +var ( + _ types.Module = &Module{} + _ types.BlockHandler = &Module{} +) + +type Module struct { + log *zerolog.Logger + client *grpcClient.Client + broker broker + tbM tb.ToBroker +} + +func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + client: cli, + tbM: tbM, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/modules/feegrant/module.go b/modules/feegrant/module.go index 99172d5..6de5991 100644 --- a/modules/feegrant/module.go +++ b/modules/feegrant/module.go @@ -1,18 +1,17 @@ package feegrant import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "feegrant" + ModuleName = "feegrant" ) var ( @@ -29,11 +28,8 @@ type Module struct { } func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -41,4 +37,4 @@ func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec) *Mo } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/gov/block.go b/modules/gov/block.go index d6c2a8f..11b9c92 100644 --- a/modules/gov/block.go +++ b/modules/gov/block.go @@ -46,7 +46,7 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { // TODO: maybe check diff from mongo in my side? return m.broker.PublishGovParams(ctx, model.GovParams{ DepositParams: model.DepositParams{ - MinDeposit: m.tbM.MapCoins(types.NewCoinsFromCdk(respDeposit.DepositParams.MinDeposit)), + MinDeposit: m.tbM.MapCoins(types.NewCoinsFromSDK(respDeposit.DepositParams.MinDeposit)), MaxDepositPeriod: respDeposit.DepositParams.MaxDepositPeriod.Nanoseconds(), }, VotingParams: model.VotingParams{ diff --git a/modules/gov/genesis.go b/modules/gov/genesis.go index 64c3b11..a5b94a9 100644 --- a/modules/gov/genesis.go +++ b/modules/gov/genesis.go @@ -74,7 +74,7 @@ func (m *Module) publishProposals(ctx context.Context, proposals govtypesv1beta1 ProposalID: proposal.ProposalId, Height: 1, DepositorAddress: "", - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(proposal.TotalDeposit)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(proposal.TotalDeposit)), }); err != nil { return err } diff --git a/modules/gov/message.go b/modules/gov/message.go index 6fdeb2b..0008d47 100644 --- a/modules/gov/message.go +++ b/modules/gov/message.go @@ -69,7 +69,7 @@ func (m *Module) handleMsgSubmitProposal(ctx context.Context, tx *types.Tx, inde TxHash: tx.TxHash, MsgIndex: int64(index), Proposer: msg.Proposer, - InitialDeposit: m.tbM.MapCoins(types.NewCoinsFromCdk(msg.InitialDeposit)), + InitialDeposit: m.tbM.MapCoins(types.NewCoinsFromSDK(msg.InitialDeposit)), Title: content.GetTitle(), Description: content.GetDescription(), Type: content.ProposalType(), @@ -88,7 +88,7 @@ func (m *Module) handleMsgSubmitProposal(ctx context.Context, tx *types.Tx, inde ProposalID: proposalID, Height: tx.Height, DepositorAddress: msg.Proposer, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(msg.InitialDeposit)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(msg.InitialDeposit)), }); err != nil { return err } @@ -99,7 +99,7 @@ func (m *Module) handleMsgSubmitProposal(ctx context.Context, tx *types.Tx, inde ProposalID: proposalID, Height: tx.Height, DepositorAddress: msg.Proposer, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(msg.InitialDeposit)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(msg.InitialDeposit)), }, TxHash: tx.TxHash, MsgIndex: int64(index), @@ -122,7 +122,7 @@ func (m *Module) handleMsgDeposit(ctx context.Context, tx *types.Tx, index int, ProposalID: msg.ProposalId, DepositorAddress: msg.Depositor, Height: tx.Height, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(msg.Amount)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(msg.Amount)), }, TxHash: tx.TxHash, MsgIndex: int64(index), @@ -156,7 +156,7 @@ func (m *Module) handleMsgDeposit(ctx context.Context, tx *types.Tx, index int, ProposalID: msg.ProposalId, DepositorAddress: msg.Depositor, Height: tx.Height, - Coins: m.tbM.MapCoins(types.NewCoinsFromCdk(res.Deposit.Amount)), + Coins: m.tbM.MapCoins(types.NewCoinsFromSDK(res.Deposit.Amount)), }); err != nil { return err } diff --git a/modules/gov/module.go b/modules/gov/module.go index 61aa505..a440eff 100644 --- a/modules/gov/module.go +++ b/modules/gov/module.go @@ -1,18 +1,17 @@ package bank import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "gov" + ModuleName = "gov" ) var ( @@ -40,11 +39,8 @@ type ( ) func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - m := &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -54,8 +50,12 @@ func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec) *Mo return m } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } -func (m *Module) SetTallyCache(cache TallyCache[uint64, int64]) { - m.tallyCache = cache +func (m *Module) WithTallyCache(cache TallyCache[uint64, int64]) *Module { + if cache != nil { + m.tallyCache = cache + } + + return m } diff --git a/modules/gov/utils.go b/modules/gov/utils.go index ea06fec..505d965 100644 --- a/modules/gov/utils.go +++ b/modules/gov/utils.go @@ -91,9 +91,8 @@ func (m *Module) getAndPublishTallyResult(ctx context.Context, proposalID uint64 m.log.Warn().Uint64("proposal_id", proposalID).Msg("tally result not found") return nil } - m.log.Error(). + m.log.Error().Err(err). Str("handler", "HandleEndBlocker"). - Err(err). Msg("failed to get proposal tally result") return err diff --git a/modules/graph/broker.go b/modules/graph/broker.go new file mode 100644 index 0000000..6f36e35 --- /dev/null +++ b/modules/graph/broker.go @@ -0,0 +1,13 @@ +package graph + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishCyberlink(context.Context, model.Cyberlink) error + PublishCyberlinkMessage(context.Context, model.CyberlinkMessage) error + PublishParticle(context.Context, model.Particle) error +} diff --git a/modules/graph/message.go b/modules/graph/message.go new file mode 100644 index 0000000..7359c87 --- /dev/null +++ b/modules/graph/message.go @@ -0,0 +1,66 @@ +package graph + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + graph "github.com/cybercongress/go-cyber/x/graph/types" + "github.com/pkg/errors" + + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +const ( + msgErrorPublishingCyberLinkMessage = "error while publishing cyber_link message" + msgErrorPublishingCyberLink = "error while publishing cyber_link" + msgErrorPublishingParticle = "error while publishing particle" +) + +func (m *Module) HandleMessage(ctx context.Context, index int, bostromMsg sdk.Msg, tx *types.Tx) error { + if len(tx.Logs) == 0 { + return nil + } + + switch msg := bostromMsg.(type) { //nolint:gocritic + case *graph.MsgCyberlink: + for i, link := range msg.Links { + if err := m.broker.PublishCyberlinkMessage(ctx, model.CyberlinkMessage{ + ParticleFrom: link.From, // + ParticleTo: link.To, // + Neuron: msg.Neuron, // + TxHash: tx.TxHash, // + Height: tx.Height, // + MsgIndex: int64(index), // + LinkIndex: int64(i), // + }); err != nil { + return errors.Wrap(err, msgErrorPublishingCyberLinkMessage) + } + + if err := m.broker.PublishCyberlink(ctx, model.Cyberlink{ + ParticleFrom: link.From, // + ParticleTo: link.To, // + Neuron: msg.Neuron, // + TxHash: tx.TxHash, // + Height: tx.Height, // + Timestamp: tx.Timestamp, // + }); err != nil { + return errors.Wrap(err, msgErrorPublishingCyberLink) + } + + for _, particle := range []string{link.From, link.To} { + if err := m.broker.PublishParticle(ctx, model.Particle{ + Particle: particle, // + Neuron: msg.Neuron, // + Timestamp: tx.Timestamp, // + TxHash: tx.TxHash, // + Height: tx.Height, // + }); err != nil { + return errors.Wrap(err, msgErrorPublishingParticle) + } + } + } + } + + return nil +} diff --git a/modules/graph/module.go b/modules/graph/module.go new file mode 100644 index 0000000..773cf51 --- /dev/null +++ b/modules/graph/module.go @@ -0,0 +1,42 @@ +package graph + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "graph" +) + +var ( + _ types.Module = &Module{} + _ types.MessageHandler = &Module{} +) + +type ( + Module struct { + log *zerolog.Logger + broker broker + tbM tb.ToBroker + cdc codec.Codec + cli *grpcClient.Client + } +) + +func New(b broker, tbM tb.ToBroker, cdc codec.Codec, cli *grpcClient.Client) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + tbM: tbM, + cdc: cdc, + cli: cli, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/modules/grid/block.go b/modules/grid/block.go new file mode 100644 index 0000000..4d2b3d6 --- /dev/null +++ b/modules/grid/block.go @@ -0,0 +1,35 @@ +package grid + +import ( + "context" + + gridtypes "github.com/cybercongress/go-cyber/x/grid/types" + "github.com/pkg/errors" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { + paramsResp, err := m.client.GridQueryClient.Params( + ctx, + &gridtypes.QueryParamsRequest{}, + grpcClient.GetHeightRequestHeader(block.Height), + ) + if err != nil { + m.log.Error().Err(err).Int64("height", block.Height).Msg("error while getting params") + return err + } + + if err = m.broker.PublishGridParams(ctx, model.GridParams{ + Height: block.Height, + Params: model.RawGridParams{ + MaxRoutes: int64(paramsResp.Params.MaxRoutes), + }, + }); err != nil { + return errors.Wrap(err, "PublishGridParams error") + } + + return nil +} diff --git a/modules/grid/broker.go b/modules/grid/broker.go new file mode 100644 index 0000000..616b5ec --- /dev/null +++ b/modules/grid/broker.go @@ -0,0 +1,16 @@ +package grid + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishGridParams(context.Context, model.GridParams) error + PublishRoute(context.Context, model.Route) error + PublishCreateRouteMessage(context.Context, model.CreateRouteMessage) error + PublishEditRouteMessage(context.Context, model.EditRouteMessage) error + PublishEditRouteNameMessage(context.Context, model.EditRouteNameMessage) error + PublishDeleteRouteMessage(context.Context, model.DeleteRouteMessage) error +} diff --git a/modules/grid/message.go b/modules/grid/message.go new file mode 100644 index 0000000..78745c5 --- /dev/null +++ b/modules/grid/message.go @@ -0,0 +1,135 @@ +package grid + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + grid "github.com/cybercongress/go-cyber/x/grid/types" + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +const ( + msgErrorPublishingCreateRouteMessage = "error while publishing create_route message" + msgErrorPublishingEditRouteMessage = "error while publishing edit_route message" + msgErrorPublishingEditRouteNameMessage = "error while publishing edit_route_name message" + msgErrorPublishingDeleteRouteMessage = "error while publishing delete_route message" +) + +func (m *Module) HandleMessage(ctx context.Context, index int, bostromMsg sdk.Msg, tx *types.Tx) error { + if len(tx.Logs) == 0 { + return nil + } + + switch msg := bostromMsg.(type) { + case *grid.MsgCreateRoute: + if err := m.broker.PublishCreateRouteMessage(ctx, model.CreateRouteMessage{ + Source: msg.Source, + Destination: msg.Destination, + Name: msg.Name, + TxHash: tx.TxHash, + Height: tx.Height, + MsgIndex: int64(index), + }); err != nil { + return errors.Wrap(err, msgErrorPublishingCreateRouteMessage) + } + + return m.getAndPublishRoute(ctx, tx.TxHash, msg.Source, msg.Destination, tx.Timestamp, tx.Height) + + case *grid.MsgEditRoute: + if err := m.broker.PublishEditRouteMessage(ctx, model.EditRouteMessage{ + Value: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Value)), + Source: msg.Source, + Destination: msg.Destination, + TxHash: tx.TxHash, + Height: tx.Height, + MsgIndex: int64(index), + }); err != nil { + return errors.Wrap(err, msgErrorPublishingEditRouteMessage) + } + + return m.getAndPublishRoute(ctx, tx.TxHash, msg.Source, msg.Destination, tx.Timestamp, tx.Height) + + case *grid.MsgEditRouteName: + if err := m.broker.PublishEditRouteNameMessage(ctx, model.EditRouteNameMessage{ + Source: msg.Source, + Destination: msg.Destination, + Name: msg.Name, + TxHash: tx.TxHash, + Height: tx.Height, + MsgIndex: int64(index), + }); err != nil { + return errors.Wrap(err, msgErrorPublishingEditRouteNameMessage) + } + + return m.getAndPublishRoute(ctx, tx.TxHash, msg.Source, msg.Destination, tx.Timestamp, tx.Height) + + case *grid.MsgDeleteRoute: + if err := m.broker.PublishDeleteRouteMessage(ctx, model.DeleteRouteMessage{ + Source: msg.Source, + Destination: msg.Destination, + TxHash: tx.TxHash, + Height: tx.Height, + MsgIndex: int64(index), + }); err != nil { + return errors.Wrap(err, msgErrorPublishingDeleteRouteMessage) + } + + return m.getAndPublishRoute(ctx, tx.TxHash, msg.Source, msg.Destination, tx.Timestamp, tx.Height) + } + + return nil +} + +func (m *Module) getAndPublishRoute(ctx context.Context, tx, source, destination, ts string, height int64) error { + var ( + key = source + "-" + destination + isActive = true + value model.Coins + alias string + ) + + // publish only newest heights + if m.routeCache != nil && !m.routeCache.UpdateCacheValue(key, height) { + return nil + } + + route, err := m.client.GridQueryClient.Route(ctx, &grid.QueryRouteRequest{ + Source: source, + Destination: destination, + }) + + if err != nil { + if s, ok := status.FromError(err); !ok || s.Code() != codes.NotFound { + m.log.Error().Err(err). + Str("source", source). + Str("destination", destination). + Msg("error while getting route") + + return err + } + + isActive = false + } + + // case when route is not found + if route != nil { + value = m.tbM.MapCoins(types.NewCoinsFromSDK(route.Route.Value)) + alias = route.Route.Name + } + + return m.broker.PublishRoute(ctx, model.Route{ + Value: value, + Source: source, + Destination: destination, + Alias: alias, + Timestamp: ts, + TxHash: tx, + Height: height, + IsActive: isActive, + }) +} diff --git a/modules/grid/module.go b/modules/grid/module.go new file mode 100644 index 0000000..e1048f2 --- /dev/null +++ b/modules/grid/module.go @@ -0,0 +1,51 @@ +package grid + +import ( + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "grid" +) + +var ( + _ types.Module = &Module{} + _ types.BlockHandler = &Module{} + _ types.MessageHandler = &Module{} +) + +type ( + RouteCache[K, V comparable] interface{ UpdateCacheValue(K, V) bool } + + Module struct { + log *zerolog.Logger + client *grpcClient.Client + broker broker + tbM tb.ToBroker + routeCache RouteCache[string, int64] + } +) + +func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + client: cli, + tbM: tbM, + } +} + +func (m *Module) Name() string { return ModuleName } + +func (m *Module) WithCache(cache RouteCache[string, int64]) *Module { + if cache != nil { + m.routeCache = cache + } + + return m +} diff --git a/modules/ibc/message.go b/modules/ibc/message.go index a6026f4..0e5f4a8 100644 --- a/modules/ibc/message.go +++ b/modules/ibc/message.go @@ -33,7 +33,7 @@ func (m *Module) HandleMessageRecursive( case *ibctransfertypes.MsgTransfer: return nil, m.broker.PublishTransferMessage(ctx, model.TransferMessage{ SourceChannel: msg.SourceChannel, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Token)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Token)), Sender: msg.Sender, Receiver: msg.Receiver, Height: tx.Height, @@ -79,8 +79,7 @@ func (m *Module) HandleMessageRecursive( if err := m.cdc.Unmarshal(hostData.Data, &cosmosTx); err != nil { // skip unsupported messages if strings.HasPrefix(err.Error(), "no concrete type registered for type URL") { - m.log.Warn().Err(err).Msgf("error while unpacking message: %s", err) - + m.log.Warn().Err(err).Msg("error while unpacking message") return nil, nil } diff --git a/modules/ibc/module.go b/modules/ibc/module.go index 0b9d768..286fc2e 100644 --- a/modules/ibc/module.go +++ b/modules/ibc/module.go @@ -1,19 +1,19 @@ package ibc import ( - "os" "sync" "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "ibc" + ModuleName = "ibc" ) var ( @@ -39,11 +39,8 @@ type ( ) func New(b broker, tbM tb.ToBroker, client *grpcClient.Client, cdc codec.Codec) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, tbM: tbM, client: client, @@ -52,4 +49,4 @@ func New(b broker, tbM tb.ToBroker, client *grpcClient.Client, cdc codec.Codec) } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/liquidity/message.go b/modules/liquidity/message.go index c6d875e..c084342 100644 --- a/modules/liquidity/message.go +++ b/modules/liquidity/message.go @@ -80,18 +80,16 @@ func (m *Module) parseReverseCoins( return } - resp, err := m.client.BankQueryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ - Address: address, - }) + resp, err := m.client.BankQueryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{Address: address}) if err != nil { return } var coins model.Coins if len(resp.Balances) != 2 { // not found balances for this address - coins = model.Coins{{Denom: denoms[0]}, {Denom: denoms[1]}} + coins = model.Coins{{Denom: denoms[0]}, {Denom: denoms[1]}} //nolint:typecheck } else { - coins = m.tbM.MapCoins(types.NewCoinsFromCdk(resp.Balances)) + coins = m.tbM.MapCoins(types.NewCoinsFromSDK(resp.Balances)) } coinA = coins[0] diff --git a/modules/liquidity/module.go b/modules/liquidity/module.go index 07ae635..0efa95b 100644 --- a/modules/liquidity/module.go +++ b/modules/liquidity/module.go @@ -1,17 +1,16 @@ package liquidity import ( - "os" - "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "liquidity" + ModuleName = "liquidity" ) var ( @@ -29,11 +28,8 @@ type ( ) func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - m := &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -42,4 +38,4 @@ func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { return m } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/loader.go b/modules/loader.go new file mode 100644 index 0000000..05dc005 --- /dev/null +++ b/modules/loader.go @@ -0,0 +1,42 @@ +package modules + +import ( + "github.com/rs/zerolog" + + "github.com/bro-n-bro/spacebox-crawler/types" +) + +type ( + ModuleLoader struct { + logger *zerolog.Logger + modules []types.Module + } +) + +func NewModuleLoader() *ModuleLoader { + return &ModuleLoader{ + modules: make([]types.Module, 0), + } +} + +func (m *ModuleLoader) Len() int { return len(m.modules) } + +func (m *ModuleLoader) WithLogger(log *zerolog.Logger) *ModuleLoader { + m.logger = log + return m +} + +func (m *ModuleLoader) Add(mod types.Module) { + m.modules = append(m.modules, mod) + if m.logger != nil { + m.logger.Info().Str("name", mod.Name()).Msg("module registered") + } +} + +func (m *ModuleLoader) Build() []types.Module { + if m.logger != nil { + m.logger.Info().Int("count", m.Len()).Msg("all modules registered") + } + + return m.modules +} diff --git a/modules/mint/block.go b/modules/mint/block.go index d4c0c2d..b133e2b 100644 --- a/modules/mint/block.go +++ b/modules/mint/block.go @@ -40,7 +40,7 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { // TODO: test it if err = m.broker.PublishMintParams(ctx, model.MintParams{ Height: block.Height, - Params: model.MParams{ + Params: model.RawMintParams{ MintDenom: paramsResp.Params.MintDenom, InflationRateChange: paramsResp.Params.InflationRateChange.MustFloat64(), InflationMax: paramsResp.Params.InflationMax.MustFloat64(), diff --git a/modules/mint/module.go b/modules/mint/module.go index b32d4f9..c99d3e8 100644 --- a/modules/mint/module.go +++ b/modules/mint/module.go @@ -1,17 +1,16 @@ package mint import ( - "os" - "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "mint" + ModuleName = "mint" ) var ( @@ -27,15 +26,12 @@ type Module struct { } func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/module.go b/modules/module.go index 507caf0..dd46236 100644 --- a/modules/module.go +++ b/modules/module.go @@ -9,87 +9,117 @@ import ( "github.com/bro-n-bro/spacebox-crawler/internal/rep" authModule "github.com/bro-n-bro/spacebox-crawler/modules/auth" authzModule "github.com/bro-n-bro/spacebox-crawler/modules/authz" + bandwidthModule "github.com/bro-n-bro/spacebox-crawler/modules/bandwidth" bankModule "github.com/bro-n-bro/spacebox-crawler/modules/bank" coreModule "github.com/bro-n-bro/spacebox-crawler/modules/core" distributionModule "github.com/bro-n-bro/spacebox-crawler/modules/distribution" - feegrantModule "github.com/bro-n-bro/spacebox-crawler/modules/feegrant" + dmnModule "github.com/bro-n-bro/spacebox-crawler/modules/dmn" + feeGrantModule "github.com/bro-n-bro/spacebox-crawler/modules/feegrant" govModule "github.com/bro-n-bro/spacebox-crawler/modules/gov" + graphModule "github.com/bro-n-bro/spacebox-crawler/modules/graph" + gridModule "github.com/bro-n-bro/spacebox-crawler/modules/grid" ibcModule "github.com/bro-n-bro/spacebox-crawler/modules/ibc" liquidityModule "github.com/bro-n-bro/spacebox-crawler/modules/liquidity" mintModule "github.com/bro-n-bro/spacebox-crawler/modules/mint" + rankModule "github.com/bro-n-bro/spacebox-crawler/modules/rank" + resourcesModule "github.com/bro-n-bro/spacebox-crawler/modules/resources" slashingModule "github.com/bro-n-bro/spacebox-crawler/modules/slashing" stakingModule "github.com/bro-n-bro/spacebox-crawler/modules/staking" + wasmModule "github.com/bro-n-bro/spacebox-crawler/modules/wasm" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) -type Cache[K, V comparable] interface { - UpdateCacheValue(K, V) bool -} +type ( + Cache[K, V comparable] interface{ UpdateCacheValue(K, V) bool } + + tallyCache Cache[uint64, int64] + accountCache Cache[string, int64] + routeCache Cache[string, int64] +) -func BuildModules(b rep.Broker, log *zerolog.Logger, cli *grpcClient.Client, rpcCli *rpc.Client, tbMapper tb.ToBroker, - cdc codec.Codec, modules []string, addressesParser coreModule.MessageAddressesParser, defaultDenom string, - tallyCache Cache[uint64, int64], accountCache Cache[string, int64]) []types.Module { +//nolint:gocyclo +func BuildModules( + log *zerolog.Logger, + mds []string, + den string, + cli *grpcClient.Client, + rpc *rpc.Client, + brk rep.Broker, + cdc codec.Codec, + tbm tb.ToBroker, + aParse coreModule.MsgAddrParser, + tCache tallyCache, + aCache accountCache, + rCache routeCache, +) []types.Module { - res := make([]types.Module, 0) + mods := NewModuleLoader().WithLogger(log) - for _, m := range modules { - // TODO: make better - switch m { - case "auth": - log.Info().Msg("auth module registered") - auth := authModule.New(b, cli, tbMapper, cdc, addressesParser) - if accountCache != nil { - auth.SetAccountCache(accountCache) - } - res = append(res, auth) - case "bank": - log.Info().Msg("bank module registered") - res = append(res, bankModule.New(b, cli, tbMapper, cdc, addressesParser)) - case "gov": - gov := govModule.New(b, cli, tbMapper, cdc) - if tallyCache != nil { - gov.SetTallyCache(tallyCache) - } - log.Info().Msg("gov module registered") - res = append(res, gov) - case "mint": - log.Info().Msg("mint module registered") - res = append(res, mintModule.New(b, cli, tbMapper)) - case "staking": - staking := stakingModule.New(b, cli, tbMapper, cdc, modules, defaultDenom) - if accountCache != nil { - staking.SetAccountCache(accountCache) - } - log.Info().Msg("staking module registered") - res = append(res, staking) - case "distribution": - log.Info().Msg("distribution module registered") - res = append(res, distributionModule.New(b, cli, rpcCli, tbMapper, cdc)) - case "core": - log.Info().Msg("core module registered") - res = append(res, coreModule.New(b, tbMapper, cdc, addressesParser)) - case "authz": - log.Info().Msg("authz module registered") - res = append(res, authzModule.New(b, cli, tbMapper, cdc)) - case "feegrant": - log.Info().Msg("feegrant module registered") - res = append(res, feegrantModule.New(b, cli, tbMapper, cdc)) - case "slashing": - log.Info().Msg("slashing module registered") - res = append(res, slashingModule.New(b, cli, tbMapper)) - case "ibc": - log.Info().Msg("ibc module registered") - res = append(res, ibcModule.New(b, tbMapper, cli, cdc)) - case "liquidity": - log.Info().Msg("liquidity module registered") - res = append(res, liquidityModule.New(b, cli, tbMapper)) + for _, mod := range mds { + switch mod { + case authModule.ModuleName: + auth := authModule.New(brk, cli, tbm, cdc, aParse).WithAccountCache(aCache) + mods.Add(auth) + case bankModule.ModuleName: + bank := bankModule.New(brk, cli, tbm, cdc, aParse) + mods.Add(bank) + case govModule.ModuleName: + gov := govModule.New(brk, cli, tbm, cdc).WithTallyCache(tCache) + mods.Add(gov) + case mintModule.ModuleName: + mint := mintModule.New(brk, cli, tbm) + mods.Add(mint) + case stakingModule.ModuleName: + staking := stakingModule.New(brk, cli, tbm, cdc, mds, den).WithAccountCache(aCache) + mods.Add(staking) + case distributionModule.ModuleName: + distribution := distributionModule.New(brk, cli, rpc, tbm, cdc) + mods.Add(distribution) + case coreModule.ModuleName: + core := coreModule.New(brk, tbm, cdc, aParse) + mods.Add(core) + case authzModule.ModuleName: + authz := authzModule.New(brk, cli, tbm, cdc) + mods.Add(authz) + case feeGrantModule.ModuleName: + feeGrant := feeGrantModule.New(brk, cli, tbm, cdc) + mods.Add(feeGrant) + case slashingModule.ModuleName: + slashing := slashingModule.New(brk, cli, tbm) + mods.Add(slashing) + case ibcModule.ModuleName: + ibc := ibcModule.New(brk, tbm, cli, cdc) + mods.Add(ibc) + case liquidityModule.ModuleName: + liquidity := liquidityModule.New(brk, cli, tbm) + mods.Add(liquidity) + case graphModule.ModuleName: + graph := graphModule.New(brk, tbm, cdc, cli) + mods.Add(graph) + case bandwidthModule.ModuleName: + bandwidth := bandwidthModule.New(brk, cli, tbm) + mods.Add(bandwidth) + case dmnModule.ModuleName: + dmn := dmnModule.New(brk, cli, tbm) + mods.Add(dmn) + case gridModule.ModuleName: + grid := gridModule.New(brk, cli, tbm).WithCache(rCache) + mods.Add(grid) + case rankModule.ModuleName: + rank := rankModule.New(brk, cli, tbm) + mods.Add(rank) + case resourcesModule.ModuleName: + resources := resourcesModule.New(brk, cli, tbm) + mods.Add(resources) + case wasmModule.ModuleName: + wasm := wasmModule.New(brk, cdc) + mods.Add(wasm) default: - // TODO: log - log.Warn().Msgf("unknown module: %v", m) + log.Warn().Str("name", mod).Msg("unknown module") continue } } - return res + return mods.Build() } diff --git a/modules/rank/block.go b/modules/rank/block.go new file mode 100644 index 0000000..b54f9a5 --- /dev/null +++ b/modules/rank/block.go @@ -0,0 +1,37 @@ +package rank + +import ( + "context" + + ranktypes "github.com/cybercongress/go-cyber/x/rank/types" + "github.com/pkg/errors" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { + paramsResp, err := m.client.RankQueryClient.Params( + ctx, + &ranktypes.QueryParamsRequest{}, + grpcClient.GetHeightRequestHeader(block.Height), + ) + if err != nil { + m.log.Error().Err(err).Int64("height", block.Height).Msg("error while getting params") + return err + } + + if err = m.broker.PublishRankParams(ctx, model.RankParams{ + Height: block.Height, + Params: model.RawRankParams{ + CalculationPeriod: paramsResp.Params.CalculationPeriod, + DampingFactor: paramsResp.Params.DampingFactor.MustFloat64(), + Tolerance: paramsResp.Params.Tolerance.MustFloat64(), + }, + }); err != nil { + return errors.Wrap(err, "PublishRankParams error") + } + + return nil +} diff --git a/modules/rank/broker.go b/modules/rank/broker.go new file mode 100644 index 0000000..4d74fc1 --- /dev/null +++ b/modules/rank/broker.go @@ -0,0 +1,11 @@ +package rank + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishRankParams(ctx context.Context, mp model.RankParams) error +} diff --git a/modules/rank/module.go b/modules/rank/module.go new file mode 100644 index 0000000..d8fb6d8 --- /dev/null +++ b/modules/rank/module.go @@ -0,0 +1,37 @@ +package rank + +import ( + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "rank" +) + +var ( + _ types.Module = &Module{} + _ types.BlockHandler = &Module{} +) + +type Module struct { + log *zerolog.Logger + client *grpcClient.Client + broker broker + tbM tb.ToBroker +} + +func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + client: cli, + tbM: tbM, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/modules/resources/broker.go b/modules/resources/broker.go new file mode 100644 index 0000000..f217644 --- /dev/null +++ b/modules/resources/broker.go @@ -0,0 +1,11 @@ +package resources + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishInvestmintMessage(ctx context.Context, mp model.InvestmintMessage) error +} diff --git a/modules/resources/message.go b/modules/resources/message.go new file mode 100644 index 0000000..369815a --- /dev/null +++ b/modules/resources/message.go @@ -0,0 +1,39 @@ +package resources + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + resources "github.com/cybercongress/go-cyber/x/resources/types" + "github.com/pkg/errors" + + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +const ( + msgErrorPublishingInvestmintMessage = "error while publishing investmint_message message" +) + +func (m *Module) HandleMessage(ctx context.Context, index int, bostromMsg sdk.Msg, tx *types.Tx) error { + if len(tx.Logs) == 0 { + return nil + } + + switch msg := bostromMsg.(type) { //nolint:gocritic + case *resources.MsgInvestmint: + if err := m.broker.PublishInvestmintMessage(ctx, model.InvestmintMessage{ + Amount: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Amount)), + Neuron: msg.Neuron, + Resource: msg.Resource, + Length: msg.Length, + TxHash: tx.TxHash, + Height: tx.Height, + MsgIndex: int64(index), + }); err != nil { + return errors.Wrap(err, msgErrorPublishingInvestmintMessage) + } + } + + return nil +} diff --git a/modules/resources/module.go b/modules/resources/module.go new file mode 100644 index 0000000..b40f186 --- /dev/null +++ b/modules/resources/module.go @@ -0,0 +1,37 @@ +package resources + +import ( + "github.com/rs/zerolog" + + grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "resources" +) + +var ( + _ types.Module = &Module{} + _ types.MessageHandler = &Module{} +) + +type Module struct { + log *zerolog.Logger + client *grpcClient.Client + broker broker + tbM tb.ToBroker +} + +func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + client: cli, + tbM: tbM, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/modules/slashing/begin_blocker.go b/modules/slashing/begin_blocker.go index cc96524..fe57cac 100644 --- a/modules/slashing/begin_blocker.go +++ b/modules/slashing/begin_blocker.go @@ -17,7 +17,7 @@ import ( ) var ( - errCantFindBurnedCoin = errors.New("cant find burned tokens") + errCantFindBurnedCoin = errors.New("can't find burned tokens") base64KeyAddress = base64.StdEncoding.EncodeToString([]byte(slashingtypes.AttributeKeyAddress)) base64KeyPower = base64.StdEncoding.EncodeToString([]byte(slashingtypes.AttributeKeyPower)) diff --git a/modules/slashing/block.go b/modules/slashing/block.go index 93757a8..9b15f8c 100644 --- a/modules/slashing/block.go +++ b/modules/slashing/block.go @@ -23,7 +23,7 @@ func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error { if err = m.broker.PublishSlashingParams(ctx, model.SlashingParams{ Height: block.Height, - Params: model.SlParams{ + Params: model.RawSlashingParams{ DowntimeJailDuration: paramsResp.Params.DowntimeJailDuration, SignedBlocksWindow: paramsResp.Params.SignedBlocksWindow, MinSignedPerWindow: paramsResp.Params.MinSignedPerWindow.MustFloat64(), diff --git a/modules/slashing/module.go b/modules/slashing/module.go index 6c0be46..9712ac0 100644 --- a/modules/slashing/module.go +++ b/modules/slashing/module.go @@ -1,17 +1,16 @@ package slashing import ( - "os" - "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "slashing" + ModuleName = "slashing" ) var ( @@ -29,15 +28,12 @@ type Module struct { } func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), client: cli, tbM: tbM, broker: b, } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } diff --git a/modules/staking/block.go b/modules/staking/block.go index 776ffee..b18e25c 100644 --- a/modules/staking/block.go +++ b/modules/staking/block.go @@ -59,7 +59,7 @@ func (m *Module) updateParams(ctx context.Context, height int64) error { // TODO: maybe check diff from mongo in my side? if err = m.broker.PublishStakingParams(ctx, model.StakingParams{ Height: height, - Params: model.SParams{ + Params: model.RawStakingParams{ UnbondingTime: res.Params.UnbondingTime, MaxValidators: uint64(res.Params.MaxValidators), MaxEntries: uint64(res.Params.MaxEntries), diff --git a/modules/staking/genesis.go b/modules/staking/genesis.go index 96d5c25..88e2b66 100644 --- a/modules/staking/genesis.go +++ b/modules/staking/genesis.go @@ -115,7 +115,7 @@ func (m *Module) publishParams(ctx context.Context, height int64, params staking // TODO: test it return m.broker.PublishStakingParams(ctx, model.StakingParams{ Height: height, - Params: model.SParams{ + Params: model.RawStakingParams{ UnbondingTime: params.UnbondingTime, MaxValidators: uint64(params.MaxValidators), MaxEntries: uint64(params.MaxEntries), @@ -175,7 +175,7 @@ func (m *Module) publishDelegations( DelegatorAddress: del.DelegatorAddress, Height: doc.InitialHeight, Coin: m.tbM.MapCoin( - types.NewCoinFromCdk(sdk.NewCoin(genState.Params.BondDenom, delegationAmount))), + types.NewCoinFromSDK(sdk.NewCoin(genState.Params.BondDenom, delegationAmount))), }); err != nil { return err } @@ -195,7 +195,7 @@ func (m *Module) publishUnbondingDelegations(ctx context.Context, doc *cometbftt valUD := findUnbondingDelegations(genState.UnbondingDelegations, validator.OperatorAddress) for _, ud := range valUD { for _, entry := range ud.Entries { - coin = types.NewCoinFromCdk(sdk.NewCoin(genState.Params.BondDenom, entry.InitialBalance)) + coin = types.NewCoinFromSDK(sdk.NewCoin(genState.Params.BondDenom, entry.InitialBalance)) // TODO: test it if err := m.broker.PublishUnbondingDelegation(ctx, model.UnbondingDelegation{ Height: doc.InitialHeight, @@ -227,7 +227,7 @@ func (m *Module) publishRedelegations(ctx context.Context, doc *cometbfttypes.Ge SrcValidatorAddress: genRedelegation.ValidatorSrcAddress, DstValidatorAddress: genRedelegation.ValidatorDstAddress, Coin: m.tbM.MapCoin( - types.NewCoinFromCdk(sdk.NewCoin(genState.Params.BondDenom, entry.InitialBalance))), + types.NewCoinFromSDK(sdk.NewCoin(genState.Params.BondDenom, entry.InitialBalance))), CompletionTime: entry.CompletionTime, }); err != nil { return err diff --git a/modules/staking/message.go b/modules/staking/message.go index ef60073..078710b 100644 --- a/modules/staking/message.go +++ b/modules/staking/message.go @@ -117,7 +117,7 @@ func (m *Module) handleMsgCreateValidator( OperatorAddress: msg.ValidatorAddress, DelegatorAddress: msg.DelegatorAddress, Height: height, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Value)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Value)), }); err != nil { return err } @@ -214,7 +214,7 @@ Publish: DelegatorAddress: msg.DelegatorAddress, SrcValidatorAddress: msg.ValidatorSrcAddress, DstValidatorAddress: msg.ValidatorDstAddress, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Amount)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Amount)), CompletionTime: completionTime, }); err != nil { return err @@ -226,7 +226,7 @@ Publish: DelegatorAddress: msg.DelegatorAddress, SrcValidatorAddress: msg.ValidatorSrcAddress, DstValidatorAddress: msg.ValidatorDstAddress, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Amount)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Amount)), CompletionTime: completionTime, }, TxHash: tx.TxHash, @@ -290,7 +290,7 @@ PublishMessage: Height: tx.Height, DelegatorAddress: msg.DelegatorAddress, OperatorAddress: msg.ValidatorAddress, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Amount)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Amount)), CompletionTime: completionTime, }, TxHash: tx.TxHash, @@ -309,7 +309,7 @@ func (m *Module) handleMsgDelegate(ctx context.Context, tx *types.Tx, msg *staki Delegation: model.Delegation{ OperatorAddress: msg.ValidatorAddress, DelegatorAddress: msg.DelegatorAddress, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(msg.Amount)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(msg.Amount)), Height: tx.Height, }, TxHash: tx.TxHash, @@ -392,7 +392,7 @@ func (m *Module) updateDelegations(ctx context.Context, height int64, delegator, OperatorAddress: delegation.Delegation.ValidatorAddress, DelegatorAddress: delegation.Delegation.DelegatorAddress, Height: height, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(delegation.Balance)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(delegation.Balance)), }); err != nil { return err } @@ -435,7 +435,7 @@ func (m *Module) updateOrDisableDelegation(ctx context.Context, delegatorAddr, o OperatorAddress: operatorAddr, DelegatorAddress: delegatorAddr, Height: height, - Coin: m.tbM.MapCoin(types.NewCoinFromCdk(respPb.DelegationResponse.Balance)), + Coin: m.tbM.MapCoin(types.NewCoinFromSDK(respPb.DelegationResponse.Balance)), }); err != nil { return err } diff --git a/modules/staking/module.go b/modules/staking/module.go index e8d2159..590f6dc 100644 --- a/modules/staking/module.go +++ b/modules/staking/module.go @@ -1,18 +1,17 @@ package staking import ( - "os" - "github.com/cosmos/cosmos-sdk/codec" "github.com/rs/zerolog" grpcClient "github.com/bro-n-bro/spacebox-crawler/client/grpc" + "github.com/bro-n-bro/spacebox-crawler/modules/utils" tb "github.com/bro-n-bro/spacebox-crawler/pkg/mapper/to_broker" "github.com/bro-n-bro/spacebox-crawler/types" ) const ( - moduleName = "staking" + ModuleName = "staking" ) var ( @@ -41,11 +40,8 @@ type ( ) func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec, modules []string, defaultDenom string) *Module { - l := zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp(). - Str("module", moduleName).Logger() - return &Module{ - log: &l, + log: utils.NewModuleLogger(ModuleName), broker: b, client: cli, tbM: tbM, @@ -55,8 +51,12 @@ func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec, mod } } -func (m *Module) Name() string { return moduleName } +func (m *Module) Name() string { return ModuleName } + +func (m *Module) WithAccountCache(cache AccountCache[string, int64]) *Module { + if cache != nil { + m.accCache = cache + } -func (m *Module) SetAccountCache(cache AccountCache[string, int64]) { - m.accCache = cache + return m } diff --git a/modules/utils/utils.go b/modules/utils/utils.go index 35ba69e..619d6fa 100644 --- a/modules/utils/utils.go +++ b/modules/utils/utils.go @@ -2,7 +2,9 @@ package utils import ( "encoding/base64" + "os" + "github.com/rs/zerolog" "golang.org/x/exp/constraints" ) @@ -24,3 +26,13 @@ func DecodeToString(v string) (string, error) { return string(val), nil } +func NewModuleLogger(name string) *zerolog.Logger { + logger := zerolog. + New(os.Stderr). + Output(zerolog.ConsoleWriter{Out: os.Stderr}). + With().Timestamp(). + Str("module", name). + Logger() + + return &logger +} diff --git a/modules/wasm/broker.go b/modules/wasm/broker.go new file mode 100644 index 0000000..26363c5 --- /dev/null +++ b/modules/wasm/broker.go @@ -0,0 +1,12 @@ +package wasm + +import ( + "context" + + "github.com/bro-n-bro/spacebox/broker/model" +) + +type broker interface { + PublishCyberlink(context.Context, model.Cyberlink) error + PublishParticle(context.Context, model.Particle) error +} diff --git a/modules/wasm/message.go b/modules/wasm/message.go new file mode 100644 index 0000000..113fd4b --- /dev/null +++ b/modules/wasm/message.go @@ -0,0 +1,270 @@ +package wasm + +import ( + "context" + "slices" + + wasm "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" + graph "github.com/cybercongress/go-cyber/x/graph/types" + jsoniter "github.com/json-iterator/go" + "github.com/pkg/errors" + + "github.com/bro-n-bro/spacebox-crawler/types" + "github.com/bro-n-bro/spacebox/broker/model" +) + +const ( + msgErrorPublishingCyberLink = "error while publishing cyber_link" + msgErrorPublishingParticle = "error while publishing particle" +) + +type clMessage struct { + CyberLink graph.MsgCyberlink `json:"cyberlink"` +} + +func (m *Module) HandleMessage(ctx context.Context, index int, bostromMsg sdk.Msg, tx *types.Tx) error { + if len(tx.Logs) == 0 { + return nil + } + + msg, ok := bostromMsg.(*wasm.MsgExecuteContract) + if !ok { + return nil + } + + // try to find links if we were able to unmarshal the message + clMsg := clMessage{} + if err := jsoniter.Unmarshal(msg.Msg, &clMsg); err == nil { + if clMsg.CyberLink.Neuron == "" { + clMsg.CyberLink.Neuron = msg.Contract + } + + if clMsg.CyberLink.Neuron != "" && len(clMsg.CyberLink.Links) > 0 { + for _, link := range clMsg.CyberLink.Links { + if err = m.broker.PublishCyberlink(ctx, model.Cyberlink{ + ParticleFrom: link.From, + ParticleTo: link.To, + Neuron: clMsg.CyberLink.Neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + }); err != nil { + return errors.Wrap(err, msgErrorPublishingCyberLink) + } + + for _, particle := range []string{link.From, link.To} { + if err = m.broker.PublishParticle(ctx, model.Particle{ + Particle: particle, + Neuron: clMsg.CyberLink.Neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + }); err != nil { + return errors.Wrap(err, msgErrorPublishingParticle) + } + } + } + + return nil + } + } + + if err := m.findAndPublishCyberLinks(ctx, tx, index); err != nil { + if errors.Is(err, types.ErrNoEventFound) || errors.Is(err, types.ErrNoAttributeFound) { + return nil + } + + return err + } + + return nil +} + +func (m *Module) findAndPublishCyberLinks(ctx context.Context, tx *types.Tx, index int) error { + event, err := tx.FindEventByType(index, graph.EventTypeCyberlink) + if err != nil { + return err + } + + links := make([]model.Cyberlink, 0, 1) + + switch { + case len(event.Attributes) <= 3: + links = append(links, m.findOneLink(event, tx)) + case event.Attributes[2].Key == graph.AttributeKeyNeuron: + slices.Grow(links, len(event.Attributes)/3) + links = append(links, m.findWithSequence(event, tx)...) + case event.Attributes[len(event.Attributes)-1].Key == graph.AttributeKeyNeuron: + slices.Grow(links, len(event.Attributes)/2) + links = append(links, m.findWithCommonNeuron(event, tx)...) + } + + for _, link := range links { + if err = m.broker.PublishCyberlink(ctx, link); err != nil { + return errors.Wrap(err, msgErrorPublishingCyberLink) + } + + for _, particle := range []string{link.ParticleFrom, link.ParticleTo} { + if err = m.broker.PublishParticle(ctx, model.Particle{ + Particle: particle, + Neuron: link.Neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + }); err != nil { + return errors.Wrap(err, msgErrorPublishingParticle) + } + } + } + + return nil +} + +func (m *Module) findOneLink(event sdk.StringEvent, tx *types.Tx) model.Cyberlink { + from, _ := tx.FindAttributeByKey(event, graph.AttributeKeyParticleFrom) + to, _ := tx.FindAttributeByKey(event, graph.AttributeKeyParticleTo) + neuron, _ := tx.FindAttributeByKey(event, graph.AttributeKeyNeuron) + + return model.Cyberlink{ + ParticleFrom: from, + ParticleTo: to, + Neuron: neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + } +} + +// { +// key: "particleFrom", +// value: "QmR8xA9EyCQhGWu9cUs4fmsZnsVGGFLfY8z1eHrbqNRQUB" +// }, +// +// { +// key: "particleTo", +// value: "QmW5GREog52duzpQbHQ2da8NCQSkL218TWW9hQzsR11bGM" +// }, +// +// { +// key: "particleFrom", +// value: "QmaoRBnpjnjcqfYyUDvQx2s7ZBtHJbycU8bEw9AWWLaQVd" +// }, +// +// { +// key: "particleTo", +// value: "QmW5GREog52duzpQbHQ2da8NCQSkL218TWW9hQzsR11bGM" +// }, +// +// { +// key: "neuron", +// value: "bostrom1jkte0pytr85qg0whmgux3vmz9ehmh82w40h8gaqeg435fnkyfxqq9qaku3" +// } +func (m *Module) findWithCommonNeuron(event sdk.StringEvent, tx *types.Tx) []model.Cyberlink { + links := make([]model.Cyberlink, 0) + + // common neuron + neuron := event.Attributes[len(event.Attributes)-1].Value + + for i := 0; i < len(event.Attributes)-1; i += 2 { + var from, to string + switch event.Attributes[i].Key { + case graph.AttributeKeyParticleFrom: + from = event.Attributes[i].Value + case graph.AttributeKeyParticleTo: + to = event.Attributes[i].Value + } + + switch event.Attributes[i+1].Key { + case graph.AttributeKeyParticleFrom: + from = event.Attributes[i+1].Value + case graph.AttributeKeyParticleTo: + to = event.Attributes[i+1].Value + } + + links = append(links, model.Cyberlink{ + ParticleFrom: from, + ParticleTo: to, + Neuron: neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + }) + } + + return links +} + +// { +// key: "particleFrom", +// value: "QmTEv3kLMPNkX3yv92ixzr17t5ayVi99Nkso3QDtKs7qta" +// }, +// +// { +// key: "particleTo", +// value: "QmQ8XsZSdNWNbu1FZpJyua8CXMQTq6dLnsHaqLtpEw8GXL" +// }, +// +// { +// key: "neuron", +// value: "bostrom1jkte0pytr85qg0whmgux3vmz9ehmh82w40h8gaqeg435fnkyfxqq9qaku3" +// }, +// +// { +// key: "particleFrom", +// value: "QmTEv3kLMPNkX3yv92ixzr17t5ayVi99Nkso3QDtKs7qta" +// }, +// +// { +// key: "particleTo", +// value: "QmQ8XsZSdNWNbu1FZpJyua8CXMQTq6dLnsHaqLtpEw8GXL" +// }, +// +// { +// key: "neuron", +// value: "bostrom1jkte0pytr85qg0whmgux3vmz9ehmh82w40h8gaqeg435fnkyfxqq9qaku3" +// } +func (m *Module) findWithSequence(event sdk.StringEvent, tx *types.Tx) []model.Cyberlink { + links := make([]model.Cyberlink, 0) + + for i := 0; i < len(event.Attributes); i += 3 { + var from, to, neuron string + switch event.Attributes[i].Key { + case graph.AttributeKeyParticleFrom: + from = event.Attributes[i].Value + case graph.AttributeKeyParticleTo: + to = event.Attributes[i].Value + case graph.AttributeKeyNeuron: + neuron = event.Attributes[i].Value + } + + switch event.Attributes[i+1].Key { + case graph.AttributeKeyParticleFrom: + from = event.Attributes[i+1].Value + case graph.AttributeKeyParticleTo: + to = event.Attributes[i+1].Value + case graph.AttributeKeyNeuron: + neuron = event.Attributes[i+1].Value + } + + switch event.Attributes[i+2].Key { + case graph.AttributeKeyParticleFrom: + from = event.Attributes[i+2].Value + case graph.AttributeKeyParticleTo: + to = event.Attributes[i+2].Value + case graph.AttributeKeyNeuron: + neuron = event.Attributes[i+2].Value + } + + links = append(links, model.Cyberlink{ + ParticleFrom: from, + ParticleTo: to, + Neuron: neuron, + Timestamp: tx.Timestamp, + TxHash: tx.TxHash, + Height: tx.Height, + }) + } + + return links +} diff --git a/modules/wasm/module.go b/modules/wasm/module.go new file mode 100644 index 0000000..b9b05d3 --- /dev/null +++ b/modules/wasm/module.go @@ -0,0 +1,36 @@ +package wasm + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/rs/zerolog" + + "github.com/bro-n-bro/spacebox-crawler/modules/utils" + "github.com/bro-n-bro/spacebox-crawler/types" +) + +const ( + ModuleName = "wasm" +) + +var ( + _ types.Module = &Module{} + _ types.MessageHandler = &Module{} +) + +type ( + Module struct { + log *zerolog.Logger + broker broker + cdc codec.Codec + } +) + +func New(b broker, cdc codec.Codec) *Module { + return &Module{ + log: utils.NewModuleLogger(ModuleName), + broker: b, + cdc: cdc, + } +} + +func (m *Module) Name() string { return ModuleName } diff --git a/pkg/keybase/client.go b/pkg/keybase/client.go index 959a328..c29ae2f 100644 --- a/pkg/keybase/client.go +++ b/pkg/keybase/client.go @@ -16,11 +16,13 @@ var ( } ) -// RLHTTPClient Rate Limited HTTP Client -type RLHTTPClient struct { - client *http.Client - Ratelimiter *rate.Limiter -} +type ( + // RLHTTPClient Rate Limited HTTP Client + RLHTTPClient struct { + client *http.Client + Ratelimiter *rate.Limiter + } +) // Do dispatches the HTTP request to the network func (c *RLHTTPClient) Do(ctx context.Context, req *http.Request) (*http.Response, error) { diff --git a/pkg/keybase/models.go b/pkg/keybase/models.go index dc545cb..43ce56a 100644 --- a/pkg/keybase/models.go +++ b/pkg/keybase/models.go @@ -6,6 +6,7 @@ type ( Status QueryStatus `json:"status"` Objects []AccountDetails `json:"them"` } + // QueryStatus contains the details of the status of a request QueryStatus struct { ErrDesc string `json:"desc"` diff --git a/pkg/mapper/to_broker/map_coins.go b/pkg/mapper/to_broker/map_coins.go index f53d710..b833f83 100644 --- a/pkg/mapper/to_broker/map_coins.go +++ b/pkg/mapper/to_broker/map_coins.go @@ -5,14 +5,14 @@ import ( "github.com/bro-n-bro/spacebox/broker/model" ) -func (tb ToBroker) MapCoin(coin types.Coin) model.Coin { +func (tb *ToBroker) MapCoin(coin types.Coin) model.Coin { return model.Coin{ Denom: coin.Denom, Amount: coin.Amount, } } -func (tb ToBroker) MapCoins(coins types.Coins) model.Coins { +func (tb *ToBroker) MapCoins(coins types.Coins) model.Coins { res := make(model.Coins, len(coins)) for i, c := range coins { res[i] = tb.MapCoin(c) diff --git a/pkg/mapper/to_broker/map_message.go b/pkg/mapper/to_broker/map_message.go index 8be34e6..9f672a3 100644 --- a/pkg/mapper/to_broker/map_message.go +++ b/pkg/mapper/to_broker/map_message.go @@ -4,7 +4,7 @@ import ( "github.com/bro-n-bro/spacebox/broker/model" ) -func (tb ToBroker) MapMessage(txHash, msgType, signer string, index int, accounts []string, value []byte) model.Message { +func (tb *ToBroker) MapMessage(txHash, msgType, signer string, index int, accounts []string, value []byte) model.Message { return model.Message{ TransactionHash: txHash, MsgIndex: int64(index), diff --git a/pkg/mapper/to_broker/map_transaction.go b/pkg/mapper/to_broker/map_transaction.go index 293800d..a657275 100644 --- a/pkg/mapper/to_broker/map_transaction.go +++ b/pkg/mapper/to_broker/map_transaction.go @@ -9,8 +9,12 @@ import ( "github.com/bro-n-bro/spacebox/broker/model" ) -func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { - signatures := make([]string, 0, len(tx.Signatures)) +func (tb *ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { + var ( + signatures = make([]string, 0, len(tx.Signatures)) + messages = make([][]byte, len(tx.Body.Messages)) + ) + for _, s := range tx.Signatures { signer, err := types.ConvertAddressToBech32String(types.BytesToAddress(s)) if err == nil { @@ -18,7 +22,6 @@ func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { } } - var msgs = make([][]byte, len(tx.Body.Messages)) for i, msg := range tx.Body.Messages { msgBytes, err := tb.cdc.MarshalJSON(msg) if err != nil { @@ -28,7 +31,8 @@ func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { return model.Transaction{}, err } } - msgs[i] = msgBytes + + messages[i] = msgBytes } logs, err := tb.amino.MarshalJSON(tx.Logs) @@ -40,7 +44,7 @@ func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { Hash: tx.TxHash, Height: tx.Height, Success: tx.Successful(), - Messages: msgs, + Messages: messages, Memo: tx.Body.Memo, Signatures: signatures, Signer: tx.Signer, @@ -60,6 +64,7 @@ func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { Sequence: info.Sequence, } } + t.SignerInfos = infos } @@ -77,7 +82,7 @@ func (tb ToBroker) MapTransaction(tx *types.Tx) (model.Transaction, error) { } t.Fee = &model.Fee{ - Coins: tb.MapCoins(types.NewCoinsFromCdk(tx.GetFee())), + Coins: tb.MapCoins(types.NewCoinsFromSDK(tx.GetFee())), GasLimit: tx.GetGas(), Granter: tx.FeeGranter().String(), Payer: payer, diff --git a/pkg/mapper/to_broker/to_broker.go b/pkg/mapper/to_broker/to_broker.go index 8f44671..850c2aa 100644 --- a/pkg/mapper/to_broker/to_broker.go +++ b/pkg/mapper/to_broker/to_broker.go @@ -2,12 +2,17 @@ package tobroker import "github.com/cosmos/cosmos-sdk/codec" -// ToBroker mapper -type ToBroker struct { - cdc codec.Codec - amino *codec.LegacyAmino -} +type ( + // ToBroker mapper + ToBroker struct { + cdc codec.Codec + amino *codec.LegacyAmino + } +) func NewToBroker(cdc codec.Codec, amino *codec.LegacyAmino) *ToBroker { - return &ToBroker{cdc: cdc, amino: amino} + return &ToBroker{ + cdc: cdc, + amino: amino, + } } diff --git a/pkg/mapper/to_storage/block.go b/pkg/mapper/to_storage/block.go index 1f196f2..94c27bd 100644 --- a/pkg/mapper/to_storage/block.go +++ b/pkg/mapper/to_storage/block.go @@ -6,7 +6,7 @@ import ( "github.com/bro-n-bro/spacebox-crawler/adapter/storage/model" ) -func (ts ToStorage) NewBlock(height int64) *model.Block { +func (ts *ToStorage) NewBlock(height int64) *model.Block { return &model.Block{ Height: height, Created: time.Now(), diff --git a/pkg/mapper/to_storage/error_message.go b/pkg/mapper/to_storage/error_message.go index 8631302..c4fd46c 100644 --- a/pkg/mapper/to_storage/error_message.go +++ b/pkg/mapper/to_storage/error_message.go @@ -6,7 +6,7 @@ import ( "github.com/bro-n-bro/spacebox-crawler/adapter/storage/model" ) -func (ts ToStorage) NewErrorMessage(height int64, errMsg string) model.Message { +func (ts *ToStorage) NewErrorMessage(height int64, errMsg string) model.Message { return model.Message{ Height: height, Created: time.Now(), diff --git a/pkg/mapper/to_storage/to_storage.go b/pkg/mapper/to_storage/to_storage.go index 2a4195e..2b4f93d 100644 --- a/pkg/mapper/to_storage/to_storage.go +++ b/pkg/mapper/to_storage/to_storage.go @@ -1,7 +1,8 @@ package tostorage -type ToStorage struct { -} +type ( + ToStorage struct{} +) func NewToStorage() *ToStorage { return &ToStorage{} diff --git a/pkg/worker/process.go b/pkg/worker/process.go index d9baa59..6977808 100644 --- a/pkg/worker/process.go +++ b/pkg/worker/process.go @@ -54,7 +54,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 defer func() { if r := recover(); r != nil { w.setErrorStatusWithLogging(ctx, height, fmt.Sprint(r)) - w.log.Error().Msgf("panic occurred! height: %d. %v", height, r) + w.log.Error().Int64("height", height).Msgf("panic occurred!\n%v", r) } }() } @@ -81,31 +81,28 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 genesis, err := w.rpcClient.Genesis(ctx) if err != nil { w.setErrorStatusWithLogging(ctx, height, err.Error()) - w.log.Error().Err(err).Msgf("get genesis error: %v", err) + w.log.Error().Err(err).Msg("get genesis error") return } - w.log.Debug(). - Int("worker_number", workerIndex). - Msgf("Get genesis dur: %v", time.Since(_genesisDur)) + w.log.Debug().Int("worker_number", workerIndex). + Dur("duration", time.Since(_genesisDur)). + Msg("get genesis") if err = w.processGenesis(ctx, genesis); err != nil { - w.log.Error().Err(err).Msgf("processHeight genesis error %v:", err) + w.log.Error().Err(err).Msg("processHeight genesis error") w.setErrorStatusWithLogging(ctx, height, err.Error()) return } if err = w.storage.SetProcessedStatus(ctx, height); err != nil { - w.log.Error(). - Err(err). - Int64(keyHeight, height). - Msgf("cant set processed status in storage %v:", err) + w.log.Error().Err(err).Int64(keyHeight, height).Msg("can't set processed status in storage") } return } - w.log.Info().Int("worker_number", workerIndex).Msgf("Parse block № %d", height) + w.log.Info().Int("worker_number", workerIndex).Int64("height", height).Msg("parse block") g, ctx2 := errgroup.WithContext(ctx) @@ -126,7 +123,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 Int("worker_number", workerIndex). Int64("block_height", height). Dur("get_block_dur", time.Since(_blockDur)). - Msg("Get block info") + Msg("get block info") return nil }) @@ -152,17 +149,18 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 if err != nil { return err } + w.log.Debug(). Int("worker_number", workerIndex). Int64("block_height", height). Dur("get_block_events_dur", time.Since(_blockEventsDur)). - Msg("Get validators info") + Msg("get validators info") return nil }) if err := g.Wait(); err != nil { - w.log.Error().Err(err).Int64(keyHeight, height).Msgf("processHeight block got error: %v", err) + w.log.Error().Int64(keyHeight, height).Err(err).Msg("processHeight block got error") w.setErrorStatusWithLogging(ctx, height, err.Error()) return } @@ -171,7 +169,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 txsRes, err := w.grpcClient.Txs(ctx, height, block.Block.Data.Txs) if err != nil { - w.log.Error().Err(err).Msgf("get txs error: %v", err) + w.log.Error().Err(err).Msg("get txs error") w.setErrorStatusWithLogging(ctx, height, err.Error()) return } @@ -222,20 +220,20 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6 } if err := w.storage.SetProcessedStatus(ctx, height); err != nil { - w.log.Error().Err(err).Int64(keyHeight, height).Msgf("cant set processed status in storage %v:", err) + w.log.Error().Err(err).Int64(keyHeight, height).Msg("can't set processed status in storage") } } func (w *Worker) processGenesis(ctx context.Context, genesis *cometbfttypes.GenesisDoc) error { var appState map[string]json.RawMessage if err := jsoniter.Unmarshal(genesis.AppState, &appState); err != nil { - w.log.Err(err).Msgf("error unmarshalling genesis doc: %v", err) + w.log.Err(err).Msg("error unmarshalling genesis doc") return err } for _, m := range genesisHandlers { if err := m.HandleGenesis(ctx, genesis, appState); err != nil { - w.log.Error().Err(err).Str(keyModule, m.Name()).Msgf("handle genesis error: %v", err) + w.log.Error().Err(err).Str(keyModule, m.Name()).Msg("handle genesis error") } } @@ -245,22 +243,18 @@ func (w *Worker) processGenesis(ctx context.Context, genesis *cometbfttypes.Gene func (w *Worker) processBlock(ctx context.Context, block *types.Block) error { for _, m := range blockHandlers { if err := m.HandleBlock(ctx, block); err != nil { - w.log.Error().Err(err).Str(keyModule, m.Name()).Msgf("HandleBlock error: %v", err) + w.log.Error().Err(err).Str(keyModule, m.Name()).Msg("HandleBlock error") return err } } + return nil } func (w *Worker) processValidators(ctx context.Context, height int64, vals *cometbftcoreypes.ResultValidators) error { for _, m := range validatorsHandlers { if err := m.HandleValidators(ctx, vals); err != nil { - w.log.Error(). - Err(err). - Int64(keyHeight, height). - Str(keyModule, m.Name()). - Msgf("HandleValidators error: %v", err) - + w.log.Error().Err(err).Int64(keyHeight, height).Str(keyModule, m.Name()).Msg("HandleValidators error") return err } } @@ -272,7 +266,7 @@ func (w *Worker) processTxs(ctx context.Context, txs []*types.Tx) error { for _, tx := range txs { for _, m := range transactionHandlers { if err := m.HandleTx(ctx, tx); err != nil { - w.log.Error().Err(err).Str(keyModule, m.Name()).Msgf("HandleTX error %v", err) + w.log.Error().Err(err).Str(keyModule, m.Name()).Msg("HandleTX error") return err } } @@ -329,7 +323,7 @@ func (w *Worker) processMessage(ctx context.Context, msg *codec.Any, tx *types.T Err(err). Int64(keyHeight, tx.Height). Str(keyModule, m.Name()). - Msgf("HandleMessage error: %v", err) + Msg("HandleMessage error") return err } @@ -342,7 +336,7 @@ func (w *Worker) processMessage(ctx context.Context, msg *codec.Any, tx *types.T Err(err). Int64(keyHeight, tx.Height). Str(keyModule, m.Name()). - Msgf("HandleRecursiveMessage error: %v", err) + Msg("HandleRecursiveMessage error") return err } @@ -354,7 +348,7 @@ func (w *Worker) processMessage(ctx context.Context, msg *codec.Any, tx *types.T Err(err). Int64(keyHeight, tx.Height). Str(keyModule, m.Name()). - Msgf("HandleRecursiveMessage error: %v", err) + Msg("HandleRecursiveMessage error") return errors.Join(errRecurringHandling, err) } @@ -368,19 +362,21 @@ func (w *Worker) processMessage(ctx context.Context, msg *codec.Any, tx *types.T func (w *Worker) processBeginBlockerEvents(ctx context.Context, events types.BlockerEvents, height int64) error { for _, m := range beginBlockerHandlers { if err := m.HandleBeginBlocker(ctx, events, height); err != nil { - w.log.Error().Err(err).Str(keyModule, m.Name()).Msgf("HandleBeginBlocker error: %v", err) + w.log.Error().Err(err).Str(keyModule, m.Name()).Msg("HandleBeginBlocker error") return err } } + return nil } func (w *Worker) processEndBlockEvents(ctx context.Context, events types.BlockerEvents, height int64) error { for _, m := range endBlockerHandlers { if err := m.HandleEndBlocker(ctx, events, height); err != nil { - w.log.Error().Err(err).Str(keyModule, m.Name()).Msgf("HandleEndBlocker error: %v", err) + w.log.Error().Err(err).Str(keyModule, m.Name()).Msg("HandleEndBlocker error") return err } } + return nil } diff --git a/pkg/worker/queue.go b/pkg/worker/queue.go index dfafd2e..3d76ddc 100644 --- a/pkg/worker/queue.go +++ b/pkg/worker/queue.go @@ -36,7 +36,7 @@ func (w *Worker) enqueueHeight(ctx context.Context, wg *sync.WaitGroup, startHei func (w *Worker) enqueueNewBlocks(ctx context.Context, eventCh <-chan cometbftcoreypes.ResultEvent) { ctx, w.stopWsListener = context.WithCancel(ctx) defer w.stopWsListener() - w.log.Info().Msg("listening for new block events...") + w.log.Info().Msg("listening for new block events") for { select { @@ -80,7 +80,7 @@ func (w *Worker) enqueueErrorBlocks(ctx context.Context, wg *sync.WaitGroup) { case <-ticker.C: heights, err := w.storage.GetErrorBlockHeights(ctx) if err != nil { - w.log.Error().Err(err).Str("func", "GetErrorBlockHeights").Msg("cant enqueueErrorBlocks") + w.log.Error().Err(err).Str("func", "GetErrorBlockHeights").Msg("can't enqueueErrorBlocks") return } diff --git a/pkg/worker/utils.go b/pkg/worker/utils.go index 59dcd89..9fbeb5a 100644 --- a/pkg/worker/utils.go +++ b/pkg/worker/utils.go @@ -20,7 +20,7 @@ var ( func (w *Worker) setErrorStatusWithLogging(ctx context.Context, height int64, msg string) { if err := w.storage.SetErrorStatus(ctx, height, msg); err != nil { - w.log.Error().Err(err).Int64("height", height).Msgf("cant set error status in storage %v:", err) + w.log.Error().Err(err).Int64("height", height).Msg("can't set error status in storage") } } @@ -29,9 +29,10 @@ func (w *Worker) checkOrCreateBlockInStorage(ctx context.Context, height int64) if err != nil && errors.Is(err, types.ErrBlockNotFound) { // create new block if err = w.storage.CreateBlock(ctx, w.tsM.NewBlock(height)); err != nil { - w.log.Error().Err(err).Int64("height", height).Msgf("cant create new block in storage %v:", err) + w.log.Error().Err(err).Int64("height", height).Msg("can't create new block in storage") return err } + return nil } else if err != nil { // got some error from storage @@ -62,13 +63,13 @@ func (w *Worker) unpackMessage(ctx context.Context, height int64, msg *codec.Any } if strings.HasPrefix(err.Error(), "no concrete type registered for type URL") { - w.log.Warn().Err(err).Int64(keyHeight, height).Msgf("error while unpacking message: %s", err) + w.log.Warn().Err(err).Int64(keyHeight, height).Msg("error while unpacking message") if err = w.storage.InsertErrorMessage(ctx, w.tsM.NewErrorMessage(height, err.Error())); err != nil { w.log.Error(). Err(err). Int64(keyHeight, height). - Msgf("fail to insert error_message: %v", err) + Msg("fail to insert error_message") return nil, err } @@ -76,7 +77,7 @@ func (w *Worker) unpackMessage(ctx context.Context, height int64, msg *codec.Any return nil, nil } - w.log.Error().Err(err).Msgf("error while unpacking message: %s", err) + w.log.Error().Err(err).Msg("error while unpacking message") return nil, err } diff --git a/pkg/worker/worker.go b/pkg/worker/worker.go index e496f07..71e891c 100644 --- a/pkg/worker/worker.go +++ b/pkg/worker/worker.go @@ -42,6 +42,7 @@ type ( modules []types.Module cfg Config } + metrics struct { durMetric *prometheus.HistogramVec } diff --git a/scripts/golint.sh b/scripts/golint.sh index 225bb2c..ab8c5f4 100755 --- a/scripts/golint.sh +++ b/scripts/golint.sh @@ -1,3 +1,3 @@ #!/bin/sh #https://golangci-lint.run/usage/quick-start/ -golangci-lint run -v --config golangci.yml --timeout 5m \ No newline at end of file +bin/golangci-lint run -v --config golangci.yml --timeout 5m \ No newline at end of file diff --git a/types/bostrom/dmn.go b/types/bostrom/dmn.go new file mode 100644 index 0000000..1e48851 --- /dev/null +++ b/types/bostrom/dmn.go @@ -0,0 +1,51 @@ +package bostrom + +import ( + dmntypes "github.com/cybercongress/go-cyber/x/dmn/types" +) + +func init() { + registerTypes([]protoType{ + {(*dmntypes.MsgCreateThought)(nil), "cyber.dmn.v1beta1.MsgCreateThought"}, + {(*dmntypes.MsgForgetThought)(nil), "cyber.dmn.v1beta1.MsgForgetThought"}, + {(*dmntypes.MsgChangeThoughtParticle)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtParticle"}, + {(*dmntypes.MsgChangeThoughtInput)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtInput"}, + {(*dmntypes.MsgChangeThoughtName)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtName"}, + {(*dmntypes.MsgChangeThoughtGasPrice)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtGasPrice"}, + {(*dmntypes.MsgChangeThoughtPeriod)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtPeriod"}, + {(*dmntypes.MsgChangeThoughtBlock)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtBlock"}, + {(*dmntypes.MsgCreateThoughtResponse)(nil), "cyber.dmn.v1beta1.MsgCreateThoughtResponse"}, + {(*dmntypes.MsgForgetThoughtResponse)(nil), "cyber.dmn.v1beta1.MsgForgetThoughtResponse"}, + {(*dmntypes.MsgChangeThoughtParticleResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtParticleResponse"}, + {(*dmntypes.MsgChangeThoughtNameResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtNameResponse"}, + {(*dmntypes.MsgChangeThoughtInputResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtInputResponse"}, + {(*dmntypes.MsgChangeThoughtGasPriceResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtGasPriceResponse"}, + {(*dmntypes.MsgChangeThoughtPeriodResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtPeriodResponse"}, + {(*dmntypes.MsgChangeThoughtBlockResponse)(nil), "cyber.dmn.v1beta1.MsgChangeThoughtBlockResponse"}, + + {(*dmntypes.Params)(nil), "cyber.dmn.v1beta1.Params"}, + {(*dmntypes.Thought)(nil), "cyber.dmn.v1beta1.Thought"}, + {(*dmntypes.Trigger)(nil), "cyber.dmn.v1beta1.Trigger"}, + {(*dmntypes.Load)(nil), "cyber.dmn.v1beta1.Load"}, + {(*dmntypes.ThoughtStats)(nil), "cyber.dmn.v1beta1.ThoughtStats"}, + + {(*dmntypes.QueryParamsRequest)(nil), "cyber.dmn.v1beta1.QueryParamsRequest"}, + {(*dmntypes.QueryParamsResponse)(nil), "cyber.dmn.v1beta1.QueryParamsResponse"}, + {(*dmntypes.QueryThoughtParamsRequest)(nil), "cyber.dmn.v1beta1.QueryThoughtParamsRequest"}, + {(*dmntypes.QueryThoughtResponse)(nil), "cyber.dmn.v1beta1.QueryThoughtResponse"}, + {(*dmntypes.QueryThoughtStatsResponse)(nil), "cyber.dmn.v1beta1.QueryThoughtStatsResponse"}, + {(*dmntypes.QueryThoughtsRequest)(nil), "cyber.dmn.v1beta1.QueryThoughtsRequest"}, + {(*dmntypes.QueryThoughtsResponse)(nil), "cyber.dmn.v1beta1.QueryThoughtsResponse"}, + {(*dmntypes.QueryThoughtsStatsRequest)(nil), "cyber.dmn.v1beta1.QueryThoughtsStatsRequest"}, + {(*dmntypes.QueryThoughtsStatsResponse)(nil), "cyber.dmn.v1beta1.QueryThoughtsStatsResponse"}, + + {(*dmntypes.GenesisState)(nil), "cyber.dmn.v1beta1.GenesisState"}, + }) + + registerFiles([]protoFile{ + {"cyber/dmn/v1beta1/tx.proto", descriptor((*dmntypes.MsgCreateThought)(nil))}, + {"cyber/dmn/v1beta1/types.proto", descriptor((*dmntypes.Params)(nil))}, + {"cyber/dmn/v1beta1/query.proto", descriptor((*dmntypes.QueryParamsRequest)(nil))}, + {"cyber/dmn/v1beta1/genesis.proto", descriptor((*dmntypes.GenesisState)(nil))}, + }) +} diff --git a/types/bostrom/graph.go b/types/bostrom/graph.go new file mode 100644 index 0000000..9e2747e --- /dev/null +++ b/types/bostrom/graph.go @@ -0,0 +1,21 @@ +package bostrom + +import ( + graph "github.com/cybercongress/go-cyber/x/graph/types" +) + +func init() { + registerTypes([]protoType{ + {(*graph.QueryGraphStatsRequest)(nil), "cyber.graph.v1beta1.QueryGraphStatsRequest"}, + {(*graph.QueryGraphStatsResponse)(nil), "cyber.graph.v1beta1.QueryGraphStatsResponse"}, + {(*graph.MsgCyberlink)(nil), "cyber.graph.v1beta1.MsgCyberlink"}, + {(*graph.MsgCyberlinkResponse)(nil), "cyber.graph.v1beta1.MsgCyberlinkResponse"}, + {(*graph.Link)(nil), "cyber.graph.v1beta1.Link"}, + }) + + registerFiles([]protoFile{ + {"cyber/graph/v1beta1/tx.proto", descriptor((*graph.MsgCyberlink)(nil))}, + {"cyber/graph/v1beta1/query.proto", descriptor((*graph.QueryGraphStatsRequest)(nil))}, + {"cyber/graph/v1beta1/types.proto", descriptor((*graph.Link)(nil))}, + }) +} diff --git a/types/bostrom/grid.go b/types/bostrom/grid.go new file mode 100644 index 0000000..841c123 --- /dev/null +++ b/types/bostrom/grid.go @@ -0,0 +1,41 @@ +package bostrom + +import ( + gridtypes "github.com/cybercongress/go-cyber/x/grid/types" +) + +func init() { + registerTypes([]protoType{ + {(*gridtypes.Params)(nil), "cyber.grid.v1beta1.Params"}, + {(*gridtypes.Route)(nil), "cyber.grid.v1beta1.Route"}, + {(*gridtypes.Value)(nil), "cyber.grid.v1beta1.Value"}, + + {(*gridtypes.MsgCreateRoute)(nil), "cyber.grid.v1beta1.MsgCreateRoute"}, + {(*gridtypes.MsgEditRoute)(nil), "cyber.grid.v1beta1.MsgEditRoute"}, + {(*gridtypes.MsgDeleteRoute)(nil), "cyber.grid.v1beta1.MsgDeleteRoute"}, + {(*gridtypes.MsgEditRouteName)(nil), "cyber.grid.v1beta1.MsgEditRouteName"}, + {(*gridtypes.MsgCreateRouteResponse)(nil), "cyber.grid.v1beta1.MsgCreateRouteResponse"}, + {(*gridtypes.MsgEditRouteResponse)(nil), "cyber.grid.v1beta1.MsgEditRouteResponse"}, + {(*gridtypes.MsgDeleteRouteResponse)(nil), "cyber.grid.v1beta1.MsgDeleteRouteResponse"}, + {(*gridtypes.MsgEditRouteNameResponse)(nil), "cyber.grid.v1beta1.MsgEditRouteNameResponse"}, + + {(*gridtypes.QueryParamsRequest)(nil), "cyber.grid.v1beta1.QueryParamsRequest"}, + {(*gridtypes.QueryParamsResponse)(nil), "cyber.grid.v1beta1.QueryParamsResponse"}, + {(*gridtypes.QuerySourceRequest)(nil), "cyber.grid.v1beta1.QuerySourceRequest"}, + {(*gridtypes.QueryDestinationRequest)(nil), "cyber.grid.v1beta1.QueryDestinationRequest"}, + {(*gridtypes.QueryRoutedEnergyResponse)(nil), "cyber.grid.v1beta1.QueryRoutedEnergyResponse"}, + {(*gridtypes.QueryRouteRequest)(nil), "cyber.grid.v1beta1.QueryRouteRequest"}, + {(*gridtypes.QueryRouteResponse)(nil), "cyber.grid.v1beta1.QueryRouteResponse"}, + {(*gridtypes.QueryRoutesRequest)(nil), "cyber.grid.v1beta1.QueryRoutesRequest"}, + {(*gridtypes.QueryRoutesResponse)(nil), "cyber.grid.v1beta1.QueryRoutesResponse"}, + + {(*gridtypes.GenesisState)(nil), "cyber.grid.v1beta1.GenesisState"}, + }) + + registerFiles([]protoFile{ + {"cyber/grid/v1beta1/types.proto", descriptor((*gridtypes.Params)(nil))}, + {"cyber/grid/v1beta1/tx.proto", descriptor((*gridtypes.MsgCreateRoute)(nil))}, + {"cyber/grid/v1beta1/query.proto", descriptor((*gridtypes.QueryParamsRequest)(nil))}, + {"cyber/grid/v1beta1/genesis.proto", descriptor((*gridtypes.GenesisState)(nil))}, + }) +} diff --git a/types/bostrom/rank.go b/types/bostrom/rank.go new file mode 100644 index 0000000..ef72a77 --- /dev/null +++ b/types/bostrom/rank.go @@ -0,0 +1,37 @@ +package bostrom + +import ( + ranktypes "github.com/cybercongress/go-cyber/x/rank/types" +) + +func init() { + registerTypes([]protoType{ + {(*ranktypes.Params)(nil), "cyber.rank.v1beta1.Params"}, + {(*ranktypes.RankedParticle)(nil), "cyber.rank.v1beta1.RankedParticle"}, + + {(*ranktypes.QueryParamsRequest)(nil), "cyber.rank.v1beta1.QueryParamsRequest"}, + {(*ranktypes.QueryParamsResponse)(nil), "cyber.rank.v1beta1.QueryParamsResponse"}, + {(*ranktypes.QueryRankRequest)(nil), "cyber.rank.v1beta1.QueryRankRequest"}, + {(*ranktypes.QueryRankResponse)(nil), "cyber.rank.v1beta1.QueryRankResponse"}, + {(*ranktypes.QuerySearchRequest)(nil), "cyber.rank.v1beta1.QuerySearchRequest"}, + {(*ranktypes.QuerySearchResponse)(nil), "cyber.rank.v1beta1.QuerySearchResponse"}, + {(*ranktypes.QueryTopRequest)(nil), "cyber.rank.v1beta1.QueryTopRequest"}, + {(*ranktypes.QueryIsLinkExistRequest)(nil), "cyber.rank.v1beta1.QueryIsLinkExistRequest"}, + {(*ranktypes.QueryIsAnyLinkExistRequest)(nil), "cyber.rank.v1beta1.QueryIsAnyLinkExistRequest"}, + {(*ranktypes.QueryLinkExistResponse)(nil), "cyber.rank.v1beta1.QueryLinkExistResponse"}, + {(*ranktypes.QueryNegentropyPartilceRequest)(nil), "cyber.rank.v1beta1.QueryNegentropyPartilceRequest"}, + {(*ranktypes.QueryNegentropyParticleResponse)(nil), "cyber.rank.v1beta1.QueryNegentropyParticleResponse"}, + {(*ranktypes.QueryNegentropyRequest)(nil), "cyber.rank.v1beta1.QueryNegentropyRequest"}, + {(*ranktypes.QueryNegentropyResponse)(nil), "cyber.rank.v1beta1.QueryNegentropyResponse"}, + {(*ranktypes.QueryKarmaRequest)(nil), "cyber.rank.v1beta1.QueryKarmaRequest"}, + {(*ranktypes.QueryKarmaResponse)(nil), "cyber.rank.v1beta1.QueryKarmaResponse"}, + + {(*ranktypes.GenesisState)(nil), "cyber.rank.v1beta1.GenesisState"}, + }) + + registerFiles([]protoFile{ + {"cyber/rank/v1beta1/types.proto", descriptor((*ranktypes.Params)(nil))}, + {"cyber/rank/v1beta1/query.proto", descriptor((*ranktypes.QueryParamsRequest)(nil))}, + {"cyber/rank/v1beta1/genesis.proto", descriptor((*ranktypes.GenesisState)(nil))}, + }) +} diff --git a/types/bostrom/resources.go b/types/bostrom/resources.go new file mode 100644 index 0000000..2466ddc --- /dev/null +++ b/types/bostrom/resources.go @@ -0,0 +1,28 @@ +package bostrom + +import ( + resourcestypes "github.com/cybercongress/go-cyber/x/resources/types" +) + +func init() { + registerTypes([]protoType{ + {(*resourcestypes.Params)(nil), "cyber.resources.v1beta1.Params"}, + + {(*resourcestypes.MsgInvestmint)(nil), "cyber.resources.v1beta1.MsgInvestmint"}, + {(*resourcestypes.MsgInvestmintResponse)(nil), "cyber.resources.v1beta1.MsgInvestmintResponse"}, + + {(*resourcestypes.QueryParamsRequest)(nil), "cyber.resources.v1beta1.QueryParamsRequest"}, + {(*resourcestypes.QueryParamsResponse)(nil), "cyber.resources.v1beta1.QueryParamsResponse"}, + {(*resourcestypes.QueryInvestmintRequest)(nil), "cyber.resources.v1beta1.QueryInvestmintRequest"}, + {(*resourcestypes.QueryInvestmintResponse)(nil), "cyber.resources.v1beta1.QueryInvestmintResponse"}, + + {(*resourcestypes.GenesisState)(nil), "cyber.resources.v1beta1.GenesisState"}, + }) + + registerFiles([]protoFile{ + {"cyber/resources/v1beta1/types.proto", descriptor((*resourcestypes.Params)(nil))}, + {"cyber/resources/v1beta1/tx.proto", descriptor((*resourcestypes.MsgInvestmint)(nil))}, + {"cyber/resources/v1beta1/query.proto", descriptor((*resourcestypes.QueryParamsRequest)(nil))}, + {"cyber/resources/v1beta1/genesis.proto", descriptor((*resourcestypes.GenesisState)(nil))}, + }) +} diff --git a/types/bostrom/utils.go b/types/bostrom/utils.go new file mode 100644 index 0000000..426831d --- /dev/null +++ b/types/bostrom/utils.go @@ -0,0 +1,32 @@ +package bostrom + +import "github.com/cosmos/gogoproto/proto" + +type ( + protoType struct { + t proto.Message + name string + } + + protoFile struct { + filename string + descriptor []byte + } +) + +func descriptor(t interface{ Descriptor() ([]byte, []int) }) []byte { + desc, _ := t.Descriptor() + return desc +} + +func registerTypes(types []protoType) { + for _, t := range types { + proto.RegisterType(t.t, t.name) + } +} + +func registerFiles(files []protoFile) { + for _, f := range files { + proto.RegisterFile(f.filename, f.descriptor) + } +} diff --git a/types/coin.go b/types/coin.go index 79a8acb..d93d232 100644 --- a/types/coin.go +++ b/types/coin.go @@ -22,23 +22,23 @@ func NewCoin(denom string, amount float64) Coin { } } -func NewCoinFromCdk(coin sdk.Coin) Coin { +func NewCoinFromSDK(coin sdk.Coin) Coin { return Coin{ Denom: coin.Denom, Amount: float64(coin.Amount.BigInt().Int64()), } } -func NewCoinsFromCdk(coins sdk.Coins) Coins { +func NewCoinsFromSDK(coins sdk.Coins) Coins { res := make(Coins, len(coins)) for i, c := range coins { - res[i] = NewCoinFromCdk(c) + res[i] = NewCoinFromSDK(c) } return res } -func NewCoinsFromCdkDec(coins sdk.DecCoins) Coins { +func NewCoinsFromSDKDec(coins sdk.DecCoins) Coins { res := make(Coins, len(coins)) for i, c := range coins { res[i] = Coin{ diff --git a/types/cosmos.go b/types/cosmos.go index 6787a7d..4fa2ff2 100644 --- a/types/cosmos.go +++ b/types/cosmos.go @@ -18,7 +18,8 @@ import ( ) var ( - ErrNoEventFound = errors.New("no event found") + ErrNoEventFound = errors.New("no event found") + ErrNoAttributeFound = errors.New("no event with attribute") ) type ( @@ -26,7 +27,7 @@ type ( Bytes() []byte } - ValidatorPrecommit struct { + ValidatorPreCommit struct { Timestamp time.Time ValidatorAddress string BlockIDFlag uint64 @@ -37,7 +38,7 @@ type ( Timestamp time.Time Hash string ProposerAddress string - ValidatorPrecommits []ValidatorPrecommit + ValidatorPreCommits []ValidatorPreCommit Evidence cometbfttypes.EvidenceData TxNum int TotalGas uint64 @@ -89,20 +90,20 @@ func NewBlockFromTmBlock(blk *cometbftcoretypes.ResultBlock, totalGas uint64) *B ) if blk.Block.LastCommit != nil { - res.ValidatorPrecommits = NewValidatorPrecommitsFromTmSignatures(blk.Block.LastCommit.Signatures) + res.ValidatorPreCommits = NewValidatorPreCommitsFromTmSignatures(blk.Block.LastCommit.Signatures) } return res } -func NewValidatorPrecommitsFromTmSignatures(sigs []cometbfttypes.CommitSig) []ValidatorPrecommit { - res := make([]ValidatorPrecommit, 0, len(sigs)) +func NewValidatorPreCommitsFromTmSignatures(sigs []cometbfttypes.CommitSig) []ValidatorPreCommit { + res := make([]ValidatorPreCommit, 0, len(sigs)) for _, sig := range sigs { if len(sig.Signature) == 0 { continue } - res = append(res, ValidatorPrecommit{ + res = append(res, ValidatorPreCommit{ ValidatorAddress: sdk.ConsAddress(sig.ValidatorAddress).String(), BlockIDFlag: uint64(sig.BlockIDFlag), Timestamp: sig.Timestamp, @@ -206,7 +207,7 @@ func (tx Tx) FindAttributeByKey(event sdk.StringEvent, attrKey string) (string, } } - return "", errors.New(fmt.Sprintf("no event with attribute %s found inside tx with hash %s", attrKey, tx.TxHash)) + return "", fmt.Errorf("%w: %s found inside tx with hash %s", ErrNoAttributeFound, attrKey, tx.TxHash) } // Successful tells whether this tx is successful or not diff --git a/types/staking_validator.go b/types/staking_validator.go index 5d31d84..a87411a 100644 --- a/types/staking_validator.go +++ b/types/staking_validator.go @@ -33,14 +33,22 @@ type ( ) // NewStakingValidator allows to build a new Validator implementation having the given data -func NewStakingValidator(consAddr, opAddr, consPubKey, selfDelegateAddress string, - maxChangeRate, maxRate *sdk.Dec, description stakingtypes.Description, height int64, - minSelfDelegation int64) StakingValidator { +func NewStakingValidator( + consensusAddr, + operatorAddr, + consensusPubKey, + selfDelegateAddress string, + maxChangeRate, + maxRate *sdk.Dec, + description stakingtypes.Description, + height, + minSelfDelegation int64, +) StakingValidator { return stakingValidator{ - ConsensusAddr: consAddr, - ConsPubKey: consPubKey, - OperatorAddr: opAddr, + ConsensusAddr: consensusAddr, + ConsPubKey: consensusPubKey, + OperatorAddr: operatorAddr, SelfDelegateAddress: selfDelegateAddress, MaxChangeRate: maxChangeRate, MaxRate: maxRate, @@ -50,40 +58,12 @@ func NewStakingValidator(consAddr, opAddr, consPubKey, selfDelegateAddress strin } } -// GetConsAddr implements the Validator interface -func (v stakingValidator) GetConsAddr() string { - return v.ConsensusAddr -} - -// GetConsPubKey implements the Validator interface -func (v stakingValidator) GetConsPubKey() string { - return v.ConsPubKey -} - -func (v stakingValidator) GetOperator() string { - return v.OperatorAddr -} - -func (v stakingValidator) GetSelfDelegateAddress() string { - return v.SelfDelegateAddress -} - -func (v stakingValidator) GetMaxChangeRate() *sdk.Dec { - return v.MaxChangeRate -} - -func (v stakingValidator) GetMaxRate() *sdk.Dec { - return v.MaxRate -} - -func (v stakingValidator) GetHeight() int64 { - return v.Height -} - -func (v stakingValidator) GetMinSelfDelegation() int64 { - return v.MinSelfDelegation -} - -func (v stakingValidator) GetDescription() stakingtypes.Description { - return v.Description -} +func (v stakingValidator) GetSelfDelegateAddress() string { return v.SelfDelegateAddress } +func (v stakingValidator) GetMinSelfDelegation() int64 { return v.MinSelfDelegation } +func (v stakingValidator) GetMaxChangeRate() *sdk.Dec { return v.MaxChangeRate } +func (v stakingValidator) GetDescription() stakingtypes.Description { return v.Description } +func (v stakingValidator) GetConsPubKey() string { return v.ConsPubKey } +func (v stakingValidator) GetOperator() string { return v.OperatorAddr } +func (v stakingValidator) GetConsAddr() string { return v.ConsensusAddr } +func (v stakingValidator) GetMaxRate() *sdk.Dec { return v.MaxRate } +func (v stakingValidator) GetHeight() int64 { return v.Height }