diff --git a/.circleci/config.yml b/.circleci/config.yml index ceb95006..383fe640 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,31 @@ orbs: aws-ecr: circleci/aws-ecr@8.2.1 jobs: + check-mock-gen: + machine: + image: ubuntu-2204:2024.01.1 + steps: + - checkout + - go/install: + version: "1.21.4" + - go/load-cache: + key: go-mod-v6-{{ checksum "go.sum" }} + - go/mod-download + - go/save-cache: + key: go-mod-v6-{{ checksum "go.sum" }} + path: "/home/circleci/.go_workspace/pkg/mod" + - run: + name: Run make mock-gen + command: | + make mock-gen + - run: + name: Check for uncommitted changes + command: | + if ! git diff --exit-code; then + echo "Uncommitted changes detected. Please run 'make mock-gen' before committing." + exit 1 + fi + build_lint_test: machine: image: ubuntu-2204:2024.01.1 @@ -18,6 +43,7 @@ jobs: command: "go env" - go/load-cache: key: go-mod-v6-{{ checksum "go.sum" }} + - add_ssh_keys - go/mod-download - go/save-cache: key: go-mod-v6-{{ checksum "go.sum" }} @@ -45,6 +71,7 @@ jobs: resource_class: large steps: - checkout + - add_ssh_keys - aws-ecr/build-image: push-image: false dockerfile: Dockerfile @@ -52,6 +79,7 @@ jobs: build-path: ./ tag: "$CIRCLE_SHA1,$CIRCLE_TAG" repo: "$CIRCLE_PROJECT_REPONAME" + extra-build-args: "--secret id=sshKey,src=/home/circleci/.ssh/$DEPLOY_KEY_NAME" - run: name: Save Docker image to export it to workspace command: | @@ -85,6 +113,7 @@ jobs: workflows: CI: jobs: + - check-mock-gen - build_lint_test - build_docker: filters: @@ -100,3 +129,4 @@ workflows: only: - main - dev + - base/consumer-chain-support diff --git a/Dockerfile b/Dockerfile index dd5a7b21..db458b66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,15 @@ RUN apk add --no-cache --update openssh git make build-base linux-headers libc-d libzmq-static libsodium-static gcc +RUN mkdir -p /root/.ssh && ssh-keyscan github.com >> /root/.ssh/known_hosts +RUN git config --global url."git@github.com:".insteadOf "https://github.com/" +ENV GOPRIVATE=github.com/babylonchain/* + # Build WORKDIR /go/src/github.com/babylonchain/finality-provider # Cache dependencies COPY go.mod go.sum /go/src/github.com/babylonchain/finality-provider/ -RUN go mod download +RUN --mount=type=secret,id=sshKey,target=/root/.ssh/id_rsa go mod download # Copy the rest of the files COPY ./ /go/src/github.com/babylonchain/finality-provider/ diff --git a/Makefile b/Makefile index c8d6b32c..e0acf7a5 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,12 @@ $(BUILDDIR)/: mkdir -p $(BUILDDIR)/ build-docker: - $(DOCKER) build --tag babylonchain/finality-provider -f Dockerfile \ + $(DOCKER) build --secret id=sshKey,src=${BBN_PRIV_DEPLOY_KEY} --tag babylonchain/finality-provider -f Dockerfile \ $(shell git rev-parse --show-toplevel) .PHONY: build build-docker +.PHONY: test test: go test ./... @@ -75,7 +76,7 @@ proto-gen: mock-gen: mkdir -p $(MOCKS_DIR) - $(MOCKGEN_CMD) -source=clientcontroller/interface.go -package mocks -destination $(MOCKS_DIR)/babylon.go + $(MOCKGEN_CMD) -source=clientcontroller/interface.go -package mocks -destination $(MOCKS_DIR)/clientcontroller.go .PHONY: mock-gen diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index a2396c59..08f17f05 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -3,7 +3,6 @@ package clientcontroller import ( "context" "fmt" - "time" sdkErr "cosmossdk.io/errors" "github.com/btcsuite/btcd/btcec/v2" @@ -15,8 +14,8 @@ import ( btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" btclctypes "github.com/babylonchain/babylon/x/btclightclient/types" btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types" + bsctypes "github.com/babylonchain/babylon/x/btcstkconsumer/types" ckpttypes "github.com/babylonchain/babylon/x/checkpointing/types" - finalitytypes "github.com/babylonchain/babylon/x/finality/types" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/chaincfg" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -112,6 +111,7 @@ func (bc *BabylonController) reliablySendMsgs(msgs []sdk.Msg, expectedErrs []*sd // RegisterFinalityProvider registers a finality provider via a MsgCreateFinalityProvider to Babylon // it returns tx hash, registered epoch, and error func (bc *BabylonController) RegisterFinalityProvider( + chainID string, chainPk []byte, fpPk *btcec.PublicKey, pop []byte, @@ -137,6 +137,7 @@ func (bc *BabylonController) RegisterFinalityProvider( Commission: commission, Description: &sdkDescription, MasterPubRand: masterPubRand, + ConsumerId: chainID, } res, err := bc.reliablySendMsg(msg, emptyErrs, emptyErrs) @@ -152,62 +153,6 @@ func (bc *BabylonController) RegisterFinalityProvider( return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, registeredEpoch, nil } -// SubmitFinalitySig submits the finality signature via a MsgAddVote to Babylon -func (bc *BabylonController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) { - msg := &finalitytypes.MsgAddFinalitySig{ - Signer: bc.mustGetTxSigner(), - FpBtcPk: bbntypes.NewBIP340PubKeyFromBTCPK(fpPk), - BlockHeight: blockHeight, - BlockAppHash: blockHash, - FinalitySig: bbntypes.NewSchnorrEOTSSigFromModNScalar(sig), - } - - unrecoverableErrs := []*sdkErr.Error{ - finalitytypes.ErrInvalidFinalitySig, - finalitytypes.ErrPubRandNotFound, - btcstakingtypes.ErrFpAlreadySlashed, - } - - res, err := bc.reliablySendMsg(msg, emptyErrs, unrecoverableErrs) - if err != nil { - return nil, err - } - - return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, nil -} - -// SubmitBatchFinalitySigs submits a batch of finality signatures to Babylon -func (bc *BabylonController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, blocks []*types.BlockInfo, sigs []*btcec.ModNScalar) (*types.TxResponse, error) { - if len(blocks) != len(sigs) { - return nil, fmt.Errorf("the number of blocks %v should match the number of finality signatures %v", len(blocks), len(sigs)) - } - - msgs := make([]sdk.Msg, 0, len(blocks)) - for i, b := range blocks { - msg := &finalitytypes.MsgAddFinalitySig{ - Signer: bc.mustGetTxSigner(), - FpBtcPk: bbntypes.NewBIP340PubKeyFromBTCPK(fpPk), - BlockHeight: b.Height, - BlockAppHash: b.Hash, - FinalitySig: bbntypes.NewSchnorrEOTSSigFromModNScalar(sigs[i]), - } - msgs = append(msgs, msg) - } - - unrecoverableErrs := []*sdkErr.Error{ - finalitytypes.ErrInvalidFinalitySig, - finalitytypes.ErrPubRandNotFound, - btcstakingtypes.ErrFpAlreadySlashed, - } - - res, err := bc.reliablySendMsgs(msgs, emptyErrs, unrecoverableErrs) - if err != nil { - return nil, err - } - - return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, nil -} - func (bc *BabylonController) QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) (bool, error) { fpPubKey := bbntypes.NewBIP340PubKeyFromBTCPK(fpPk) res, err := bc.bbnClient.QueryClient.FinalityProvider(fpPubKey.MarshalHex()) @@ -220,19 +165,6 @@ func (bc *BabylonController) QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) return slashed, nil } -// QueryFinalityProviderVotingPower queries the voting power of the finality provider at a given height -func (bc *BabylonController) QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) { - res, err := bc.bbnClient.QueryClient.FinalityProviderPowerAtHeight( - bbntypes.NewBIP340PubKeyFromBTCPK(fpPk).MarshalHex(), - blockHeight, - ) - if err != nil { - return 0, fmt.Errorf("failed to query the finality provider's voting power at height %d: %w", blockHeight, err) - } - - return res.VotingPower, nil -} - // QueryFinalityProviderRegisteredEpoch queries the registered epoch of the finality provider func (bc *BabylonController) QueryFinalityProviderRegisteredEpoch(fpPk *btcec.PublicKey) (uint64, error) { res, err := bc.bbnClient.QueryClient.FinalityProvider( @@ -245,10 +177,6 @@ func (bc *BabylonController) QueryFinalityProviderRegisteredEpoch(fpPk *btcec.Pu return res.FinalityProvider.RegisteredEpoch, nil } -func (bc *BabylonController) QueryLatestFinalizedBlocks(count uint64) ([]*types.BlockInfo, error) { - return bc.queryLatestBlocks(nil, count, finalitytypes.QueriedBlockStatus_FINALIZED, true) -} - func (bc *BabylonController) QueryLastFinalizedEpoch() (uint64, error) { resp, err := bc.bbnClient.LatestEpochFromStatus(ckpttypes.Finalized) if err != nil { @@ -257,96 +185,6 @@ func (bc *BabylonController) QueryLastFinalizedEpoch() (uint64, error) { return resp.RawCheckpoint.EpochNum, nil } -func (bc *BabylonController) QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) { - if endHeight < startHeight { - return nil, fmt.Errorf("the startHeight %v should not be higher than the endHeight %v", startHeight, endHeight) - } - count := endHeight - startHeight + 1 - if count > limit { - count = limit - } - return bc.queryLatestBlocks(sdk.Uint64ToBigEndian(startHeight), count, finalitytypes.QueriedBlockStatus_ANY, false) -} - -func (bc *BabylonController) queryLatestBlocks(startKey []byte, count uint64, status finalitytypes.QueriedBlockStatus, reverse bool) ([]*types.BlockInfo, error) { - var blocks []*types.BlockInfo - pagination := &sdkquery.PageRequest{ - Limit: count, - Reverse: reverse, - Key: startKey, - } - - res, err := bc.bbnClient.QueryClient.ListBlocks(status, pagination) - if err != nil { - return nil, fmt.Errorf("failed to query finalized blocks: %v", err) - } - - for _, b := range res.Blocks { - ib := &types.BlockInfo{ - Height: b.Height, - Hash: b.AppHash, - } - blocks = append(blocks, ib) - } - - return blocks, nil -} - -func getContextWithCancel(timeout time.Duration) (context.Context, context.CancelFunc) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) - return ctx, cancel -} - -func (bc *BabylonController) QueryBlock(height uint64) (*types.BlockInfo, error) { - res, err := bc.bbnClient.QueryClient.Block(height) - if err != nil { - return nil, fmt.Errorf("failed to query indexed block at height %v: %w", height, err) - } - - return &types.BlockInfo{ - Height: height, - Hash: res.Block.AppHash, - Finalized: res.Block.Finalized, - }, nil -} - -func (bc *BabylonController) QueryActivatedHeight() (uint64, error) { - res, err := bc.bbnClient.QueryClient.ActivatedHeight() - if err != nil { - return 0, fmt.Errorf("failed to query activated height: %w", err) - } - - return res.Height, nil -} - -func (bc *BabylonController) QueryBestBlock() (*types.BlockInfo, error) { - blocks, err := bc.queryLatestBlocks(nil, 1, finalitytypes.QueriedBlockStatus_ANY, true) - if err != nil || len(blocks) != 1 { - // try query comet block if the index block query is not available - return bc.queryCometBestBlock() - } - - return blocks[0], nil -} - -func (bc *BabylonController) queryCometBestBlock() (*types.BlockInfo, error) { - ctx, cancel := getContextWithCancel(bc.cfg.Timeout) - // this will return 20 items at max in the descending order (highest first) - chainInfo, err := bc.bbnClient.RPCClient.BlockchainInfo(ctx, 0, 0) - defer cancel() - - if err != nil { - return nil, err - } - - // Returning response directly, if header with specified number did not exist - // at request will contain nil header - return &types.BlockInfo{ - Height: uint64(chainInfo.BlockMetas[0].Header.Height), - Hash: chainInfo.BlockMetas[0].Header.AppHash, - }, nil -} - func (bc *BabylonController) Close() error { if !bc.bbnClient.IsRunning() { return nil @@ -564,3 +402,20 @@ func (bc *BabylonController) InsertSpvProofs(submitter string, proofs []*btcctyp return res, nil } + +// RegisterConsumerChain registers a consumer chain via a MsgRegisterChain to Babylon +func (bc *BabylonController) RegisterConsumerChain(id, name, description string) (*types.TxResponse, error) { + msg := &bsctypes.MsgRegisterConsumer{ + Signer: bc.mustGetTxSigner(), + ConsumerId: id, + ConsumerName: name, + ConsumerDescription: description, + } + + res, err := bc.reliablySendMsg(msg, emptyErrs, emptyErrs) + if err != nil { + return nil, err + } + + return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, nil +} diff --git a/clientcontroller/babylon_consumer.go b/clientcontroller/babylon_consumer.go new file mode 100644 index 00000000..248fcd8b --- /dev/null +++ b/clientcontroller/babylon_consumer.go @@ -0,0 +1,282 @@ +package clientcontroller + +import ( + "context" + "fmt" + "time" + + sdkErr "cosmossdk.io/errors" + bbnclient "github.com/babylonchain/babylon/client/client" + bbntypes "github.com/babylonchain/babylon/types" + btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types" + finalitytypes "github.com/babylonchain/babylon/x/finality/types" + fpcfg "github.com/babylonchain/finality-provider/finality-provider/config" + "github.com/babylonchain/finality-provider/types" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/chaincfg" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkquery "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/relayer/v2/relayer/provider" + "go.uber.org/zap" +) + +var _ ConsumerController = &BabylonConsumerController{} + +type BabylonConsumerController struct { + bbnClient *bbnclient.Client + cfg *fpcfg.BBNConfig + btcParams *chaincfg.Params + logger *zap.Logger +} + +func NewBabylonConsumerController( + cfg *fpcfg.BBNConfig, + btcParams *chaincfg.Params, + logger *zap.Logger, +) (*BabylonConsumerController, error) { + + bbnConfig := fpcfg.BBNConfigToBabylonConfig(cfg) + + if err := bbnConfig.Validate(); err != nil { + return nil, fmt.Errorf("invalid config for Babylon client: %w", err) + } + + bc, err := bbnclient.New( + &bbnConfig, + logger, + ) + if err != nil { + return nil, fmt.Errorf("failed to create Babylon client: %w", err) + } + + return &BabylonConsumerController{ + bc, + cfg, + btcParams, + logger, + }, nil +} + +func (bc *BabylonConsumerController) mustGetTxSigner() string { + signer := bc.GetKeyAddress() + prefix := bc.cfg.AccountPrefix + return sdk.MustBech32ifyAddressBytes(prefix, signer) +} + +func (bc *BabylonConsumerController) GetKeyAddress() sdk.AccAddress { + // get key address, retrieves address based on key name which is configured in + // cfg *stakercfg.BBNConfig. If this fails, it means we have misconfiguration problem + // and we should panic. + // This is checked at the start of BabylonConsumerController, so if it fails something is really wrong + + keyRec, err := bc.bbnClient.GetKeyring().Key(bc.cfg.Key) + + if err != nil { + panic(fmt.Sprintf("Failed to get key address: %s", err)) + } + + addr, err := keyRec.GetAddress() + + if err != nil { + panic(fmt.Sprintf("Failed to get key address: %s", err)) + } + + return addr +} + +func (bc *BabylonConsumerController) reliablySendMsg(msg sdk.Msg, expectedErrs []*sdkErr.Error, unrecoverableErrs []*sdkErr.Error) (*provider.RelayerTxResponse, error) { + return bc.reliablySendMsgs([]sdk.Msg{msg}, expectedErrs, unrecoverableErrs) +} + +func (bc *BabylonConsumerController) reliablySendMsgs(msgs []sdk.Msg, expectedErrs []*sdkErr.Error, unrecoverableErrs []*sdkErr.Error) (*provider.RelayerTxResponse, error) { + return bc.bbnClient.ReliablySendMsgs( + context.Background(), + msgs, + expectedErrs, + unrecoverableErrs, + ) +} + +// SubmitFinalitySig submits the finality signature via a MsgAddVote to Babylon +func (bc *BabylonConsumerController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) { + msg := &finalitytypes.MsgAddFinalitySig{ + Signer: bc.mustGetTxSigner(), + FpBtcPk: bbntypes.NewBIP340PubKeyFromBTCPK(fpPk), + BlockHeight: blockHeight, + BlockAppHash: blockHash, + FinalitySig: bbntypes.NewSchnorrEOTSSigFromModNScalar(sig), + } + + unrecoverableErrs := []*sdkErr.Error{ + finalitytypes.ErrInvalidFinalitySig, + finalitytypes.ErrPubRandNotFound, + btcstakingtypes.ErrFpAlreadySlashed, + } + + res, err := bc.reliablySendMsg(msg, emptyErrs, unrecoverableErrs) + if err != nil { + return nil, err + } + + return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, nil +} + +// SubmitBatchFinalitySigs submits a batch of finality signatures to Babylon +func (bc *BabylonConsumerController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, blocks []*types.BlockInfo, sigs []*btcec.ModNScalar) (*types.TxResponse, error) { + if len(blocks) != len(sigs) { + return nil, fmt.Errorf("the number of blocks %v should match the number of finality signatures %v", len(blocks), len(sigs)) + } + + msgs := make([]sdk.Msg, 0, len(blocks)) + for i, b := range blocks { + msg := &finalitytypes.MsgAddFinalitySig{ + Signer: bc.mustGetTxSigner(), + FpBtcPk: bbntypes.NewBIP340PubKeyFromBTCPK(fpPk), + BlockHeight: b.Height, + BlockAppHash: b.Hash, + FinalitySig: bbntypes.NewSchnorrEOTSSigFromModNScalar(sigs[i]), + } + msgs = append(msgs, msg) + } + + unrecoverableErrs := []*sdkErr.Error{ + finalitytypes.ErrInvalidFinalitySig, + finalitytypes.ErrPubRandNotFound, + btcstakingtypes.ErrFpAlreadySlashed, + } + + res, err := bc.reliablySendMsgs(msgs, emptyErrs, unrecoverableErrs) + if err != nil { + return nil, err + } + + return &types.TxResponse{TxHash: res.TxHash, Events: res.Events}, nil +} + +// QueryFinalityProviderVotingPower queries the voting power of the finality provider at a given height +func (bc *BabylonConsumerController) QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) { + res, err := bc.bbnClient.QueryClient.FinalityProviderPowerAtHeight( + bbntypes.NewBIP340PubKeyFromBTCPK(fpPk).MarshalHex(), + blockHeight, + ) + if err != nil { + return 0, fmt.Errorf("failed to query the finality provider's voting power at height %d: %w", blockHeight, err) + } + + return res.VotingPower, nil +} + +func (bc *BabylonConsumerController) QueryLatestFinalizedBlock() (*types.BlockInfo, error) { + blocks, err := bc.queryLatestBlocks(nil, 1, finalitytypes.QueriedBlockStatus_FINALIZED, true) + if blocks == nil { + return nil, err + } + return blocks[0], err +} + +func (bc *BabylonConsumerController) QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) { + if endHeight < startHeight { + return nil, fmt.Errorf("the startHeight %v should not be higher than the endHeight %v", startHeight, endHeight) + } + count := endHeight - startHeight + 1 + if count > limit { + count = limit + } + return bc.queryLatestBlocks(sdk.Uint64ToBigEndian(startHeight), count, finalitytypes.QueriedBlockStatus_ANY, false) +} + +func (bc *BabylonConsumerController) queryLatestBlocks(startKey []byte, count uint64, status finalitytypes.QueriedBlockStatus, reverse bool) ([]*types.BlockInfo, error) { + var blocks []*types.BlockInfo + pagination := &sdkquery.PageRequest{ + Limit: count, + Reverse: reverse, + Key: startKey, + } + + res, err := bc.bbnClient.QueryClient.ListBlocks(status, pagination) + if err != nil { + return nil, fmt.Errorf("failed to query finalized blocks: %v", err) + } + + for _, b := range res.Blocks { + ib := &types.BlockInfo{ + Height: b.Height, + Hash: b.AppHash, + } + blocks = append(blocks, ib) + } + + return blocks, nil +} + +func getContextWithCancel(timeout time.Duration) (context.Context, context.CancelFunc) { + ctx, cancel := context.WithTimeout(context.Background(), timeout) + return ctx, cancel +} + +func (bc *BabylonConsumerController) QueryBlock(height uint64) (*types.BlockInfo, error) { + res, err := bc.bbnClient.QueryClient.Block(height) + if err != nil { + return nil, fmt.Errorf("failed to query indexed block at height %v: %w", height, err) + } + + return &types.BlockInfo{ + Height: height, + Hash: res.Block.AppHash, + }, nil +} + +func (bc *BabylonConsumerController) QueryIsBlockFinalized(height uint64) (bool, error) { + res, err := bc.bbnClient.QueryClient.Block(height) + if err != nil { + return false, fmt.Errorf("failed to query indexed block at height %v: %w", height, err) + } + + return res.Block.Finalized, nil +} + +func (bc *BabylonConsumerController) QueryActivatedHeight() (uint64, error) { + res, err := bc.bbnClient.QueryClient.ActivatedHeight() + if err != nil { + return 0, fmt.Errorf("failed to query activated height: %w", err) + } + + return res.Height, nil +} + +func (bc *BabylonConsumerController) QueryLatestBlockHeight() (uint64, error) { + blocks, err := bc.queryLatestBlocks(nil, 1, finalitytypes.QueriedBlockStatus_ANY, true) + if err != nil || len(blocks) != 1 { + // try query comet block if the index block query is not available + block, err := bc.queryCometBestBlock() + return block.Height, err + } + + return blocks[0].Height, nil +} + +func (bc *BabylonConsumerController) queryCometBestBlock() (*types.BlockInfo, error) { + ctx, cancel := getContextWithCancel(bc.cfg.Timeout) + // this will return 20 items at max in the descending order (highest first) + chainInfo, err := bc.bbnClient.RPCClient.BlockchainInfo(ctx, 0, 0) + defer cancel() + + if err != nil { + return nil, err + } + + // Returning response directly, if header with specified number did not exist + // at request will contain nil header + return &types.BlockInfo{ + Height: uint64(chainInfo.BlockMetas[0].Header.Height), + Hash: chainInfo.BlockMetas[0].Header.AppHash, + }, nil +} + +func (bc *BabylonConsumerController) Close() error { + if !bc.bbnClient.IsRunning() { + return nil + } + + return bc.bbnClient.Stop() +} diff --git a/clientcontroller/evm_consumer.go b/clientcontroller/evm_consumer.go new file mode 100644 index 00000000..1bad8d47 --- /dev/null +++ b/clientcontroller/evm_consumer.go @@ -0,0 +1,151 @@ +package clientcontroller + +import ( + "fmt" + + finalitytypes "github.com/babylonchain/babylon/x/finality/types" + fpcfg "github.com/babylonchain/finality-provider/finality-provider/config" + "github.com/babylonchain/finality-provider/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/rpc" + + "github.com/btcsuite/btcd/btcec/v2" + "go.uber.org/zap" +) + +// TODO: rename the file name, class name and etc +// This is not a simple EVM chain. It's a OP Stack L2 chain, which has many +// implications. So we should rename to sth like e.g. OPStackL2Consumer +// This helps distinguish from pure EVM sidechains e.g. Binance Chain +var _ ConsumerController = &EVMConsumerController{} + +type EVMConsumerController struct { + evmClient *rpc.Client + cfg *fpcfg.EVMConfig + logger *zap.Logger +} + +func NewEVMConsumerController( + evmCfg *fpcfg.EVMConfig, + logger *zap.Logger, +) (*EVMConsumerController, error) { + if err := evmCfg.Validate(); err != nil { + return nil, fmt.Errorf("invalid config for EVM RPC client: %w", err) + } + ec, err := rpc.Dial(evmCfg.RPCAddr) + if err != nil { + return nil, fmt.Errorf("failed to connect to the EVM RPC server %s: %w", evmCfg.RPCAddr, err) + } + return &EVMConsumerController{ + ec, + evmCfg, + logger, + }, nil +} + +// SubmitFinalitySig submits the finality signature +func (ec *EVMConsumerController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) { + + return &types.TxResponse{TxHash: "", Events: nil}, nil +} + +// SubmitBatchFinalitySigs submits a batch of finality signatures to Babylon +func (ec *EVMConsumerController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, blocks []*types.BlockInfo, sigs []*btcec.ModNScalar) (*types.TxResponse, error) { + if len(blocks) != len(sigs) { + return nil, fmt.Errorf("the number of blocks %v should match the number of finality signatures %v", len(blocks), len(sigs)) + } + + return &types.TxResponse{TxHash: "", Events: nil}, nil +} + +// QueryFinalityProviderVotingPower queries the voting power of the finality provider at a given height +func (ec *EVMConsumerController) QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) { + /* TODO: implement + + latest_committed_l2_height = read `latestBlockNumber()` from the L1 L2OutputOracle contract and return the result + + if blockHeight > latest_committed_l2_height: + + query the VP from the L1 oracle contract using "latest" as the block tag + + else: + + 1. query the L1 event `emit OutputProposed(_outputRoot, nextOutputIndex(), _l2BlockNumber, block.timestamp, block.number);` + to find the first event where the `_l2BlockNumber` >= blockHeight + 2. get the block.number from the event + 3. query the VP from the L1 oracle contract using `block.number` as the block tag + + */ + + return 0, nil +} + +func (ec *EVMConsumerController) QueryLatestFinalizedBlock() (*types.BlockInfo, error) { + return &types.BlockInfo{ + Height: 0, + Hash: nil, + }, nil +} + +func (ec *EVMConsumerController) QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) { + + return ec.queryLatestBlocks(sdk.Uint64ToBigEndian(startHeight), 0, finalitytypes.QueriedBlockStatus_ANY, false) +} + +func (ec *EVMConsumerController) queryLatestBlocks(startKey []byte, count uint64, status finalitytypes.QueriedBlockStatus, reverse bool) ([]*types.BlockInfo, error) { + var blocks []*types.BlockInfo + + return blocks, nil +} + +func (ec *EVMConsumerController) QueryBlock(height uint64) (*types.BlockInfo, error) { + + return &types.BlockInfo{ + Height: height, + Hash: nil, + }, nil +} + +func (ec *EVMConsumerController) QueryIsBlockFinalized(height uint64) (bool, error) { + /* TODO: implement + 1. get the latest finalized block number from `latestBlockNumber()` in the L1 L2OutputOracle contract + 2. compare the block number with `height` + */ + return false, nil +} + +func (ec *EVMConsumerController) QueryActivatedHeight() (uint64, error) { + /* TODO: implement + + oracle_event = query the event in the L1 oracle contract where the FP's voting power is firstly set + + l1_activated_height = get the L1 block number from the `oracle_event` + + output_event = query the L1 event `emit OutputProposed(_outputRoot, nextOutputIndex(), _l2BlockNumber, block.timestamp, block.number);` + to find the first event where the `block.number` >= l1_activated_height + + if output_event == nil: + + read `nextBlockNumber()` from the L1 L2OutputOracle contract and return the result + + else: + + return output_event._l2BlockNumber + + */ + + return 0, nil +} + +func (ec *EVMConsumerController) QueryLatestBlockHeight() (uint64, error) { + /* TODO: implement + get the latest L2 block number from a RPC call + */ + + return uint64(0), nil +} + +func (ec *EVMConsumerController) Close() error { + ec.evmClient.Close() + return nil +} diff --git a/clientcontroller/interface.go b/clientcontroller/interface.go index f6597c21..750b2f1d 100644 --- a/clientcontroller/interface.go +++ b/clientcontroller/interface.go @@ -5,7 +5,6 @@ import ( "cosmossdk.io/math" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/chaincfg" "go.uber.org/zap" fpcfg "github.com/babylonchain/finality-provider/finality-provider/config" @@ -13,7 +12,8 @@ import ( ) const ( - babylonConsumerChainName = "babylon" + BabylonConsumerChainName = "babylon" + EVMConsumerChainName = "evm" ) type ClientController interface { @@ -21,6 +21,7 @@ type ClientController interface { // RegisterFinalityProvider registers a finality provider to the consumer chain // it returns tx hash and error RegisterFinalityProvider( + chainID string, chainPk []byte, fpPk *btcec.PublicKey, pop []byte, @@ -29,6 +30,30 @@ type ClientController interface { masterPubRand string, ) (*types.TxResponse, uint64, error) + // Note: the following queries are only for PoC + + // QueryFinalityProviderSlashed queries if the finality provider is slashed + // Note: if the FP wants to get the information from the consumer chain directly, they should add this interface + // function in ConsumerController. (https://github.com/babylonchain/finality-provider/pull/335#discussion_r1606175344) + QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) (bool, error) + + // QueryLastFinalizedEpoch returns the last finalised epoch of Babylon + QueryLastFinalizedEpoch() (uint64, error) + + Close() error +} + +func NewClientController(config *fpcfg.Config, logger *zap.Logger) (ClientController, error) { + cc, err := NewBabylonController(config.BabylonConfig, &config.BTCNetParams, logger) + if err != nil { + return nil, fmt.Errorf("failed to create Babylon rpc client: %w", err) + } + + return cc, err +} + +type ConsumerController interface { + // SubmitFinalitySig submits the finality signature to the consumer chain SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) @@ -40,45 +65,48 @@ type ClientController interface { // QueryFinalityProviderVotingPower queries the voting power of the finality provider at a given height QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) - // QueryFinalityProviderSlashed queries if the finality provider is slashed - QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) (bool, error) - - // QueryLatestFinalizedBlocks returns the latest finalized blocks - QueryLatestFinalizedBlocks(count uint64) ([]*types.BlockInfo, error) + // QueryLatestFinalizedBlock returns the latest finalized block + // Note: nil will be returned if the finalized block does not exist + QueryLatestFinalizedBlock() (*types.BlockInfo, error) // QueryBlock queries the block at the given height QueryBlock(height uint64) (*types.BlockInfo, error) + // QueryIsBlockFinalized queries if the block at the given height is finalized + QueryIsBlockFinalized(height uint64) (bool, error) + // QueryBlocks returns a list of blocks from startHeight to endHeight QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) - // QueryBestBlock queries the tip block of the consumer chain - QueryBestBlock() (*types.BlockInfo, error) + // QueryLatestBlockHeight queries the tip block height of the consumer chain + QueryLatestBlockHeight() (uint64, error) // QueryActivatedHeight returns the activated height of the consumer chain // error will be returned if the consumer chain has not been activated QueryActivatedHeight() (uint64, error) - // QueryLastFinalizedEpoch returns the last finalised epoch of Babylon - QueryLastFinalizedEpoch() (uint64, error) - Close() error } -func NewClientController(chainName string, bbnConfig *fpcfg.BBNConfig, netParams *chaincfg.Params, logger *zap.Logger) (ClientController, error) { +func NewConsumerController(config *fpcfg.Config, logger *zap.Logger) (ConsumerController, error) { var ( - cc ClientController + ccc ConsumerController err error ) - switch chainName { - case babylonConsumerChainName: - cc, err = NewBabylonController(bbnConfig, netParams, logger) + switch config.ChainName { + case BabylonConsumerChainName: + ccc, err = NewBabylonConsumerController(config.BabylonConfig, &config.BTCNetParams, logger) if err != nil { return nil, fmt.Errorf("failed to create Babylon rpc client: %w", err) } + case EVMConsumerChainName: + ccc, err = NewEVMConsumerController(config.EVMConfig, logger) + if err != nil { + return nil, fmt.Errorf("failed to create EVM rpc client: %w", err) + } default: return nil, fmt.Errorf("unsupported consumer chain") } - return cc, err + return ccc, err } diff --git a/eots-verifier/Makefile b/eots-verifier/Makefile new file mode 100644 index 00000000..ba6b8607 --- /dev/null +++ b/eots-verifier/Makefile @@ -0,0 +1,10 @@ +############################################################################### +### Protobuf ### +############################################################################### + +proto-all: proto-gen + +proto-gen: + ./proto/scripts/protocgen.sh + +.PHONY: proto-gen \ No newline at end of file diff --git a/eots-verifier/cmd/daemon/flags.go b/eots-verifier/cmd/daemon/flags.go new file mode 100644 index 00000000..b7eb2e36 --- /dev/null +++ b/eots-verifier/cmd/daemon/flags.go @@ -0,0 +1,7 @@ +package daemon + +const ( + homeFlag = "home" + forceFlag = "force" + rpcListenerFlag = "rpc-listener" +) diff --git a/eots-verifier/cmd/daemon/init.go b/eots-verifier/cmd/daemon/init.go new file mode 100644 index 00000000..0c7fea1a --- /dev/null +++ b/eots-verifier/cmd/daemon/init.go @@ -0,0 +1,52 @@ +package daemon + +import ( + "fmt" + "path/filepath" + + "github.com/babylonchain/finality-provider/eots-verifier/config" + "github.com/babylonchain/finality-provider/util" + "github.com/jessevdk/go-flags" + "github.com/urfave/cli/v2" +) + +var InitCommand = &cli.Command{ + Name: "init", + Usage: "Initialize the eots-verifier home directory.", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: homeFlag, + Usage: "Path to where the home directory will be initialized", + Value: config.DefaultDir, + }, + &cli.BoolFlag{ + Name: forceFlag, + Usage: "Override existing configuration", + Required: false, + }, + }, + Action: initHome, +} + +func initHome(c *cli.Context) error { + homePath, err := filepath.Abs(c.String(homeFlag)) + if err != nil { + return err + } + // Create home directory + homePath = util.CleanAndExpandPath(homePath) + force := c.Bool(forceFlag) + + if util.FileExists(homePath) && !force { + return fmt.Errorf("home path %s already exists", homePath) + } + + if err := util.MakeDirectory(homePath); err != nil { + return err + } + + defaultConfig := config.DefaultConfig() + fileParser := flags.NewParser(defaultConfig, flags.Default) + + return flags.NewIniParser(fileParser).WriteFile(config.ConfigFile(homePath), flags.IniIncludeComments|flags.IniIncludeDefaults) +} diff --git a/eots-verifier/cmd/daemon/start.go b/eots-verifier/cmd/daemon/start.go new file mode 100644 index 00000000..d8d3f29d --- /dev/null +++ b/eots-verifier/cmd/daemon/start.go @@ -0,0 +1,69 @@ +package daemon + +import ( + "fmt" + "net" + "path/filepath" + + "github.com/babylonchain/finality-provider/eots-verifier/config" + "github.com/babylonchain/finality-provider/eots-verifier/service" + "github.com/babylonchain/finality-provider/log" + "github.com/babylonchain/finality-provider/util" + "github.com/lightningnetwork/lnd/signal" + "github.com/urfave/cli/v2" +) + +var StartCommand = &cli.Command{ + Name: "start", + Usage: "Start EOTS Verifier Daemon.", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: homeFlag, + Usage: "The path to the eots-verifier home directory", + Value: config.DefaultDir, + }, + &cli.StringFlag{ + Name: rpcListenerFlag, + Usage: "The address that the RPC server listens to", + }, + }, + Action: startFn, +} + +func startFn(ctx *cli.Context) error { + path, err := filepath.Abs(ctx.String(homeFlag)) + if err != nil { + return fmt.Errorf("failed to load home flag: %w", err) + } + homePath := util.CleanAndExpandPath(path) + cfg, err := config.LoadConfig(homePath) + if err != nil { + return fmt.Errorf("failed to load config at %s: %w", homePath, err) + } + + rpcListener := ctx.String(rpcListenerFlag) + if rpcListener != "" { + _, err := net.ResolveTCPAddr("tcp", rpcListener) + if err != nil { + return fmt.Errorf("invalid RPC listener address %s, %w", rpcListener, err) + } + cfg.RpcListener = rpcListener + } + + logger, err := log.NewRootLoggerWithFile(config.LogFile(homePath), cfg.LogLevel) + if err != nil { + return fmt.Errorf("failed to load the logger") + } + + shutdown, err := signal.Intercept() + if err != nil { + return err + } + + server, err := service.NewServer(ctx.Context, logger, cfg, shutdown) + if err != nil { + return err + } + + return server.Run() +} diff --git a/eots-verifier/cmd/main.go b/eots-verifier/cmd/main.go new file mode 100644 index 00000000..d65f769e --- /dev/null +++ b/eots-verifier/cmd/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "os" + + "github.com/babylonchain/finality-provider/eots-verifier/cmd/daemon" + "github.com/urfave/cli/v2" +) + +func main() { + app := cli.NewApp() + app.Name = "eots-verifier" + app.Usage = "EOTS Verifier Daemon (eots-verifier)" + app.Commands = append(app.Commands, daemon.StartCommand, daemon.InitCommand) + + if err := app.Run(os.Args); err != nil { + fmt.Fprintf(os.Stderr, "[eots-verifier] %v\n", err) + os.Exit(1) + } +} diff --git a/eots-verifier/config/config.go b/eots-verifier/config/config.go new file mode 100644 index 00000000..36ba6972 --- /dev/null +++ b/eots-verifier/config/config.go @@ -0,0 +1,91 @@ +package config + +import ( + "fmt" + "net" + "path/filepath" + + "github.com/babylonchain/finality-provider/util" + "github.com/btcsuite/btcd/btcutil" + "github.com/jessevdk/go-flags" +) + +const ( + defaultLogLevel = "debug" + defaultLogFilename = "eots-verifier.log" + defaultConfigFileName = "eots-verifier.conf" +) + +var ( + // DefaultDir the default EOTS verifier home directory: + // C:\Users\\AppData\Local\ on Windows + // ~/.eots-verifier on Linux + // ~/Library/Application Support/Eots-verifier on MacOS + DefaultDir = btcutil.AppDataDir("eots-verifier", false) +) + +// Config is used to configure the EOTS verifier +type Config struct { + LogLevel string `long:"loglevel" description:"logging level"` + RpcListener string `long:"rpclistener" description:"the listener for RPC connections, e.g., 127.0.0.1:1234"` + BabylonRPC string `long:"babylon_rpc" description:"connect to the Babylon RPC service"` + EotsAggRPC string `long:"eots_agg_rpc" description:"connect to the EOTS Aggregator RPC service"` + ConsumerRPC string `long:"consumer_rpc" description:"connect to the Consumer RPC service"` + ChainID string +} + +// LoadConfig loads the `conf.toml` config file from a given path +func LoadConfig(homePath string) (*Config, error) { + cfgFile := ConfigFile(homePath) + if !util.FileExists(cfgFile) { + return nil, fmt.Errorf("specified config file does not exist in %s", cfgFile) + } + + var cfg Config + fileParser := flags.NewParser(&cfg, flags.Default) + err := flags.NewIniParser(fileParser).ParseFile(cfgFile) + if err != nil { + return nil, err + } + + if err := cfg.Validate(); err != nil { + return nil, err + } + + return &cfg, nil +} + +func (cfg *Config) Validate() error { + _, err := net.ResolveTCPAddr("tcp", cfg.RpcListener) + if err != nil { + return fmt.Errorf("invalid RPC listener address %s, %w", cfg.RpcListener, err) + } + + if cfg.ConsumerRPC == "" || cfg.EotsAggRPC == "" || cfg.BabylonRPC == "" { + return fmt.Errorf("missing needed RPC URL for the verifier") + } + + return nil +} + +func ConfigFile(homePath string) string { + return filepath.Join(homePath, defaultConfigFileName) +} + +func LogFile(homePath string) string { + return filepath.Join(homePath, defaultLogFilename) +} + +func DefaultConfig() *Config { + return DefaultConfigWithHomePath(DefaultDir) +} + +func DefaultConfigWithHomePath(homePath string) *Config { + cfg := &Config{ + LogLevel: defaultLogLevel, + } + if err := cfg.Validate(); err != nil { + panic(err) + } + return cfg +} diff --git a/eots-verifier/proto/buf.gen.yaml b/eots-verifier/proto/buf.gen.yaml new file mode 100644 index 00000000..7461833c --- /dev/null +++ b/eots-verifier/proto/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - plugin: go + out: . + opt: paths=source_relative + - name: go-grpc + out: . + opt: paths=source_relative diff --git a/eots-verifier/proto/buf.lock b/eots-verifier/proto/buf.lock new file mode 100644 index 00000000..c91b5810 --- /dev/null +++ b/eots-verifier/proto/buf.lock @@ -0,0 +1,2 @@ +# Generated by buf. DO NOT EDIT. +version: v1 diff --git a/eots-verifier/proto/buf.yaml b/eots-verifier/proto/buf.yaml new file mode 100644 index 00000000..c96d1a4f --- /dev/null +++ b/eots-verifier/proto/buf.yaml @@ -0,0 +1,24 @@ +version: v1 +name: buf.build/babylonchain/eots-verifier +deps: +breaking: + use: + - FILE +lint: + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + - COMMENT_MESSAGE + - COMMENT_ENUM_VALUE + - COMMENT_ENUM + - COMMENT_RPC + - COMMENT_ONEOF + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - RPC_REQUEST_STANDARD_NAME + - ENUM_VALUE_PREFIX + - ENUM_ZERO_VALUE_SUFFIX diff --git a/eots-verifier/proto/eots_verifier.pb.go b/eots-verifier/proto/eots_verifier.pb.go new file mode 100644 index 00000000..f58b5663 --- /dev/null +++ b/eots-verifier/proto/eots_verifier.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc (unknown) +// source: eots_verifier.proto + +package proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type VerifyFinalitySigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tx_hash is that the user wants to confirm fast finality + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (x *VerifyFinalitySigRequest) Reset() { + *x = VerifyFinalitySigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_eots_verifier_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyFinalitySigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyFinalitySigRequest) ProtoMessage() {} + +func (x *VerifyFinalitySigRequest) ProtoReflect() protoreflect.Message { + mi := &file_eots_verifier_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyFinalitySigRequest.ProtoReflect.Descriptor instead. +func (*VerifyFinalitySigRequest) Descriptor() ([]byte, []int) { + return file_eots_verifier_proto_rawDescGZIP(), []int{0} +} + +func (x *VerifyFinalitySigRequest) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +type VerifyFinalitySigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // result - true is valid, and false is invalid + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *VerifyFinalitySigResponse) Reset() { + *x = VerifyFinalitySigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_eots_verifier_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyFinalitySigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyFinalitySigResponse) ProtoMessage() {} + +func (x *VerifyFinalitySigResponse) ProtoReflect() protoreflect.Message { + mi := &file_eots_verifier_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyFinalitySigResponse.ProtoReflect.Descriptor instead. +func (*VerifyFinalitySigResponse) Descriptor() ([]byte, []int) { + return file_eots_verifier_proto_rawDescGZIP(), []int{1} +} + +func (x *VerifyFinalitySigResponse) GetResult() bool { + if x != nil { + return x.Result + } + return false +} + +var File_eots_verifier_proto protoreflect.FileDescriptor + +var file_eots_verifier_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x65, 0x6f, 0x74, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x18, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x22, 0x33, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0x66, 0x0a, 0x0c, 0x45, 0x4f, 0x54, 0x53, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x12, 0x1f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x53, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3f, + 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x62, + 0x79, 0x6c, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x2d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x65, 0x6f, 0x74, 0x73, + 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_eots_verifier_proto_rawDescOnce sync.Once + file_eots_verifier_proto_rawDescData = file_eots_verifier_proto_rawDesc +) + +func file_eots_verifier_proto_rawDescGZIP() []byte { + file_eots_verifier_proto_rawDescOnce.Do(func() { + file_eots_verifier_proto_rawDescData = protoimpl.X.CompressGZIP(file_eots_verifier_proto_rawDescData) + }) + return file_eots_verifier_proto_rawDescData +} + +var file_eots_verifier_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_eots_verifier_proto_goTypes = []interface{}{ + (*VerifyFinalitySigRequest)(nil), // 0: proto.VerifyFinalitySigRequest + (*VerifyFinalitySigResponse)(nil), // 1: proto.VerifyFinalitySigResponse +} +var file_eots_verifier_proto_depIdxs = []int32{ + 0, // 0: proto.EOTSVerifier.VerifyFinalitySig:input_type -> proto.VerifyFinalitySigRequest + 1, // 1: proto.EOTSVerifier.VerifyFinalitySig:output_type -> proto.VerifyFinalitySigResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_eots_verifier_proto_init() } +func file_eots_verifier_proto_init() { + if File_eots_verifier_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_eots_verifier_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VerifyFinalitySigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_eots_verifier_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VerifyFinalitySigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_eots_verifier_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_eots_verifier_proto_goTypes, + DependencyIndexes: file_eots_verifier_proto_depIdxs, + MessageInfos: file_eots_verifier_proto_msgTypes, + }.Build() + File_eots_verifier_proto = out.File + file_eots_verifier_proto_rawDesc = nil + file_eots_verifier_proto_goTypes = nil + file_eots_verifier_proto_depIdxs = nil +} diff --git a/eots-verifier/proto/eots_verifier.proto b/eots-verifier/proto/eots_verifier.proto new file mode 100644 index 00000000..197a6f74 --- /dev/null +++ b/eots-verifier/proto/eots_verifier.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package proto; + +option go_package = "github.com/babylonchain/finality-provider/eots-verifier/proto"; + +service EOTSVerifier { + // VerifyFinalitySig verifies that the finality signature is valid + rpc VerifyFinalitySig (VerifyFinalitySigRequest) + returns (VerifyFinalitySigResponse); +} + +message VerifyFinalitySigRequest { + // tx_hash is that the user wants to confirm fast finality + string tx_hash = 1; + } + + message VerifyFinalitySigResponse { + // result - true is valid, and false is invalid + bool result = 1; + } \ No newline at end of file diff --git a/eots-verifier/proto/eots_verifier_grpc.pb.go b/eots-verifier/proto/eots_verifier_grpc.pb.go new file mode 100644 index 00000000..2450827c --- /dev/null +++ b/eots-verifier/proto/eots_verifier_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: eots_verifier.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + EOTSVerifier_VerifyFinalitySig_FullMethodName = "/proto.EOTSVerifier/VerifyFinalitySig" +) + +// EOTSVerifierClient is the client API for EOTSVerifier service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type EOTSVerifierClient interface { + // VerifyFinalitySig verifies that the finality signature is valid + VerifyFinalitySig(ctx context.Context, in *VerifyFinalitySigRequest, opts ...grpc.CallOption) (*VerifyFinalitySigResponse, error) +} + +type eOTSVerifierClient struct { + cc grpc.ClientConnInterface +} + +func NewEOTSVerifierClient(cc grpc.ClientConnInterface) EOTSVerifierClient { + return &eOTSVerifierClient{cc} +} + +func (c *eOTSVerifierClient) VerifyFinalitySig(ctx context.Context, in *VerifyFinalitySigRequest, opts ...grpc.CallOption) (*VerifyFinalitySigResponse, error) { + out := new(VerifyFinalitySigResponse) + err := c.cc.Invoke(ctx, EOTSVerifier_VerifyFinalitySig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EOTSVerifierServer is the server API for EOTSVerifier service. +// All implementations must embed UnimplementedEOTSVerifierServer +// for forward compatibility +type EOTSVerifierServer interface { + // VerifyFinalitySig verifies that the finality signature is valid + VerifyFinalitySig(context.Context, *VerifyFinalitySigRequest) (*VerifyFinalitySigResponse, error) + mustEmbedUnimplementedEOTSVerifierServer() +} + +// UnimplementedEOTSVerifierServer must be embedded to have forward compatible implementations. +type UnimplementedEOTSVerifierServer struct { +} + +func (UnimplementedEOTSVerifierServer) VerifyFinalitySig(context.Context, *VerifyFinalitySigRequest) (*VerifyFinalitySigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyFinalitySig not implemented") +} +func (UnimplementedEOTSVerifierServer) mustEmbedUnimplementedEOTSVerifierServer() {} + +// UnsafeEOTSVerifierServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EOTSVerifierServer will +// result in compilation errors. +type UnsafeEOTSVerifierServer interface { + mustEmbedUnimplementedEOTSVerifierServer() +} + +func RegisterEOTSVerifierServer(s grpc.ServiceRegistrar, srv EOTSVerifierServer) { + s.RegisterService(&EOTSVerifier_ServiceDesc, srv) +} + +func _EOTSVerifier_VerifyFinalitySig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyFinalitySigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EOTSVerifierServer).VerifyFinalitySig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EOTSVerifier_VerifyFinalitySig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EOTSVerifierServer).VerifyFinalitySig(ctx, req.(*VerifyFinalitySigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// EOTSVerifier_ServiceDesc is the grpc.ServiceDesc for EOTSVerifier service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EOTSVerifier_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.EOTSVerifier", + HandlerType: (*EOTSVerifierServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "VerifyFinalitySig", + Handler: _EOTSVerifier_VerifyFinalitySig_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "eots_verifier.proto", +} diff --git a/eots-verifier/proto/scripts/protocgen.sh b/eots-verifier/proto/scripts/protocgen.sh new file mode 100755 index 00000000..3fc6f6d1 --- /dev/null +++ b/eots-verifier/proto/scripts/protocgen.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -eo pipefail + +cd proto +buf dep update +buf generate . +cd .. + +go mod tidy -compat=1.20 diff --git a/eots-verifier/service/server.go b/eots-verifier/service/server.go new file mode 100644 index 00000000..4aa05546 --- /dev/null +++ b/eots-verifier/service/server.go @@ -0,0 +1,257 @@ +package service + +import ( + "context" + "encoding/hex" + "fmt" + "net" + "sync/atomic" + + bbnclient "github.com/babylonchain/babylon/client/client" + bbncfg "github.com/babylonchain/babylon/client/config" + "github.com/babylonchain/babylon/crypto/eots" + bsctypes "github.com/babylonchain/babylon/x/btcstkconsumer/types" + eotsservice "github.com/babylonchain/eots-aggregator/service" + eotsclient "github.com/babylonchain/eots-aggregator/service/client" + "github.com/babylonchain/finality-provider/eots-verifier/config" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/lightningnetwork/lnd/signal" + + "github.com/babylonchain/finality-provider/eots-verifier/proto" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/decred/dcrd/dcrec/secp256k1/v4" + "go.uber.org/zap" + "google.golang.org/grpc" +) + +// Server is the main RPC server for the EOTS verifier daemon. +// It handles gRPC incoming requests. +type Server struct { + started int32 + shutdown signal.Interceptor + quit chan struct{} + + proto.UnimplementedEOTSVerifierServer + + cfg *config.Config + logger *zap.Logger + + // Need to ensure that the consumer is an Ethereum client + consumerClient *ethclient.Client + bbnClient *bbnclient.Client + eotsAggClient *eotsclient.EotsAggregatorGRpcClient +} + +// NewServer creates a new RPC sever for EOTS verifier +func NewServer(ctx context.Context, logger *zap.Logger, cfg *config.Config, shutdown signal.Interceptor) (*Server, error) { + logger.Info("New EOTS verifier server") + + consumerRPC := cfg.ConsumerRPC + bbnRPC := cfg.BabylonRPC + eotsAggRPC := cfg.EotsAggRPC + + consumerClient, err := ethclient.DialContext(ctx, consumerRPC) + if err != nil { + logger.Error("Failed to dial consumer RPC", zap.Error(err)) + return nil, err + } + chainID, err := consumerClient.ChainID(ctx) + if err != nil { + logger.Error("Failed to fetch consumer ChainID", zap.Error(err)) + return nil, err + } + chainIDStr := chainID.Text(10) + logger.Info("Consumer", zap.String("ChainID", chainIDStr)) + cfg.ChainID = chainIDStr + + bbnConfig := bbncfg.DefaultBabylonConfig() + bbnConfig.RPCAddr = bbnRPC + // bbnClient don't share context + bbnClient, err := bbnclient.New(&bbnConfig, logger) + if err != nil { + logger.Error("Failed to dial Babylon RPC", zap.Error(err)) + return nil, err + } + // This is only for status checking + bbnStatus, err := bbnClient.RPCClient.Status(ctx) + if err != nil { + logger.Error("Failed to fetch Babylonchain status", zap.Error(err)) + return nil, err + } + logger.Info("Babylonchain", zap.Int64("LatestBlockHeight", bbnStatus.SyncInfo.LatestBlockHeight)) + + eotsAggClient, err := eotsclient.NewEotsAggregatorGRpcClient(ctx, eotsAggRPC) + if err != nil { + logger.Error("Failed to dial EOTS aggregator RPC", zap.Error(err)) + return nil, err + } + + return &Server{ + shutdown: shutdown, + quit: make(chan struct{}, 1), + + cfg: cfg, + logger: logger, + + consumerClient: consumerClient, + bbnClient: bbnClient, + eotsAggClient: eotsAggClient, + }, nil +} + +// Run runs the main EOTS verifier server loop until a signal is +// received to shut down the process. +func (s *Server) Run() error { + if atomic.AddInt32(&s.started, 1) != 1 { + return nil + } + + defer func() { + if s.consumerClient != nil { + s.consumerClient.Close() + } + if s.eotsAggClient != nil { + s.eotsAggClient.Close() + } + s.logger.Info("Shutdown complete") + }() + + listenAddr := s.cfg.RpcListener + listener, err := net.Listen("tcp", listenAddr) + if err != nil { + return fmt.Errorf("failed to listen on %s: %w", listenAddr, err) + } + defer listener.Close() + + grpcServer := grpc.NewServer() + defer grpcServer.GracefulStop() + + // Register the verifier RPC server. + proto.RegisterEOTSVerifierServer(grpcServer, s) + + go func() { + s.logger.Info("gRPC server listening", zap.String("address", listener.Addr().String())) + if err := grpcServer.Serve(listener); err != nil { + s.logger.Error("failed to serve gRPC server", zap.Error(err)) + } + }() + + s.logger.Info("EOTS Verifier Daemon is fully active!") + + // Block until a shutdown signal is received. + <-s.shutdown.ShutdownChannel() + + return nil +} + +// VerifyFinalitySig verifies that the finality signature is valid +func (s *Server) VerifyFinalitySig(ctx context.Context, req *proto.VerifyFinalitySigRequest) ( + *proto.VerifyFinalitySigResponse, error) { + txHash := common.HexToHash(req.TxHash) + txReceipt, err := s.consumerClient.TransactionReceipt(ctx, txHash) + if err != nil { + return nil, err + } + l2BlockNumber := txReceipt.BlockNumber + l2Block, err := s.consumerClient.BlockByNumber(ctx, l2BlockNumber) + if err != nil { + return nil, err + } + + parentHash := l2Block.ParentHash() + transactions := l2Block.Transactions() + var txList []byte + for _, tx := range transactions { + txBytes, err := tx.MarshalBinary() + if err != nil { + s.logger.Error("failed to encode the transaction.") + continue + } + txList = append(txList, txBytes...) + } + // sign (parent_hash ++ transaction_list) + sigMsg := append(parentHash.Bytes(), txList...) + + consumerID := fmt.Sprintf("op-stack-l2-%s", s.cfg.ChainID) + eotsInfos, err := s.eotsAggClient.GetEOTSInfos(ctx, l2BlockNumber.Uint64(), consumerID) + if err != nil { + return nil, err + } + eotsInfoMap := make(map[string]*eotsservice.EOTSInfoResponse) + for _, info := range eotsInfos { + // Convert the [32]byte key to a hex string for the map + key := hex.EncodeToString(info.FpBtcPk[:]) + eotsInfoMap[key] = info + } + + fpList, totalPower, err := s.getFinalityProvidersWithPower(ctx, consumerID) + if err != nil { + return nil, err + } + + validPower, err := s.calculateTotalPowerFromEotsVerifiedFps(ctx, sigMsg, fpList, eotsInfoMap) + if err != nil { + return nil, err + } + // Ensure that the valid power is more than 2/3 of the total power. + if validPower*3 <= totalPower*2 { + return &proto.VerifyFinalitySigResponse{ + Result: false, + }, fmt.Errorf("insufficient voting power of valid finality signatures") + } + + return &proto.VerifyFinalitySigResponse{ + Result: true, + }, nil +} + +func (s *Server) getFinalityProvidersWithPower(ctx context.Context, consumerID string) ([]*bsctypes.FinalityProviderResponse, uint64, error) { + bbnRes, err := s.bbnClient.QueryClient.QueryConsumerFinalityProviders(consumerID, &query.PageRequest{}) + if err != nil { + return nil, uint64(0), err + } + + totalPower := uint64(0) + for _, fp := range bbnRes.FinalityProviders { + totalPower += fp.VotingPower + } + + return bbnRes.FinalityProviders, totalPower, nil +} + +func (s *Server) calculateTotalPowerFromEotsVerifiedFps( + ctx context.Context, + msg []byte, + fpList []*bsctypes.FinalityProviderResponse, + eotsInfoMap map[string]*eotsservice.EOTSInfoResponse, +) (uint64, error) { + validPower := uint64(0) + for _, fp := range fpList { + fpBtcPkStr := fp.BtcPk.MarshalHex() + if info, exists := eotsInfoMap[fpBtcPkStr]; exists { + fpBTCPK, err := fp.BtcPk.ToBTCPK() + if err != nil { + return uint64(0), err + } + var pubRand *secp256k1.FieldVal + // TODO: fetch the public randomness from the verifier contract + // if pOverflow := pubRand.SetBytes(); pOverflow != 0 { + // return uint64(0), err + // } + + // finalitySig is the `s` part of the Schnorr signature. + var finalitySig *btcec.ModNScalar + if sOverflow := finalitySig.SetBytes(&info.FinalitySig); sOverflow != 0 { + return uint64(0), err + } + + if err := eots.Verify(fpBTCPK, pubRand, msg, finalitySig); err != nil { + return uint64(0), err + } + validPower += fp.VotingPower + } + } + return validPower, nil +} diff --git a/finality-provider/config/config.go b/finality-provider/config/config.go index de2e4b84..395f0827 100644 --- a/finality-provider/config/config.go +++ b/finality-provider/config/config.go @@ -79,6 +79,8 @@ type Config struct { BabylonConfig *BBNConfig `group:"babylon" namespace:"babylon"` + EVMConfig *EVMConfig `group:"evm" namespace:"evm"` + RpcListener string `long:"rpclistener" description:"the listener for RPC connections, e.g., 127.0.0.1:1234"` Metrics *metrics.Config `group:"metrics" namespace:"metrics"` diff --git a/finality-provider/config/evm.go b/finality-provider/config/evm.go new file mode 100644 index 00000000..68f9714a --- /dev/null +++ b/finality-provider/config/evm.go @@ -0,0 +1,27 @@ +package config + +import ( + "fmt" + "net/url" +) + +const ( + defaultEVMRPCAddr = "http://127.0.0.1:8545" +) + +type EVMConfig struct { + RPCAddr string `long:"rpc-address" description:"address of the rpc server to connect to"` +} + +func DefaultEVMConfig() EVMConfig { + return EVMConfig{ + RPCAddr: defaultEVMRPCAddr, + } +} + +func (cfg *EVMConfig) Validate() error { + if _, err := url.Parse(cfg.RPCAddr); err != nil { + return fmt.Errorf("rpc-addr is not correctly formatted: %w", err) + } + return nil +} diff --git a/finality-provider/service/app.go b/finality-provider/service/app.go index 65a2072d..44b01bec 100644 --- a/finality-provider/service/app.go +++ b/finality-provider/service/app.go @@ -35,12 +35,13 @@ type FinalityProviderApp struct { wg sync.WaitGroup quit chan struct{} - cc clientcontroller.ClientController - kr keyring.Keyring - fps *store.FinalityProviderStore - config *fpcfg.Config - logger *zap.Logger - input *strings.Reader + cc clientcontroller.ClientController + consumerCon clientcontroller.ConsumerController + kr keyring.Keyring + fps *store.FinalityProviderStore + config *fpcfg.Config + logger *zap.Logger + input *strings.Reader fpManager *FinalityProviderManager eotsManager eotsmanager.EOTSManager @@ -57,11 +58,14 @@ func NewFinalityProviderAppFromConfig( db kvdb.Backend, logger *zap.Logger, ) (*FinalityProviderApp, error) { - cc, err := clientcontroller.NewClientController(cfg.ChainName, cfg.BabylonConfig, &cfg.BTCNetParams, logger) + cc, err := clientcontroller.NewClientController(cfg, logger) + if err != nil { + return nil, fmt.Errorf("failed to create rpc client for the Babylon chain: %v", err) + } + consumerCon, err := clientcontroller.NewConsumerController(cfg, logger) if err != nil { return nil, fmt.Errorf("failed to create rpc client for the consumer chain %s: %v", cfg.ChainName, err) } - // if the EOTSManagerAddress is empty, run a local EOTS manager; // otherwise connect a remote one with a gRPC client em, err := client.NewEOTSManagerGRpcClient(cfg.EOTSManagerAddress) @@ -71,12 +75,13 @@ func NewFinalityProviderAppFromConfig( logger.Info("successfully connected to a remote EOTS manager", zap.String("address", cfg.EOTSManagerAddress)) - return NewFinalityProviderApp(cfg, cc, em, db, logger) + return NewFinalityProviderApp(cfg, cc, consumerCon, em, db, logger) } func NewFinalityProviderApp( config *fpcfg.Config, cc clientcontroller.ClientController, + consumerCon clientcontroller.ConsumerController, em eotsmanager.EOTSManager, db kvdb.Backend, logger *zap.Logger, @@ -99,13 +104,14 @@ func NewFinalityProviderApp( fpMetrics := metrics.NewFpMetrics() - fpm, err := NewFinalityProviderManager(fpStore, config, cc, em, fpMetrics, logger) + fpm, err := NewFinalityProviderManager(fpStore, config, cc, consumerCon, em, fpMetrics, logger) if err != nil { return nil, fmt.Errorf("failed to create finality-provider manager: %w", err) } return &FinalityProviderApp{ cc: cc, + consumerCon: consumerCon, fps: fpStore, kr: kr, config: config, @@ -141,6 +147,10 @@ func (app *FinalityProviderApp) ListFinalityProviderInstances() []*FinalityProvi return app.fpManager.ListFinalityProviderInstances() } +func (app *FinalityProviderApp) ListFinalityProviderInstancesForChain(chainID string) []*FinalityProviderInstance { + return app.fpManager.ListFinalityProviderInstancesForChain(chainID) +} + func (app *FinalityProviderApp) ListAllFinalityProvidersInfo() ([]*proto.FinalityProviderInfo, error) { return app.fpManager.AllFinalityProviders() } @@ -181,6 +191,7 @@ func (app *FinalityProviderApp) RegisterFinalityProvider(fpPkStr string) (*Regis } request := ®isterFinalityProviderRequest{ + chainID: fp.ChainID, bbnPubKey: fp.ChainPk, btcPubKey: bbntypes.NewBIP340PubKeyFromBTCPK(fp.BtcPk), pop: pop, @@ -225,7 +236,7 @@ func (app *FinalityProviderApp) getFpPrivKey(fpPk []byte) (*btcec.PrivateKey, er // SyncFinalityProviderStatus syncs the status of the finality-providers func (app *FinalityProviderApp) SyncFinalityProviderStatus() error { - latestBlock, err := app.cc.QueryBestBlock() + latestBlockHeight, err := app.consumerCon.QueryLatestBlockHeight() if err != nil { return err } @@ -236,7 +247,7 @@ func (app *FinalityProviderApp) SyncFinalityProviderStatus() error { } for _, fp := range fps { - vp, err := app.cc.QueryFinalityProviderVotingPower(fp.BtcPk, latestBlock.Height) + vp, err := app.consumerCon.QueryFinalityProviderVotingPower(fp.BtcPk, latestBlockHeight) if err != nil { // if error occured then the finality-provider is not registered in the Babylon chain yet continue @@ -535,6 +546,7 @@ func (app *FinalityProviderApp) registrationLoop() { continue } res, registeredEpoch, err := app.cc.RegisterFinalityProvider( + req.chainID, req.bbnPubKey.Key, req.btcPubKey.MustToBTCPK(), popBytes, diff --git a/finality-provider/service/app_test.go b/finality-provider/service/app_test.go index 69ebd01c..1d245fc2 100644 --- a/finality-provider/service/app_test.go +++ b/finality-provider/service/app_test.go @@ -48,11 +48,11 @@ func FuzzRegisterFinalityProvider(f *testing.F) { // Create mocked babylon client randomStartingHeight := uint64(r.Int63n(100) + 1) currentHeight := randomStartingHeight + uint64(r.Int63n(10)+2) - mockClientController := testutil.PrepareMockedClientController(t, r, randomStartingHeight, currentHeight) - mockClientController.EXPECT().QueryLatestFinalizedBlocks(gomock.Any()).Return(nil, nil).AnyTimes() - mockClientController.EXPECT().QueryFinalityProviderVotingPower(gomock.Any(), + mockConsumerController := testutil.PrepareMockedConsumerController(t, r, randomStartingHeight, currentHeight) + mockConsumerController.EXPECT().QueryLatestFinalizedBlock().Return(nil, nil).AnyTimes() + mockConsumerController.EXPECT().QueryFinalityProviderVotingPower(gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() - mockClientController.EXPECT().QueryLastFinalizedEpoch().Return(uint64(0), nil).AnyTimes() + mockBabylonController := testutil.PrepareMockedBabylonController(t, uint64(0)) // Create randomized config fpHomeDir := filepath.Join(t.TempDir(), "fp-home") @@ -61,7 +61,7 @@ func FuzzRegisterFinalityProvider(f *testing.F) { fpCfg.PollerConfig.StaticChainScanningStartHeight = randomStartingHeight fpdb, err := fpCfg.DatabaseConfig.GetDbBackend() require.NoError(t, err) - app, err := service.NewFinalityProviderApp(&fpCfg, mockClientController, em, fpdb, logger) + app, err := service.NewFinalityProviderApp(&fpCfg, mockBabylonController, mockConsumerController, em, fpdb, logger) require.NoError(t, err) defer func() { err = fpdb.Close() @@ -98,8 +98,9 @@ func FuzzRegisterFinalityProvider(f *testing.F) { require.Equal(t, fpInfo.BtcPkHex, fpListInfo[0].BtcPkHex) txHash := testutil.GenRandomHexStr(r, 32) - mockClientController.EXPECT(). + mockBabylonController.EXPECT(). RegisterFinalityProvider( + fp.ChainID, fp.ChainPk.Key, fp.BtcPk, popBytes, diff --git a/finality-provider/service/chain_poller.go b/finality-provider/service/chain_poller.go index e7fe1c40..6ea2979b 100644 --- a/finality-provider/service/chain_poller.go +++ b/finality-provider/service/chain_poller.go @@ -43,6 +43,7 @@ type ChainPoller struct { quit chan struct{} cc clientcontroller.ClientController + consumerCon clientcontroller.ConsumerController cfg *cfg.ChainPollerConfig metrics *metrics.FpMetrics blockInfoChan chan *types.BlockInfo @@ -55,6 +56,7 @@ func NewChainPoller( logger *zap.Logger, cfg *cfg.ChainPollerConfig, cc clientcontroller.ClientController, + consumerCon clientcontroller.ConsumerController, metrics *metrics.FpMetrics, ) *ChainPoller { return &ChainPoller{ @@ -62,6 +64,7 @@ func NewChainPoller( logger: logger, cfg: cfg, cc: cc, + consumerCon: consumerCon, metrics: metrics, blockInfoChan: make(chan *types.BlockInfo, cfg.BufferSize), skipHeightChan: make(chan *skipHeightRequest), @@ -122,14 +125,14 @@ func (cp *ChainPoller) GetBlockInfoChan() <-chan *types.BlockInfo { return cp.blockInfoChan } -func (cp *ChainPoller) latestBlockWithRetry() (*types.BlockInfo, error) { +func (cp *ChainPoller) latestBlockHeightWithRetry() (uint64, error) { var ( - latestBlock *types.BlockInfo - err error + latestBlockHeight uint64 + err error ) if err := retry.Do(func() error { - latestBlock, err = cp.cc.QueryBestBlock() + latestBlockHeight, err = cp.consumerCon.QueryLatestBlockHeight() if err != nil { return err } @@ -142,9 +145,9 @@ func (cp *ChainPoller) latestBlockWithRetry() (*types.BlockInfo, error) { zap.Error(err), ) })); err != nil { - return nil, err + return 0, err } - return latestBlock, nil + return latestBlockHeight, nil } func (cp *ChainPoller) blockWithRetry(height uint64) (*types.BlockInfo, error) { @@ -153,7 +156,7 @@ func (cp *ChainPoller) blockWithRetry(height uint64) (*types.BlockInfo, error) { err error ) if err := retry.Do(func() error { - block, err = cp.cc.QueryBlock(height) + block, err = cp.consumerCon.QueryBlock(height) if err != nil { return err } @@ -183,13 +186,13 @@ func (cp *ChainPoller) validateStartHeight(startHeight uint64) error { var currentBestChainHeight uint64 for { - lastestBlock, err := cp.latestBlockWithRetry() + lastestBlockHeight, err := cp.latestBlockHeightWithRetry() if err != nil { cp.logger.Debug("failed to query babylon for the latest status", zap.Error(err)) continue } - currentBestChainHeight = lastestBlock.Height + currentBestChainHeight = lastestBlockHeight break } @@ -205,7 +208,7 @@ func (cp *ChainPoller) validateStartHeight(startHeight uint64) error { func (cp *ChainPoller) waitForActivation() { // ensure that the startHeight is no lower than the activated height for { - activatedHeight, err := cp.cc.QueryActivatedHeight() + activatedHeight, err := cp.consumerCon.QueryActivatedHeight() if err != nil { cp.logger.Debug("failed to query the consumer chain for the activated height", zap.Error(err)) } else { diff --git a/finality-provider/service/chain_poller_test.go b/finality-provider/service/chain_poller_test.go index 4e899ed2..6d777f2d 100644 --- a/finality-provider/service/chain_poller_test.go +++ b/finality-provider/service/chain_poller_test.go @@ -30,27 +30,25 @@ func FuzzChainPoller_Start(f *testing.F) { endHeight := startHeight + uint64(r.Int63n(10)+1) ctl := gomock.NewController(t) - mockClientController := mocks.NewMockClientController(ctl) - mockClientController.EXPECT().Close().Return(nil).AnyTimes() - mockClientController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() + mockBabylonController := mocks.NewMockClientController(ctl) + mockBabylonController.EXPECT().Close().Return(nil).AnyTimes() + mockConsumerController := mocks.NewMockConsumerController(ctl) + mockConsumerController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() - currentBlockRes := &types.BlockInfo{ - Height: currentHeight, - } - mockClientController.EXPECT().QueryBestBlock().Return(currentBlockRes, nil).AnyTimes() + mockConsumerController.EXPECT().QueryLatestBlockHeight().Return(currentHeight, nil).AnyTimes() for i := startHeight; i <= endHeight; i++ { resBlock := &types.BlockInfo{ Height: i, } - mockClientController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() + mockConsumerController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() } // TODO: use mock metrics m := metrics.NewFpMetrics() pollerCfg := fpcfg.DefaultChainPollerConfig() pollerCfg.PollInterval = 10 * time.Millisecond - poller := service.NewChainPoller(zap.NewNop(), &pollerCfg, mockClientController, m) + poller := service.NewChainPoller(zap.NewNop(), &pollerCfg, mockBabylonController, mockConsumerController, m) err := poller.Start(startHeight) require.NoError(t, err) defer func() { @@ -81,27 +79,24 @@ func FuzzChainPoller_SkipHeight(f *testing.F) { skipHeight := endHeight + uint64(r.Int63n(10)+1) ctl := gomock.NewController(t) - mockClientController := mocks.NewMockClientController(ctl) - mockClientController.EXPECT().Close().Return(nil).AnyTimes() - mockClientController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() - - currentBlockRes := &types.BlockInfo{ - Height: currentHeight, - } - mockClientController.EXPECT().QueryBestBlock().Return(currentBlockRes, nil).AnyTimes() + mockBabylonController := mocks.NewMockClientController(ctl) + mockConsumerController := mocks.NewMockConsumerController(ctl) + mockBabylonController.EXPECT().Close().Return(nil).AnyTimes() + mockConsumerController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() + mockConsumerController.EXPECT().QueryLatestBlockHeight().Return(currentHeight, nil).AnyTimes() for i := startHeight; i <= skipHeight; i++ { resBlock := &types.BlockInfo{ Height: i, } - mockClientController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() + mockConsumerController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() } // TODO: use mock metrics m := metrics.NewFpMetrics() pollerCfg := fpcfg.DefaultChainPollerConfig() pollerCfg.PollInterval = 1 * time.Second - poller := service.NewChainPoller(zap.NewNop(), &pollerCfg, mockClientController, m) + poller := service.NewChainPoller(zap.NewNop(), &pollerCfg, mockBabylonController, mockConsumerController, m) // should expect error if the poller is not started err := poller.SkipToHeight(skipHeight) require.Error(t, err) diff --git a/finality-provider/service/fastsync.go b/finality-provider/service/fastsync.go index 4a033378..1821bc1d 100644 --- a/finality-provider/service/fastsync.go +++ b/finality-provider/service/fastsync.go @@ -33,7 +33,7 @@ func (fp *FinalityProviderInstance) FastSync(startHeight, endHeight uint64) (*Fa // we may need several rounds to catch-up as we need to limit // the catch-up distance for each round to avoid memory overflow for startHeight <= endHeight { - blocks, err := fp.cc.QueryBlocks(startHeight, endHeight, fp.cfg.FastSyncLimit) + blocks, err := fp.consumerCon.QueryBlocks(startHeight, endHeight, fp.cfg.FastSyncLimit) if err != nil { return nil, err } @@ -50,11 +50,11 @@ func (fp *FinalityProviderInstance) FastSync(startHeight, endHeight uint64) (*Fa catchUpBlocks := make([]*types.BlockInfo, 0, len(blocks)) for _, b := range blocks { // check whether the block has been processed before - if fp.hasProcessed(b) { + if fp.hasProcessed(b.Height) { continue } // check whether the finality provider has voting power - hasVp, err := fp.hasVotingPower(b) + hasVp, err := fp.hasVotingPower(b.Height) if err != nil { return nil, err } diff --git a/finality-provider/service/fastsync_test.go b/finality-provider/service/fastsync_test.go index 52c0ebbb..f7cb33f4 100644 --- a/finality-provider/service/fastsync_test.go +++ b/finality-provider/service/fastsync_test.go @@ -24,23 +24,22 @@ func FuzzFastSync(f *testing.F) { randomStartingHeight := uint64(r.Int63n(100) + 1) finalizedHeight := randomStartingHeight + uint64(r.Int63n(10)+2) currentHeight := finalizedHeight + uint64(r.Int63n(10)+1) - mockClientController := testutil.PrepareMockedClientController(t, r, randomStartingHeight, currentHeight) - // mock finalised BTC timestamped - mockClientController.EXPECT().QueryLastFinalizedEpoch().Return(randomRegiteredEpoch, nil).AnyTimes() - _, fpIns, cleanUp := startFinalityProviderAppWithRegisteredFp(t, r, mockClientController, randomStartingHeight, randomRegiteredEpoch) + mockBabylonController := testutil.PrepareMockedBabylonController(t, randomRegiteredEpoch) + mockConsumerController := testutil.PrepareMockedConsumerController(t, r, randomStartingHeight, currentHeight) + _, fpIns, cleanUp := startFinalityProviderAppWithRegisteredFp(t, r, mockBabylonController, mockConsumerController, randomStartingHeight, randomRegiteredEpoch) defer cleanUp() // mock voting power - mockClientController.EXPECT().QueryFinalityProviderVotingPower(fpIns.GetBtcPk(), gomock.Any()). + mockConsumerController.EXPECT().QueryFinalityProviderVotingPower(fpIns.GetBtcPk(), gomock.Any()). Return(uint64(1), nil).AnyTimes() catchUpBlocks := testutil.GenBlocks(r, finalizedHeight+1, currentHeight) expectedTxHash := testutil.GenRandomHexStr(r, 32) finalizedBlock := &types.BlockInfo{Height: finalizedHeight, Hash: testutil.GenRandomByteArray(r, 32)} - mockClientController.EXPECT().QueryLatestFinalizedBlocks(uint64(1)).Return([]*types.BlockInfo{finalizedBlock}, nil).AnyTimes() - mockClientController.EXPECT().QueryBlocks(finalizedHeight+1, currentHeight, uint64(10)). + mockConsumerController.EXPECT().QueryLatestFinalizedBlock().Return(finalizedBlock, nil).AnyTimes() + mockConsumerController.EXPECT().QueryBlocks(finalizedHeight+1, currentHeight, uint64(10)). Return(catchUpBlocks, nil) - mockClientController.EXPECT().SubmitBatchFinalitySigs(fpIns.GetBtcPk(), catchUpBlocks, gomock.Any()). + mockConsumerController.EXPECT().SubmitBatchFinalitySigs(fpIns.GetBtcPk(), catchUpBlocks, gomock.Any()). Return(&types.TxResponse{TxHash: expectedTxHash}, nil).AnyTimes() result, err := fpIns.FastSync(finalizedHeight+1, currentHeight) require.NoError(t, err) diff --git a/finality-provider/service/fp_instance.go b/finality-provider/service/fp_instance.go index b5f80695..e8f86803 100644 --- a/finality-provider/service/fp_instance.go +++ b/finality-provider/service/fp_instance.go @@ -33,16 +33,17 @@ type FinalityProviderInstance struct { state *fpState cfg *fpcfg.Config - logger *zap.Logger - em eotsmanager.EOTSManager - cc clientcontroller.ClientController - poller *ChainPoller - metrics *metrics.FpMetrics + logger *zap.Logger + em eotsmanager.EOTSManager + cc clientcontroller.ClientController + consumerCon clientcontroller.ConsumerController + poller *ChainPoller + metrics *metrics.FpMetrics // passphrase is used to unlock private keys passphrase string - laggingTargetChan chan *types.BlockInfo + laggingTargetChan chan uint64 criticalErrChan chan<- *CriticalError isStarted *atomic.Bool @@ -60,6 +61,7 @@ func NewFinalityProviderInstance( cfg *fpcfg.Config, s *store.FinalityProviderStore, cc clientcontroller.ClientController, + consumerCon clientcontroller.ConsumerController, em eotsmanager.EOTSManager, metrics *metrics.FpMetrics, passphrase string, @@ -101,6 +103,7 @@ func NewFinalityProviderInstance( passphrase: passphrase, em: em, cc: cc, + consumerCon: consumerCon, metrics: metrics, }, nil } @@ -120,7 +123,7 @@ func (fp *FinalityProviderInstance) Start() error { fp.logger.Info("the finality-provider has been bootstrapped", zap.String("pk", fp.GetBtcPkHex()), zap.Uint64("height", startHeight)) - poller := NewChainPoller(fp.logger, fp.cfg.PollerConfig, fp.cc, fp.metrics) + poller := NewChainPoller(fp.logger, fp.cfg.PollerConfig, fp.cc, fp.consumerCon, fp.metrics) if err := poller.Start(startHeight + 1); err != nil { return fmt.Errorf("failed to start the poller: %w", err) @@ -128,7 +131,7 @@ func (fp *FinalityProviderInstance) Start() error { fp.poller = poller - fp.laggingTargetChan = make(chan *types.BlockInfo, 1) + fp.laggingTargetChan = make(chan uint64, 1) fp.quit = make(chan struct{}) @@ -141,13 +144,13 @@ func (fp *FinalityProviderInstance) Start() error { } func (fp *FinalityProviderInstance) bootstrap() (uint64, error) { - latestBlock, err := fp.getLatestBlockWithRetry() + latestBlockHeight, err := fp.getLatestBlockHeightWithRetry() if err != nil { return 0, err } - if fp.checkLagging(latestBlock) { - _, err := fp.tryFastSync(latestBlock) + if fp.checkLagging(latestBlockHeight) { + _, err := fp.tryFastSync(latestBlockHeight) if err != nil && !clientcontroller.IsExpected(err) { return 0, err } @@ -197,11 +200,11 @@ func (fp *FinalityProviderInstance) finalitySigSubmissionLoop() { ) // check whether the block has been processed before - if fp.hasProcessed(b) { + if fp.hasProcessed(b.Height) { continue } // check whether the finality provider has voting power - hasVp, err := fp.hasVotingPower(b) + hasVp, err := fp.hasVotingPower(b.Height) if err != nil { fp.reportCriticalErr(err) continue @@ -295,7 +298,7 @@ func (fp *FinalityProviderInstance) checkLaggingLoop() { continue } - latestBlock, err := fp.getLatestBlockWithRetry() + latestBlockHeight, err := fp.getLatestBlockHeightWithRetry() if err != nil { fp.logger.Debug( "failed to get the latest block of the consumer chain", @@ -305,9 +308,9 @@ func (fp *FinalityProviderInstance) checkLaggingLoop() { continue } - if fp.checkLagging(latestBlock) { + if fp.checkLagging(latestBlockHeight) { fp.isLagging.Store(true) - fp.laggingTargetChan <- latestBlock + fp.laggingTargetChan <- latestBlockHeight } case <-fp.quit: fp.logger.Debug("the fast sync loop is closing") @@ -316,26 +319,26 @@ func (fp *FinalityProviderInstance) checkLaggingLoop() { } } -func (fp *FinalityProviderInstance) tryFastSync(targetBlock *types.BlockInfo) (*FastSyncResult, error) { +func (fp *FinalityProviderInstance) tryFastSync(targetBlockHeight uint64) (*FastSyncResult, error) { if fp.inSync.Load() { return nil, fmt.Errorf("the finality-provider %s is already in sync", fp.GetBtcPkHex()) } // get the last finalized height - lastFinalizedBlocks, err := fp.cc.QueryLatestFinalizedBlocks(1) + lastFinalizedBlock, err := fp.latestFinalizedBlockWithRetry() if err != nil { return nil, err } - if lastFinalizedBlocks == nil { + if lastFinalizedBlock == nil { fp.logger.Debug( "no finalized blocks yet, no need to catch up", zap.String("pk", fp.GetBtcPkHex()), - zap.Uint64("height", targetBlock.Height), + zap.Uint64("height", targetBlockHeight), ) return nil, nil } - lastFinalizedHeight := lastFinalizedBlocks[0].Height + lastFinalizedHeight := lastFinalizedBlock.Height lastProcessedHeight := fp.GetLastProcessedHeight() // get the startHeight from the maximum of the lastVotedHeight and @@ -347,21 +350,21 @@ func (fp *FinalityProviderInstance) tryFastSync(targetBlock *types.BlockInfo) (* startHeight = lastFinalizedHeight + 1 } - if startHeight > targetBlock.Height { - return nil, fmt.Errorf("the start height %v should not be higher than the current block %v", startHeight, targetBlock.Height) + if startHeight > targetBlockHeight { + return nil, fmt.Errorf("the start height %v should not be higher than the current block %v", startHeight, targetBlockHeight) } fp.logger.Debug("the finality-provider is entering fast sync") - return fp.FastSync(startHeight, targetBlock.Height) + return fp.FastSync(startHeight, targetBlockHeight) } -func (fp *FinalityProviderInstance) hasProcessed(b *types.BlockInfo) bool { - if b.Height <= fp.GetLastProcessedHeight() { +func (fp *FinalityProviderInstance) hasProcessed(blockHeight uint64) bool { + if blockHeight <= fp.GetLastProcessedHeight() { fp.logger.Debug( "the block has been processed before, skip processing", zap.String("pk", fp.GetBtcPkHex()), - zap.Uint64("block_height", b.Height), + zap.Uint64("block_height", blockHeight), zap.Uint64("last_processed_height", fp.GetLastProcessedHeight()), ) return true @@ -371,8 +374,8 @@ func (fp *FinalityProviderInstance) hasProcessed(b *types.BlockInfo) bool { } // hasVotingPower checks whether the finality provider has voting power for the given block -func (fp *FinalityProviderInstance) hasVotingPower(b *types.BlockInfo) (bool, error) { - power, err := fp.GetVotingPowerWithRetry(b.Height) +func (fp *FinalityProviderInstance) hasVotingPower(blockHeight uint64) (bool, error) { + power, err := fp.GetVotingPowerWithRetry(blockHeight) if err != nil { return false, err } @@ -380,7 +383,7 @@ func (fp *FinalityProviderInstance) hasVotingPower(b *types.BlockInfo) (bool, er fp.logger.Debug( "the finality provider does not have voting power", zap.String("pk", fp.GetBtcPkHex()), - zap.Uint64("block_height", b.Height), + zap.Uint64("block_height", blockHeight), ) return false, nil @@ -397,8 +400,8 @@ func (fp *FinalityProviderInstance) reportCriticalErr(err error) { } // checkLagging returns true if the lasted voted height is behind by a configured gap -func (fp *FinalityProviderInstance) checkLagging(currentBlock *types.BlockInfo) bool { - return currentBlock.Height >= fp.GetLastProcessedHeight()+fp.cfg.FastSyncGap +func (fp *FinalityProviderInstance) checkLagging(currentBlockHeight uint64) bool { + return currentBlockHeight >= fp.GetLastProcessedHeight()+fp.cfg.FastSyncGap } // retrySubmitFinalitySignatureUntilBlockFinalized periodically tries to submit finality signature until success or the block is finalized @@ -440,7 +443,7 @@ func (fp *FinalityProviderInstance) retrySubmitFinalitySignatureUntilBlockFinali select { case <-time.After(fp.cfg.SubmissionRetryInterval): // periodically query the index block to be later checked whether it is Finalized - finalized, err := fp.checkBlockFinalization(targetBlock.Height) + finalized, err := fp.consumerCon.QueryIsBlockFinalized(targetBlock.Height) if err != nil { return nil, fmt.Errorf("failed to query block finalization at height %v: %w", targetBlock.Height, err) } @@ -462,15 +465,6 @@ func (fp *FinalityProviderInstance) retrySubmitFinalitySignatureUntilBlockFinali } } -func (fp *FinalityProviderInstance) checkBlockFinalization(height uint64) (bool, error) { - b, err := fp.cc.QueryBlock(height) - if err != nil { - return false, err - } - - return b.Finalized, nil -} - // SubmitFinalitySignature builds and sends a finality signature over the given block to the consumer chain func (fp *FinalityProviderInstance) SubmitFinalitySignature(b *types.BlockInfo) (*types.TxResponse, error) { eotsSig, err := fp.signEotsSig(b) @@ -479,7 +473,7 @@ func (fp *FinalityProviderInstance) SubmitFinalitySignature(b *types.BlockInfo) } // send finality signature to the consumer chain - res, err := fp.cc.SubmitFinalitySig(fp.GetBtcPk(), b.Height, b.Hash, eotsSig.ToModNScalar()) + res, err := fp.consumerCon.SubmitFinalitySig(fp.GetBtcPk(), b.Height, b.Hash, eotsSig.ToModNScalar()) if err != nil { return nil, fmt.Errorf("failed to send finality signature to the consumer chain: %w", err) } @@ -511,7 +505,7 @@ func (fp *FinalityProviderInstance) SubmitBatchFinalitySignatures(blocks []*type } // send finality signature to the consumer chain - res, err := fp.cc.SubmitBatchFinalitySigs(fp.GetBtcPk(), blocks, sigs) + res, err := fp.consumerCon.SubmitBatchFinalitySigs(fp.GetBtcPk(), blocks, sigs) if err != nil { return nil, fmt.Errorf("failed to send a batch of finality signatures to the consumer chain: %w", err) } @@ -531,7 +525,7 @@ func (fp *FinalityProviderInstance) signEotsSig(b *types.BlockInfo) (*bbntypes.S BlockAppHash: b.Hash, } msgToSign := msg.MsgToSign() - sig, err := fp.em.SignEOTS(fp.btcPk.MustMarshal(), fp.GetChainID(), msgToSign, b.Height, fp.passphrase) + sig, err := fp.em.SignEOTS(fp.btcPk.MustMarshal(), []byte(fp.GetChainID()), msgToSign, b.Height, fp.passphrase) if err != nil { return nil, fmt.Errorf("failed to sign EOTS: %w", err) } @@ -549,7 +543,7 @@ func (fp *FinalityProviderInstance) TestSubmitFinalitySignatureAndExtractPrivKey } // send finality signature to the consumer chain - res, err := fp.cc.SubmitFinalitySig(fp.GetBtcPk(), b.Height, b.Hash, eotsSig.ToModNScalar()) + res, err := fp.consumerCon.SubmitFinalitySig(fp.GetBtcPk(), b.Height, b.Hash, eotsSig.ToModNScalar()) if err != nil { return nil, nil, fmt.Errorf("failed to send finality signature to the consumer chain: %w", err) } @@ -590,13 +584,13 @@ func (fp *FinalityProviderInstance) getPollerStartingHeight() (uint64, error) { // (2) The finality providers do not submit signatures for any already // finalised blocks. initialBlockToGet := fp.GetLastProcessedHeight() - latestFinalisedBlock, err := fp.latestFinalizedBlocksWithRetry(1) + latestFinalisedBlock, err := fp.latestFinalizedBlockWithRetry() if err != nil { return 0, err } - if len(latestFinalisedBlock) != 0 { - if latestFinalisedBlock[0].Height > initialBlockToGet { - initialBlockToGet = latestFinalisedBlock[0].Height + if latestFinalisedBlock != nil { + if latestFinalisedBlock.Height > initialBlockToGet { + initialBlockToGet = latestFinalisedBlock.Height } } @@ -607,10 +601,11 @@ func (fp *FinalityProviderInstance) getPollerStartingHeight() (uint64, error) { return initialBlockToGet, nil } -func (fp *FinalityProviderInstance) latestFinalizedBlocksWithRetry(count uint64) ([]*types.BlockInfo, error) { - var response []*types.BlockInfo +// nil will be returned if the finalized block does not exist +func (fp *FinalityProviderInstance) latestFinalizedBlockWithRetry() (*types.BlockInfo, error) { + var response *types.BlockInfo if err := retry.Do(func() error { - latestFinalisedBlock, err := fp.cc.QueryLatestFinalizedBlocks(count) + latestFinalisedBlock, err := fp.consumerCon.QueryLatestFinalizedBlock() if err != nil { return err } @@ -629,14 +624,14 @@ func (fp *FinalityProviderInstance) latestFinalizedBlocksWithRetry(count uint64) return response, nil } -func (fp *FinalityProviderInstance) getLatestBlockWithRetry() (*types.BlockInfo, error) { +func (fp *FinalityProviderInstance) getLatestBlockHeightWithRetry() (uint64, error) { var ( - latestBlock *types.BlockInfo - err error + latestBlockHeight uint64 + err error ) if err := retry.Do(func() error { - latestBlock, err = fp.cc.QueryBestBlock() + latestBlockHeight, err = fp.consumerCon.QueryLatestBlockHeight() if err != nil { return err } @@ -649,11 +644,11 @@ func (fp *FinalityProviderInstance) getLatestBlockWithRetry() (*types.BlockInfo, zap.Error(err), ) })); err != nil { - return nil, err + return 0, err } - fp.metrics.RecordBabylonTipHeight(latestBlock.Height) + fp.metrics.RecordBabylonTipHeight(latestBlockHeight) - return latestBlock, nil + return latestBlockHeight, nil } func (fp *FinalityProviderInstance) GetVotingPowerWithRetry(height uint64) (uint64, error) { @@ -663,7 +658,7 @@ func (fp *FinalityProviderInstance) GetVotingPowerWithRetry(height uint64) (uint ) if err := retry.Do(func() error { - power, err = fp.cc.QueryFinalityProviderVotingPower(fp.GetBtcPk(), height) + power, err = fp.consumerCon.QueryFinalityProviderVotingPower(fp.GetBtcPk(), height) if err != nil { return err } diff --git a/finality-provider/service/fp_instance_test.go b/finality-provider/service/fp_instance_test.go index 9cc2c696..9077e3e7 100644 --- a/finality-provider/service/fp_instance_test.go +++ b/finality-provider/service/fp_instance_test.go @@ -30,15 +30,14 @@ func FuzzSubmitFinalitySig(f *testing.F) { randomStartingHeight := uint64(r.Int63n(100) + 1) currentHeight := randomStartingHeight + uint64(r.Int63n(10)+1) startingBlock := &types.BlockInfo{Height: randomStartingHeight, Hash: testutil.GenRandomByteArray(r, 32)} - mockClientController := testutil.PrepareMockedClientController(t, r, randomStartingHeight, currentHeight) - // mock finalised BTC timestamped - mockClientController.EXPECT().QueryLastFinalizedEpoch().Return(randomRegiteredEpoch, nil).AnyTimes() + mockConsumerController := testutil.PrepareMockedConsumerController(t, r, randomStartingHeight, currentHeight) + mockBabylonController := testutil.PrepareMockedBabylonController(t, randomRegiteredEpoch) - _, fpIns, cleanUp := startFinalityProviderAppWithRegisteredFp(t, r, mockClientController, randomStartingHeight, randomRegiteredEpoch) + _, fpIns, cleanUp := startFinalityProviderAppWithRegisteredFp(t, r, mockBabylonController, mockConsumerController, randomStartingHeight, randomRegiteredEpoch) defer cleanUp() // mock voting power - mockClientController.EXPECT().QueryFinalityProviderVotingPower(fpIns.GetBtcPk(), gomock.Any()). + mockConsumerController.EXPECT().QueryFinalityProviderVotingPower(fpIns.GetBtcPk(), gomock.Any()). Return(uint64(1), nil).AnyTimes() // submit finality sig @@ -47,7 +46,7 @@ func FuzzSubmitFinalitySig(f *testing.F) { Hash: testutil.GenRandomByteArray(r, 32), } expectedTxHash := testutil.GenRandomHexStr(r, 32) - mockClientController.EXPECT(). + mockConsumerController.EXPECT(). SubmitFinalitySig(fpIns.GetBtcPk(), nextBlock.Height, nextBlock.Hash, gomock.Any()). Return(&types.TxResponse{TxHash: expectedTxHash}, nil).AnyTimes() providerRes, err := fpIns.SubmitFinalitySignature(nextBlock) @@ -60,7 +59,7 @@ func FuzzSubmitFinalitySig(f *testing.F) { }) } -func startFinalityProviderAppWithRegisteredFp(t *testing.T, r *rand.Rand, cc clientcontroller.ClientController, startingHeight uint64, registeredEpoch uint64) (*service.FinalityProviderApp, *service.FinalityProviderInstance, func()) { +func startFinalityProviderAppWithRegisteredFp(t *testing.T, r *rand.Rand, cc clientcontroller.ClientController, consumerCon clientcontroller.ConsumerController, startingHeight uint64, registeredEpoch uint64) (*service.FinalityProviderApp, *service.FinalityProviderInstance, func()) { logger := zap.NewNop() // create an EOTS manager eotsHomeDir := filepath.Join(t.TempDir(), "eots-home") @@ -78,7 +77,7 @@ func startFinalityProviderAppWithRegisteredFp(t *testing.T, r *rand.Rand, cc cli fpCfg.PollerConfig.StaticChainScanningStartHeight = startingHeight fpdb, err := fpCfg.DatabaseConfig.GetDbBackend() require.NoError(t, err) - app, err := service.NewFinalityProviderApp(&fpCfg, cc, em, fpdb, logger) + app, err := service.NewFinalityProviderApp(&fpCfg, cc, consumerCon, em, fpdb, logger) require.NoError(t, err) err = app.Start() require.NoError(t, err) @@ -95,7 +94,7 @@ func startFinalityProviderAppWithRegisteredFp(t *testing.T, r *rand.Rand, cc cli // TODO: use mock metrics m := metrics.NewFpMetrics() - fpIns, err := service.NewFinalityProviderInstance(fp.GetBIP340BTCPK(), &fpCfg, app.GetFinalityProviderStore(), cc, em, m, passphrase, make(chan *service.CriticalError), logger) + fpIns, err := service.NewFinalityProviderInstance(fp.GetBIP340BTCPK(), &fpCfg, app.GetFinalityProviderStore(), cc, consumerCon, em, m, passphrase, make(chan *service.CriticalError), logger) require.NoError(t, err) cleanUp := func() { diff --git a/finality-provider/service/fp_manager.go b/finality-provider/service/fp_manager.go index 03fef45c..1bc79c62 100644 --- a/finality-provider/service/fp_manager.go +++ b/finality-provider/service/fp_manager.go @@ -18,7 +18,6 @@ import ( "github.com/babylonchain/finality-provider/finality-provider/proto" "github.com/babylonchain/finality-provider/finality-provider/store" "github.com/babylonchain/finality-provider/metrics" - "github.com/babylonchain/finality-provider/types" ) const instanceTerminatingMsg = "terminating the finality-provider instance due to critical error" @@ -42,11 +41,12 @@ type FinalityProviderManager struct { fpis map[string]*FinalityProviderInstance // needed for initiating finality-provider instances - fps *store.FinalityProviderStore - config *fpcfg.Config - cc clientcontroller.ClientController - em eotsmanager.EOTSManager - logger *zap.Logger + fps *store.FinalityProviderStore + config *fpcfg.Config + cc clientcontroller.ClientController + consumerCon clientcontroller.ConsumerController + em eotsmanager.EOTSManager + logger *zap.Logger metrics *metrics.FpMetrics @@ -59,6 +59,7 @@ func NewFinalityProviderManager( fps *store.FinalityProviderStore, config *fpcfg.Config, cc clientcontroller.ClientController, + consumerCon clientcontroller.ConsumerController, em eotsmanager.EOTSManager, metrics *metrics.FpMetrics, logger *zap.Logger, @@ -70,6 +71,7 @@ func NewFinalityProviderManager( fps: fps, config: config, cc: cc, + consumerCon: consumerCon, em: em, metrics: metrics, logger: logger, @@ -131,7 +133,7 @@ func (fpm *FinalityProviderManager) monitorStatusUpdate() { for { select { case <-statusUpdateTicker.C: - latestBlock, err := fpm.getLatestBlockWithRetry() + latestBlockHeight, err := fpm.getLatestBlockHeightWithRetry() if err != nil { fpm.logger.Debug("failed to get the latest block", zap.Error(err)) continue @@ -139,12 +141,12 @@ func (fpm *FinalityProviderManager) monitorStatusUpdate() { fpis := fpm.ListFinalityProviderInstances() for _, fpi := range fpis { oldStatus := fpi.GetStatus() - power, err := fpi.GetVotingPowerWithRetry(latestBlock.Height) + power, err := fpi.GetVotingPowerWithRetry(latestBlockHeight) if err != nil { fpm.logger.Debug( "failed to get the voting power", zap.String("fp_btc_pk", fpi.GetBtcPkHex()), - zap.Uint64("height", latestBlock.Height), + zap.Uint64("height", latestBlockHeight), zap.Error(err), ) continue @@ -293,6 +295,20 @@ func (fpm *FinalityProviderManager) ListFinalityProviderInstances() []*FinalityP return fpisList } +func (fpm *FinalityProviderManager) ListFinalityProviderInstancesForChain(chainID string) []*FinalityProviderInstance { + fpm.mu.Lock() + defer fpm.mu.Unlock() + + fpisList := make([]*FinalityProviderInstance, 0, len(fpm.fpis)) + for _, fpi := range fpm.fpis { + if string(fpi.GetChainID()) == chainID { + fpisList = append(fpisList, fpi) + } + } + + return fpisList +} + func (fpm *FinalityProviderManager) AllFinalityProviders() ([]*proto.FinalityProviderInfo, error) { storedFps, err := fpm.fps.GetAllStoredFinalityProviders() if err != nil { @@ -389,7 +405,7 @@ func (fpm *FinalityProviderManager) addFinalityProviderInstance( return fmt.Errorf("finality-provider instance already exists") } - fpIns, err := NewFinalityProviderInstance(pk, fpm.config, fpm.fps, fpm.cc, fpm.em, fpm.metrics, passphrase, fpm.criticalErrChan, fpm.logger) + fpIns, err := NewFinalityProviderInstance(pk, fpm.config, fpm.fps, fpm.cc, fpm.consumerCon, fpm.em, fpm.metrics, passphrase, fpm.criticalErrChan, fpm.logger) if err != nil { return fmt.Errorf("failed to create finality-provider %s instance: %w", pkHex, err) } @@ -404,14 +420,14 @@ func (fpm *FinalityProviderManager) addFinalityProviderInstance( return nil } -func (fpm *FinalityProviderManager) getLatestBlockWithRetry() (*types.BlockInfo, error) { +func (fpm *FinalityProviderManager) getLatestBlockHeightWithRetry() (uint64, error) { var ( - latestBlock *types.BlockInfo - err error + latestBlockHeight uint64 + err error ) if err := retry.Do(func() error { - latestBlock, err = fpm.cc.QueryBestBlock() + latestBlockHeight, err = fpm.consumerCon.QueryLatestBlockHeight() if err != nil { return err } @@ -424,8 +440,8 @@ func (fpm *FinalityProviderManager) getLatestBlockWithRetry() (*types.BlockInfo, zap.Error(err), ) })); err != nil { - return nil, err + return 0, err } - return latestBlock, nil + return latestBlockHeight, nil } diff --git a/finality-provider/service/fp_manager_test.go b/finality-provider/service/fp_manager_test.go index 486fcb73..3c15978e 100644 --- a/finality-provider/service/fp_manager_test.go +++ b/finality-provider/service/fp_manager_test.go @@ -41,8 +41,9 @@ func FuzzStatusUpdate(f *testing.F) { r := rand.New(rand.NewSource(seed)) ctl := gomock.NewController(t) - mockClientController := mocks.NewMockClientController(ctl) - vm, fpPk, cleanUp := newFinalityProviderManagerWithRegisteredFp(t, r, mockClientController) + mockClientController := testutil.PrepareMockedBabylonController(t, uint64(0)) + mockConsumerController := mocks.NewMockConsumerController(ctl) + vm, fpPk, cleanUp := newFinalityProviderManagerWithRegisteredFp(t, r, mockClientController, mockConsumerController) defer cleanUp() // setup mocks @@ -51,17 +52,15 @@ func FuzzStatusUpdate(f *testing.F) { Height: currentHeight, Hash: datagen.GenRandomByteArray(r, 32), } - mockClientController.EXPECT().QueryBestBlock().Return(currentBlockRes, nil).AnyTimes() - mockClientController.EXPECT().Close().Return(nil).AnyTimes() - mockClientController.EXPECT().QueryLatestFinalizedBlocks(gomock.Any()).Return(nil, nil).AnyTimes() - mockClientController.EXPECT().QueryBestBlock().Return(currentBlockRes, nil).AnyTimes() - mockClientController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() - mockClientController.EXPECT().QueryBlock(gomock.Any()).Return(currentBlockRes, nil).AnyTimes() - mockClientController.EXPECT().QueryLastFinalizedEpoch().Return(uint64(0), nil).AnyTimes() + mockConsumerController.EXPECT().Close().Return(nil).AnyTimes() + mockConsumerController.EXPECT().QueryLatestFinalizedBlock().Return(nil, nil).AnyTimes() + mockConsumerController.EXPECT().QueryLatestBlockHeight().Return(currentHeight, nil).AnyTimes() + mockConsumerController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() + mockConsumerController.EXPECT().QueryBlock(gomock.Any()).Return(currentBlockRes, nil).AnyTimes() votingPower := uint64(r.Intn(2)) - mockClientController.EXPECT().QueryFinalityProviderVotingPower(gomock.Any(), currentHeight).Return(votingPower, nil).AnyTimes() - mockClientController.EXPECT().SubmitFinalitySig(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(&types.TxResponse{TxHash: ""}, nil).AnyTimes() + mockConsumerController.EXPECT().QueryFinalityProviderVotingPower(gomock.Any(), currentHeight).Return(votingPower, nil).AnyTimes() + mockConsumerController.EXPECT().SubmitFinalitySig(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(&types.TxResponse{TxHash: ""}, nil).AnyTimes() var slashedHeight uint64 if votingPower == 0 { mockClientController.EXPECT().QueryFinalityProviderSlashed(gomock.Any()).Return(true, nil).AnyTimes() @@ -93,7 +92,7 @@ func waitForStatus(t *testing.T, fpIns *service.FinalityProviderInstance, s prot }, eventuallyWaitTimeOut, eventuallyPollTime) } -func newFinalityProviderManagerWithRegisteredFp(t *testing.T, r *rand.Rand, cc clientcontroller.ClientController) (*service.FinalityProviderManager, *bbntypes.BIP340PubKey, func()) { +func newFinalityProviderManagerWithRegisteredFp(t *testing.T, r *rand.Rand, cc clientcontroller.ClientController, consumerCon clientcontroller.ConsumerController) (*service.FinalityProviderManager, *bbntypes.BIP340PubKey, func()) { logger := zap.NewNop() // create an EOTS manager eotsHomeDir := filepath.Join(t.TempDir(), "eots-home") @@ -123,7 +122,7 @@ func newFinalityProviderManagerWithRegisteredFp(t *testing.T, r *rand.Rand, cc c require.NoError(t, err) metricsCollectors := metrics.NewFpMetrics() - vm, err := service.NewFinalityProviderManager(fpStore, &fpCfg, cc, em, metricsCollectors, logger) + vm, err := service.NewFinalityProviderManager(fpStore, &fpCfg, cc, consumerCon, em, metricsCollectors, logger) require.NoError(t, err) // create registered finality-provider diff --git a/finality-provider/service/types.go b/finality-provider/service/types.go index 389de729..c915b8a9 100644 --- a/finality-provider/service/types.go +++ b/finality-provider/service/types.go @@ -32,6 +32,7 @@ type createFinalityProviderRequest struct { } type registerFinalityProviderRequest struct { + chainID string bbnPubKey *secp256k1.PubKey btcPubKey *bbntypes.BIP340PubKey // TODO we should have our own representation of PoP diff --git a/go.mod b/go.mod index 46201905..05357ee3 100644 --- a/go.mod +++ b/go.mod @@ -9,27 +9,31 @@ require ( cosmossdk.io/math v1.3.0 github.com/avast/retry-go/v4 v4.5.1 github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b + github.com/babylonchain/eots-aggregator v0.0.0-20240603204633-ce2df78b253c github.com/btcsuite/btcd v0.24.0 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.5 github.com/btcsuite/btcwallet/walletdb v1.4.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.4 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.5 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/relayer/v2 v2.5.2 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 + github.com/ethereum/go-ethereum v1.13.15 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 github.com/jessevdk/go-flags v1.5.0 github.com/jsternberg/zap-logfmt v1.3.0 github.com/lightningnetwork/lnd v0.16.4-beta.rc1 github.com/lightningnetwork/lnd/kvdb v1.4.1 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.0 github.com/stretchr/testify v1.9.0 github.com/urfave/cli v1.22.14 - go.uber.org/atomic v1.10.0 + github.com/urfave/cli/v2 v2.27.1 + go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.63.2 google.golang.org/protobuf v1.33.0 ) @@ -39,29 +43,36 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/api v0.7.3 // indirect + cosmossdk.io/api v0.7.4 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/store v1.0.2 // indirect + cosmossdk.io/store v1.1.0 // indirect cosmossdk.io/x/circuit v0.1.0 // indirect cosmossdk.io/x/evidence v0.1.0 // indirect cosmossdk.io/x/feegrant v0.1.0 // indirect cosmossdk.io/x/nft v0.1.0 // indirect - cosmossdk.io/x/tx v0.13.1 // indirect + cosmossdk.io/x/tx v0.13.2 // indirect cosmossdk.io/x/upgrade v0.1.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect + github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect + github.com/CloudyKit/jet/v6 v6.2.0 // indirect github.com/CosmWasm/wasmd v0.50.0 // indirect github.com/CosmWasm/wasmvm v1.5.2 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Joker/jade v1.1.3 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect github.com/aead/siphash v1.0.1 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/aws/aws-sdk-go v1.44.312 // indirect + github.com/aymerick/douceur v0.2.0 // 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 @@ -71,7 +82,7 @@ require ( github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect github.com/cenkalti/backoff/v4 v4.2.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect @@ -79,7 +90,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.38.5 // indirect + github.com/cometbft/cometbft v0.38.6 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect @@ -89,7 +100,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.1 // indirect + github.com/cosmos/iavl v1.1.2 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect github.com/cosmos/ibc-go/v8 v8.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -98,8 +109,8 @@ require ( github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -110,11 +121,14 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/ethereum/go-ethereum v1.13.15 // indirect + github.com/ethereum-optimism/optimism v1.7.4 // indirect + github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240522134500-19555bdbdc95 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/fatih/color v1.15.0 // indirect + github.com/fatih/structs v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fergusstrange/embedded-postgres v1.10.0 // indirect + github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect @@ -122,6 +136,7 @@ require ( github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect @@ -129,14 +144,16 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect + github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect @@ -146,9 +163,9 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.4 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -161,38 +178,53 @@ require ( github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/iris-contrib/schema v0.0.6 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.3 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgtype v1.14.0 // indirect + github.com/jackc/pgtype v1.14.3 // indirect github.com/jackc/pgx/v4 v4.18.2 // indirect + github.com/jackc/pgx/v5 v5.5.5 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jinzhu/copier v0.3.5 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b // indirect + github.com/kataras/blocks v0.0.8 // indirect + github.com/kataras/golog v0.1.11 // indirect + github.com/kataras/iris/v12 v12.2.10 // indirect + github.com/kataras/pio v0.0.13 // indirect + github.com/kataras/sitemap v0.0.6 // indirect + github.com/kataras/tunnel v0.0.4 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kkdai/bstream v1.0.0 // indirect github.com/klauspost/compress v1.17.7 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.7 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect github.com/lightningnetwork/lnd/tor v1.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailgun/raymond/v2 v2.0.48 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mholt/archiver/v3 v3.5.0 // indirect - github.com/miekg/dns v1.1.43 // indirect + github.com/microcosm-cc/bluemonday v1.0.26 // indirect + github.com/miekg/dns v1.1.56 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -206,22 +238,24 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pierrec/lz4/v4 v4.1.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.47.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.9.0 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/schollz/closestmatch v2.1.0+incompatible // indirect + github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -231,16 +265,27 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect github.com/strangelove-ventures/cometbft-client v0.1.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tdewolff/minify/v2 v2.20.14 // indirect + github.com/tdewolff/parse/v2 v2.7.8 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.7.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + github.com/yosssi/ace v0.0.5 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect @@ -262,26 +307,28 @@ require ( go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v0.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.20.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gorm.io/driver/postgres v1.5.7 // indirect + gorm.io/gorm v1.25.10 // indirect gotest.tools/v3 v3.5.1 // indirect lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect @@ -302,6 +349,10 @@ require ( replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + github.com/babylonchain/babylon => github.com/babylonchain/babylon-private v0.0.0-20240520231120-6364210f7701 + github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.50.6 + github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101315.1-rc.5 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 4fbc1398..9844031b 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk= -cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30= +cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -200,8 +200,8 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= -cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= @@ -210,8 +210,8 @@ cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= -cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= -cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= +cosmossdk.io/x/tx v0.13.2 h1:Kh90UH30bhnnUdJH+CmWLyaH8IKdY6BBGY3EkdOk82o= +cosmossdk.io/x/tx v0.13.2/go.mod h1:yhPokDCfXVIuAtyp49IFlWB5YAXUgD7Zek+ZHwsHzvU= cosmossdk.io/x/upgrade v0.1.0 h1:z1ZZG4UL9ICTNbJDYZ6jOnF9GdEK9wyoEFi4BUScHXE= cosmossdk.io/x/upgrade v0.1.0/go.mod h1:/6jjNGbiPCNtmA1N+rBtP601sr0g4ZXuj3yC6ClPCGY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -225,6 +225,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= +github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/CosmWasm/wasmd v0.50.0 h1:NVaGqCSTRfb9UTDHJwT6nQIWcb6VjlQl88iI+u1+qjE= github.com/CosmWasm/wasmd v0.50.0/go.mod h1:UjmShW4l9YxaMytwJZ7IB7MWzHiynSZP3DdWrG0FRtk= github.com/CosmWasm/wasmvm v1.5.2 h1:+pKB1Mz9GZVt1vadxB+EDdD1FOz3dMNjIKq/58/lrag= @@ -233,6 +237,10 @@ github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dX github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -244,10 +252,10 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV 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= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -257,14 +265,16 @@ github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= 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/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= 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= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -281,8 +291,12 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b h1:HfjAGZiebrcInFAq8Lk8MXbKbtTYxRoO65vfLPOCXzw= -github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b/go.mod h1:lfeASLNJgcUsX7LEns3HRUv0k+MjzcB2q2AMasfz38M= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/babylonchain/babylon-private v0.0.0-20240520231120-6364210f7701 h1:WCvdpXa/TUtui+XLBDstnzDqm24eScQW0obBqjEzRkI= +github.com/babylonchain/babylon-private v0.0.0-20240520231120-6364210f7701/go.mod h1:Ku+LtNN6bPMU3H58PiTiFvIWUvEcASigN7kQP87Eg/o= +github.com/babylonchain/eots-aggregator v0.0.0-20240603204633-ce2df78b253c h1:mlwauSr1eyLC05Oo4Pu0bwXxXm23LU2qc/YcKP7xh30= +github.com/babylonchain/eots-aggregator v0.0.0-20240603204633-ce2df78b253c/go.mod h1:eUh59B262vPJ8ShU/NUxQMLXTUojIRte4dYX1QGE41E= 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= @@ -339,8 +353,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -377,15 +391,15 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= -github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -410,19 +424,19 @@ 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-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= -github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= -github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= -github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= -github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= @@ -453,12 +467,14 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= +github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= 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= @@ -507,18 +523,28 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.15 h1:U7sSGYGo4SPjP6iNIifNoyIAiNjrmQkz6EwQG+/EZWo= -github.com/ethereum/go-ethereum v1.13.15/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= +github.com/ethereum-optimism/op-geth v1.101315.1-rc.5 h1:yaBvV/GfDuZOecDsGXyzsa/g8+AEBG+Bj1+NFyZRkdw= +github.com/ethereum-optimism/op-geth v1.101315.1-rc.5/go.mod h1:8tQ6r0e1NNJbSVHzYKafQqf62gV9BzZR+SKkXRckjLM= +github.com/ethereum-optimism/optimism v1.7.4 h1:qOZ996aJYfxx7qIBYr7MftYcnX83oHoUpq8Y3r9obYw= +github.com/ethereum-optimism/optimism v1.7.4/go.mod h1:+M2UOTyG20iuKiQOi+Pzz3abOtTYbTnwah/CIp8o6Y8= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240522134500-19555bdbdc95 h1:GjXKQg6u6WkEIcY0dvW2IKhMRY8cVjwdw+rNKhduAo8= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240522134500-19555bdbdc95/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fergusstrange/embedded-postgres v1.10.0 h1:YnwF6xAQYmKLAXXrrRx4rHDLih47YJwVPvg8jeKfdNg= github.com/fergusstrange/embedded-postgres v1.10.0/go.mod h1:a008U8/Rws5FtIOTGYDYa7beVWsT3qVKyqExqYYjL+c= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= 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= @@ -529,6 +555,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= +github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= @@ -562,6 +590,7 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -576,14 +605,17 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ 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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.3.2 h1:zlnbNHxumkRvfPWgfXu8RBwyNR1x8wh9cf5PTOCqs9Q= +github.com/gobwas/ws v1.3.2/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= @@ -645,6 +677,8 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 h1:k4Tw0nt6lwro3Uin8eqoET7MDA4JnT8YgbCjc/g5E3k= +github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -666,10 +700,12 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8 h1:Ep/joEub9YwcjRY6ND3+Y/w0ncE540RtGatVhtZL0/Q= +github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -693,8 +729,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/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-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= -github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= +github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= +github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -723,6 +759,8 @@ github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qK github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -748,19 +786,21 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.11 h1:6DqdA/KBjurGby9yTY0bmkathya0lfwF2SeuubCI7dY= +github.com/hashicorp/go-bexpr v0.1.11/go.mod h1:f03lAo0duBlDIUMGCuad8oLcgejw4m7U+N8T+6Kz1AE= 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= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= 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-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= -github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= 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-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= @@ -793,6 +833,8 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= @@ -803,16 +845,24 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= 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/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= +github.com/iris-contrib/httpexpect/v2 v2.15.2/go.mod h1:JLDgIqnFy5loDSUv1OA2j0mb6p/rDhiCqigP22Uq9xE= +github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= +github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -849,17 +899,25 @@ github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01C github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.3 h1:h6W9cPuHsRWQFTWUZMAKMgG5jSwQI0Zurzdvlx3Plus= +github.com/jackc/pgtype v1.14.3/go.mod h1:aKeozOde08iifGosdJpz9MBZonJOUJxqNpPBcMJTlVA= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= +github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw= +github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 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/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= @@ -868,6 +926,10 @@ github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFo github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -878,6 +940,8 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 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= @@ -896,6 +960,18 @@ github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b h1:FQ7+9fxhyp82ks9vAuy github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b/go.mod h1:HMcgvsgd0Fjj4XXDkbjdmlbI505rUPBs6WBMYg2pXks= 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/kataras/blocks v0.0.8 h1:MrpVhoFTCR2v1iOOfGng5VJSILKeZZI+7NGfxEh3SUM= +github.com/kataras/blocks v0.0.8/go.mod h1:9Jm5zx6BB+06NwA+OhTbHW1xkMOYxahnqTN5DveZ2Yg= +github.com/kataras/golog v0.1.11 h1:dGkcCVsIpqiAMWTlebn/ZULHxFvfG4K43LF1cNWSh20= +github.com/kataras/golog v0.1.11/go.mod h1:mAkt1vbPowFUuUGvexyQ5NFW6djEgGyxQBIARJ0AH4A= +github.com/kataras/iris/v12 v12.2.10 h1:rEJVM7qMoyhv8wpgkA1yGxibFcONE0jkJ70LFLibTAA= +github.com/kataras/iris/v12 v12.2.10/go.mod h1:z4+E+kLMqZ7U4WtDsYfFnG7BjMTXLkdzMAXLVMLnMNs= +github.com/kataras/pio v0.0.13 h1:x0rXVX0fviDTXOOLOmr4MUxOabu1InVSTu5itF8CXCM= +github.com/kataras/pio v0.0.13/go.mod h1:k3HNuSw+eJ8Pm2lA4lRhg3DiCjVgHlP8hmXApSej3oM= +github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= +github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -939,8 +1015,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/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/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightningnetwork/lnd v0.16.4-beta.rc1 h1:L8ktsv1lM5esVtiOlEtOBqU1dCoDckbm0FkcketBskQ= @@ -956,12 +1032,16 @@ github.com/lightningnetwork/lnd/tor v1.1.0 h1:iXO7fSzjxTI+p88KmtpbuyuRJeNfgtpl9Q github.com/lightningnetwork/lnd/tor v1.1.0/go.mod h1:RDtaAdwfAm+ONuPYwUhNIH1RAvKPv+75lHPOegUcz64= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= 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.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -983,16 +1063,19 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mholt/archiver/v3 v3.5.0 h1:nE8gZIrw66cu4osS/U7UW7YDuGMHssxKutU8IfWxwWE= github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= +github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= +github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= +github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= 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/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1002,12 +1085,16 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= 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.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= +github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= @@ -1036,8 +1123,8 @@ github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWk github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M= github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= 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/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1057,8 +1144,8 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 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.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= 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= @@ -1086,8 +1173,8 @@ github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6 github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= -github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= 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/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= @@ -1111,32 +1198,32 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_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= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.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.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= -github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 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.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1144,8 +1231,8 @@ github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5 github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1153,8 +1240,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -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/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= +github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= @@ -1171,12 +1258,18 @@ github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgY github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= 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/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1186,6 +1279,7 @@ 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.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1217,6 +1311,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/strangelove-ventures/cometbft-client v0.1.0 h1:fcA652QaaR0LDnyJOZVjZKtuyAawnVXaq/p1MWJSYD4= github.com/strangelove-ventures/cometbft-client v0.1.0/go.mod h1:QzThgjzvsGgUNVNpGPitmxOWMIhp6a0oqf80nCRNt/0= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1248,6 +1344,13 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tdewolff/minify/v2 v2.20.14 h1:sktSuVixRwk0ryQjqvKBu/uYS+MWmkwEFMEWtFZ+TdE= +github.com/tdewolff/minify/v2 v2.20.14/go.mod h1:qnIJbnG2dSzk7LIa/UUwgN2OjS8ir6RRlqc0T/1q2xY= +github.com/tdewolff/parse/v2 v2.7.8 h1:1cnVqa8L63xFkc2vfRsZTM6Qy35nJpTvQ2Uvdv3vbvs= +github.com/tdewolff/parse/v2 v2.7.8/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA= +github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo= +github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8= 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/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= @@ -1277,19 +1380,46 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vulpine-io/io-test v1.0.0 h1:Ot8vMh+ssm1VWDAwJ3U4C5qG9aRnr5YfQFZPNZBAUGI= github.com/vulpine-io/io-test v1.0.0/go.mod h1:X1I+p5GCxVX9m4nFd1HBtr2bVX9v1ZE6x8w+Obt36AU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= 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/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1352,8 +1482,8 @@ 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.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= @@ -1387,8 +1517,10 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/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.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1400,8 +1532,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/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= @@ -1427,9 +1559,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.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-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= @@ -1442,6 +1576,7 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1492,8 +1627,11 @@ 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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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= @@ -1519,8 +1657,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1535,8 +1673,9 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1562,6 +1701,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/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-20190916202348-b4ddaad3f8a3/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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1615,6 +1755,7 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1638,16 +1779,23 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 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= @@ -1659,8 +1807,11 @@ 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= @@ -1728,9 +1879,11 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1910,12 +2063,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1958,8 +2111,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2013,6 +2166,10 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM= +gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA= +gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s= +gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2051,6 +2208,8 @@ modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= +moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= +moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= diff --git a/itest/e2e_test.go b/itest/e2e_test.go index 44cde78b..355cef1e 100644 --- a/itest/e2e_test.go +++ b/itest/e2e_test.go @@ -79,13 +79,13 @@ func TestDoubleSigning(t *testing.T) { tm.CheckBlockFinalization(t, lastVotedHeight, 1) t.Logf("the block at height %v is finalized", lastVotedHeight) - finalizedBlocks := tm.WaitForNFinalizedBlocks(t, 1) + finalizedBlockHeight := tm.WaitForNFinalizedBlocksAndReturnTipHeight(t, 1) // attack: manually submit a finality vote over a conflicting block // to trigger the extraction of finality-provider's private key r := rand.New(rand.NewSource(time.Now().UnixNano())) b := &types.BlockInfo{ - Height: finalizedBlocks[0].Height, + Height: finalizedBlockHeight, Hash: datagen.GenRandomByteArray(r, 32), } _, extractedKey, err := fpIns.TestSubmitFinalitySignatureAndExtractPrivKey(b) @@ -137,7 +137,7 @@ func TestMultipleFinalityProviders(t *testing.T) { _ = tm.WaitForNActiveDels(t, n) // check there's a block finalized - _ = tm.WaitForNFinalizedBlocks(t, 1) + _ = tm.WaitForNFinalizedBlocksAndReturnTipHeight(t, 1) } // TestFastSync tests the fast sync process where the finality-provider is terminated and restarted with fast sync @@ -167,23 +167,34 @@ func TestFastSync(t *testing.T) { t.Logf("the block at height %v is finalized", lastVotedHeight) - var finalizedBlocks []*types.BlockInfo - finalizedBlocks = tm.WaitForNFinalizedBlocks(t, 1) + var finalizedHeight uint64 + finalizedHeight = tm.WaitForNFinalizedBlocksAndReturnTipHeight(t, 1) - n := 3 + var n uint = 3 // stop the finality-provider for a few blocks then restart to trigger the fast sync tm.FpConfig.FastSyncGap = uint64(n) tm.StopAndRestartFpAfterNBlocks(t, n, fpIns) // check there are n+1 blocks finalized - finalizedBlocks = tm.WaitForNFinalizedBlocks(t, n+1) - finalizedHeight := finalizedBlocks[0].Height + finalizedHeight = tm.WaitForNFinalizedBlocksAndReturnTipHeight(t, n+1) t.Logf("the latest finalized block is at %v", finalizedHeight) // check if the fast sync works by checking if the gap is not more than 1 - currentHeaderRes, err := tm.BBNClient.QueryBestBlock() - currentHeight := currentHeaderRes.Height + currentHeight, err := tm.BBNConsumerClient.QueryLatestBlockHeight() t.Logf("the current block is at %v", currentHeight) require.NoError(t, err) require.True(t, currentHeight < finalizedHeight+uint64(n)) } + +// TestConsumerFinalityProviderRegistration tests finality-provider registration for a consumer chain +func TestConsumerFinalityProviderRegistration(t *testing.T) { + tm, _, _ := StartManagerWithFinalityProvider(t, 1) + defer tm.Stop(t) + + consumerChainID := "consumer-chain-test-1" + + _, err := tm.BBNClient.RegisterConsumerChain(consumerChainID, "Consumer chain 1 (test)", "Test Consumer Chain 1") + require.NoError(t, err) + + tm.CreateFinalityProvidersForChain(t, consumerChainID, 1) +} diff --git a/itest/test_manager.go b/itest/test_manager.go index 63af3876..1ce9d965 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -62,6 +62,7 @@ type TestManager struct { Fpa *service.FinalityProviderApp EOTSClient *client.EOTSManagerGRpcClient BBNClient *fpcc.BabylonController + BBNConsumerClient *fpcc.BabylonConsumerController StakingParams *types.StakingParams CovenantPrivKeys []*btcec.PrivateKey baseDir string @@ -103,6 +104,8 @@ func StartManager(t *testing.T) *TestManager { cfg := defaultFpConfig(bh.GetNodeDataDir(), fpHomeDir) bc, err := fpcc.NewBabylonController(cfg.BabylonConfig, &cfg.BTCNetParams, logger) require.NoError(t, err) + bcc, err := fpcc.NewBabylonConsumerController(cfg.BabylonConfig, &cfg.BTCNetParams, logger) + require.NoError(t, err) // 3. prepare EOTS manager eotsHomeDir := filepath.Join(testDir, "eots-home") @@ -115,7 +118,7 @@ func StartManager(t *testing.T) *TestManager { // 4. prepare finality-provider fpdb, err := cfg.DatabaseConfig.GetDbBackend() require.NoError(t, err) - fpApp, err := service.NewFinalityProviderApp(cfg, bc, eotsCli, fpdb, logger) + fpApp, err := service.NewFinalityProviderApp(cfg, bc, bcc, eotsCli, fpdb, logger) require.NoError(t, err) err = fpApp.Start() require.NoError(t, err) @@ -128,6 +131,7 @@ func StartManager(t *testing.T) *TestManager { Fpa: fpApp, EOTSClient: eotsCli, BBNClient: bc, + BBNConsumerClient: bcc, CovenantPrivKeys: covenantPrivKeys, baseDir: testDir, } @@ -221,6 +225,75 @@ func StartManagerWithFinalityProvider(t *testing.T, n int) (*TestManager, []*ser return tm, fpInsList, registeredEpoch } +func (tm *TestManager) CreateFinalityProvidersForChain(t *testing.T, chainID string, n int) []*service.FinalityProviderInstance { + app := tm.Fpa + cfg := app.GetConfig() + + // register all finality providers + registeredEpoch := uint64(0) + fpPKs := make([]*bbntypes.BIP340PubKey, 0, n) + for i := 0; i < n; i++ { + fpName := fpNamePrefix + chainID + "-" + strconv.Itoa(i) + moniker := monikerPrefix + chainID + "-" + strconv.Itoa(i) + commission := sdkmath.LegacyZeroDec() + desc := newDescription(moniker) + _, err := service.CreateChainKey(cfg.BabylonConfig.KeyDirectory, chainID, fpName, keyring.BackendTest, passphrase, hdPath, "") + require.NoError(t, err) + res, err := app.CreateFinalityProvider(fpName, chainID, passphrase, hdPath, desc, &commission) + require.NoError(t, err) + fpPk, err := bbntypes.NewBIP340PubKeyFromHex(res.FpInfo.BtcPkHex) + require.NoError(t, err) + fpPKs = append(fpPKs, fpPk) + resp, err := app.RegisterFinalityProvider(fpPk.MarshalHex()) + require.NoError(t, err) + registeredEpoch = resp.RegisteredEpoch // last registered epoch + } + + // wait until the last registered epoch is finalised + tm.FinalizeUntilEpoch(t, registeredEpoch) + + for i := 0; i < n; i++ { + // start + err := app.StartHandlingFinalityProvider(fpPKs[i], passphrase) + require.NoError(t, err) + fpIns, err := app.GetFinalityProviderInstance(fpPKs[i]) + require.NoError(t, err) + require.True(t, fpIns.IsRunning()) + require.NoError(t, err) + } + + // check finality providers on Babylon side + require.Eventually(t, func() bool { + fps, err := tm.BBNClient.QueryFinalityProviders() + if err != nil { + t.Logf("failed to query finality providers from Babylon %s", err.Error()) + return false + } + + if len(fps) != n { + return false + } + + for _, fp := range fps { + if !strings.Contains(fp.Description.Moniker, monikerPrefix) { + return false + } + if !fp.Commission.Equal(sdkmath.LegacyZeroDec()) { + return false + } + } + + return true + }, eventuallyWaitTimeOut, eventuallyPollTime) + + fpInsList := app.ListFinalityProviderInstancesForChain(chainID) + require.Equal(t, n, len(fpInsList)) + + t.Logf("the test manager is running with %v finality-provider(s)", len(fpInsList)) + + return fpInsList +} + func (tm *TestManager) Stop(t *testing.T) { err := tm.Fpa.Stop() require.NoError(t, err) @@ -313,12 +386,12 @@ func (tm *TestManager) CheckBlockFinalization(t *testing.T, height uint64, num i // as the votes have been collected, the block should be finalized require.Eventually(t, func() bool { - b, err := tm.BBNClient.QueryBlock(height) + finalized, err := tm.BBNConsumerClient.QueryIsBlockFinalized(height) if err != nil { t.Logf("failed to query block at height %v: %s", height, err.Error()) return false } - return b.Finalized + return finalized }, eventuallyWaitTimeOut, eventuallyPollTime) } @@ -336,23 +409,31 @@ func (tm *TestManager) WaitForFpVoteCast(t *testing.T, fpIns *service.FinalityPr return lastVotedHeight } -func (tm *TestManager) WaitForNFinalizedBlocks(t *testing.T, n int) []*types.BlockInfo { +func (tm *TestManager) WaitForNFinalizedBlocksAndReturnTipHeight(t *testing.T, n uint) uint64 { var ( - blocks []*types.BlockInfo - err error + firstFinalizedBlock *types.BlockInfo + err error + lastFinalizedBlock *types.BlockInfo ) + require.Eventually(t, func() bool { - blocks, err = tm.BBNClient.QueryLatestFinalizedBlocks(uint64(n)) + lastFinalizedBlock, err = tm.BBNConsumerClient.QueryLatestFinalizedBlock() if err != nil { t.Logf("failed to get the latest finalized block: %s", err.Error()) return false } - return len(blocks) == n + if lastFinalizedBlock == nil { + return false + } + if firstFinalizedBlock == nil { + firstFinalizedBlock = lastFinalizedBlock + } + return lastFinalizedBlock.Height-firstFinalizedBlock.Height >= uint64(n-1) }, eventuallyWaitTimeOut, eventuallyPollTime) - t.Logf("the block is finalized at %v", blocks[0].Height) + t.Logf("the block is finalized at %v", lastFinalizedBlock.Height) - return blocks + return lastFinalizedBlock.Height } func (tm *TestManager) WaitForFpShutDown(t *testing.T, pk *bbntypes.BIP340PubKey) { @@ -364,19 +445,19 @@ func (tm *TestManager) WaitForFpShutDown(t *testing.T, pk *bbntypes.BIP340PubKey t.Logf("the finality-provider instance %s is shutdown", pk.MarshalHex()) } -func (tm *TestManager) StopAndRestartFpAfterNBlocks(t *testing.T, n int, fpIns *service.FinalityProviderInstance) { - blockBeforeStop, err := tm.BBNClient.QueryBestBlock() +func (tm *TestManager) StopAndRestartFpAfterNBlocks(t *testing.T, n uint, fpIns *service.FinalityProviderInstance) { + blockBeforeStopHeight, err := tm.BBNConsumerClient.QueryLatestBlockHeight() require.NoError(t, err) err = fpIns.Stop() require.NoError(t, err) require.Eventually(t, func() bool { - headerAfterStop, err := tm.BBNClient.QueryBestBlock() + headerAfterStopHeight, err := tm.BBNConsumerClient.QueryLatestBlockHeight() if err != nil { return false } - return headerAfterStop.Height >= uint64(n)+blockBeforeStop.Height + return headerAfterStopHeight >= uint64(n)+blockBeforeStopHeight }, eventuallyWaitTimeOut, eventuallyPollTime) t.Log("restarting the finality-provider instance") @@ -851,7 +932,12 @@ func (tm *TestManager) FinalizeUntilEpoch(t *testing.T, epoch uint64) { opReturn1.SpvProof, opReturn2.SpvProof, }) - require.NoError(t, err) + if err != nil { + if strings.Contains(err.Error(), "Epoch already finalized") { + continue + } + require.NoError(t, err) + } // wait until this checkpoint is submitted require.Eventually(t, func() bool { diff --git a/testutil/mocks/babylon.go b/testutil/mocks/clientcontroller.go similarity index 52% rename from testutil/mocks/babylon.go rename to testutil/mocks/clientcontroller.go index bf9cc8bb..a14aa958 100644 --- a/testutil/mocks/babylon.go +++ b/testutil/mocks/clientcontroller.go @@ -50,38 +50,106 @@ func (mr *MockClientControllerMockRecorder) Close() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClientController)(nil).Close)) } -// QueryActivatedHeight mocks base method. -func (m *MockClientController) QueryActivatedHeight() (uint64, error) { +// QueryFinalityProviderSlashed mocks base method. +func (m *MockClientController) QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryActivatedHeight") + ret := m.ctrl.Call(m, "QueryFinalityProviderSlashed", fpPk) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryFinalityProviderSlashed indicates an expected call of QueryFinalityProviderSlashed. +func (mr *MockClientControllerMockRecorder) QueryFinalityProviderSlashed(fpPk interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinalityProviderSlashed", reflect.TypeOf((*MockClientController)(nil).QueryFinalityProviderSlashed), fpPk) +} + +// QueryLastFinalizedEpoch mocks base method. +func (m *MockClientController) QueryLastFinalizedEpoch() (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryLastFinalizedEpoch") ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 } -// QueryActivatedHeight indicates an expected call of QueryActivatedHeight. -func (mr *MockClientControllerMockRecorder) QueryActivatedHeight() *gomock.Call { +// QueryLastFinalizedEpoch indicates an expected call of QueryLastFinalizedEpoch. +func (mr *MockClientControllerMockRecorder) QueryLastFinalizedEpoch() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryActivatedHeight", reflect.TypeOf((*MockClientController)(nil).QueryActivatedHeight)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryLastFinalizedEpoch", reflect.TypeOf((*MockClientController)(nil).QueryLastFinalizedEpoch)) } -// QueryBestBlock mocks base method. -func (m *MockClientController) QueryBestBlock() (*types.BlockInfo, error) { +// RegisterFinalityProvider mocks base method. +func (m *MockClientController) RegisterFinalityProvider(chainID string, chainPk []byte, fpPk *btcec.PublicKey, pop []byte, commission *math.LegacyDec, description []byte, masterPubRand string) (*types.TxResponse, uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryBestBlock") - ret0, _ := ret[0].(*types.BlockInfo) + ret := m.ctrl.Call(m, "RegisterFinalityProvider", chainID, chainPk, fpPk, pop, commission, description, masterPubRand) + ret0, _ := ret[0].(*types.TxResponse) + ret1, _ := ret[1].(uint64) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// RegisterFinalityProvider indicates an expected call of RegisterFinalityProvider. +func (mr *MockClientControllerMockRecorder) RegisterFinalityProvider(chainID, chainPk, fpPk, pop, commission, description, masterPubRand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterFinalityProvider", reflect.TypeOf((*MockClientController)(nil).RegisterFinalityProvider), chainID, chainPk, fpPk, pop, commission, description, masterPubRand) +} + +// MockConsumerController is a mock of ConsumerController interface. +type MockConsumerController struct { + ctrl *gomock.Controller + recorder *MockConsumerControllerMockRecorder +} + +// MockConsumerControllerMockRecorder is the mock recorder for MockConsumerController. +type MockConsumerControllerMockRecorder struct { + mock *MockConsumerController +} + +// NewMockConsumerController creates a new mock instance. +func NewMockConsumerController(ctrl *gomock.Controller) *MockConsumerController { + mock := &MockConsumerController{ctrl: ctrl} + mock.recorder = &MockConsumerControllerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockConsumerController) EXPECT() *MockConsumerControllerMockRecorder { + return m.recorder +} + +// Close mocks base method. +func (m *MockConsumerController) Close() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close") + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockConsumerControllerMockRecorder) Close() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConsumerController)(nil).Close)) +} + +// QueryActivatedHeight mocks base method. +func (m *MockConsumerController) QueryActivatedHeight() (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryActivatedHeight") + ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 } -// QueryBestBlock indicates an expected call of QueryBestBlock. -func (mr *MockClientControllerMockRecorder) QueryBestBlock() *gomock.Call { +// QueryActivatedHeight indicates an expected call of QueryActivatedHeight. +func (mr *MockConsumerControllerMockRecorder) QueryActivatedHeight() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBestBlock", reflect.TypeOf((*MockClientController)(nil).QueryBestBlock)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryActivatedHeight", reflect.TypeOf((*MockConsumerController)(nil).QueryActivatedHeight)) } // QueryBlock mocks base method. -func (m *MockClientController) QueryBlock(height uint64) (*types.BlockInfo, error) { +func (m *MockConsumerController) QueryBlock(height uint64) (*types.BlockInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "QueryBlock", height) ret0, _ := ret[0].(*types.BlockInfo) @@ -90,13 +158,13 @@ func (m *MockClientController) QueryBlock(height uint64) (*types.BlockInfo, erro } // QueryBlock indicates an expected call of QueryBlock. -func (mr *MockClientControllerMockRecorder) QueryBlock(height interface{}) *gomock.Call { +func (mr *MockConsumerControllerMockRecorder) QueryBlock(height interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBlock", reflect.TypeOf((*MockClientController)(nil).QueryBlock), height) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBlock", reflect.TypeOf((*MockConsumerController)(nil).QueryBlock), height) } // QueryBlocks mocks base method. -func (m *MockClientController) QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) { +func (m *MockConsumerController) QueryBlocks(startHeight, endHeight, limit uint64) ([]*types.BlockInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "QueryBlocks", startHeight, endHeight, limit) ret0, _ := ret[0].([]*types.BlockInfo) @@ -105,28 +173,13 @@ func (m *MockClientController) QueryBlocks(startHeight, endHeight, limit uint64) } // QueryBlocks indicates an expected call of QueryBlocks. -func (mr *MockClientControllerMockRecorder) QueryBlocks(startHeight, endHeight, limit interface{}) *gomock.Call { +func (mr *MockConsumerControllerMockRecorder) QueryBlocks(startHeight, endHeight, limit interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBlocks", reflect.TypeOf((*MockClientController)(nil).QueryBlocks), startHeight, endHeight, limit) -} - -// QueryFinalityProviderSlashed mocks base method. -func (m *MockClientController) QueryFinalityProviderSlashed(fpPk *btcec.PublicKey) (bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryFinalityProviderSlashed", fpPk) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// QueryFinalityProviderSlashed indicates an expected call of QueryFinalityProviderSlashed. -func (mr *MockClientControllerMockRecorder) QueryFinalityProviderSlashed(fpPk interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinalityProviderSlashed", reflect.TypeOf((*MockClientController)(nil).QueryFinalityProviderSlashed), fpPk) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBlocks", reflect.TypeOf((*MockConsumerController)(nil).QueryBlocks), startHeight, endHeight, limit) } // QueryFinalityProviderVotingPower mocks base method. -func (m *MockClientController) QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) { +func (m *MockConsumerController) QueryFinalityProviderVotingPower(fpPk *btcec.PublicKey, blockHeight uint64) (uint64, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "QueryFinalityProviderVotingPower", fpPk, blockHeight) ret0, _ := ret[0].(uint64) @@ -135,59 +188,58 @@ func (m *MockClientController) QueryFinalityProviderVotingPower(fpPk *btcec.Publ } // QueryFinalityProviderVotingPower indicates an expected call of QueryFinalityProviderVotingPower. -func (mr *MockClientControllerMockRecorder) QueryFinalityProviderVotingPower(fpPk, blockHeight interface{}) *gomock.Call { +func (mr *MockConsumerControllerMockRecorder) QueryFinalityProviderVotingPower(fpPk, blockHeight interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinalityProviderVotingPower", reflect.TypeOf((*MockClientController)(nil).QueryFinalityProviderVotingPower), fpPk, blockHeight) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinalityProviderVotingPower", reflect.TypeOf((*MockConsumerController)(nil).QueryFinalityProviderVotingPower), fpPk, blockHeight) } -// QueryLastFinalizedEpoch mocks base method. -func (m *MockClientController) QueryLastFinalizedEpoch() (uint64, error) { +// QueryIsBlockFinalized mocks base method. +func (m *MockConsumerController) QueryIsBlockFinalized(height uint64) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryLastFinalizedEpoch") - ret0, _ := ret[0].(uint64) + ret := m.ctrl.Call(m, "QueryIsBlockFinalized", height) + ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } -// QueryLastFinalizedEpoch indicates an expected call of QueryLastFinalizedEpoch. -func (mr *MockClientControllerMockRecorder) QueryLastFinalizedEpoch() *gomock.Call { +// QueryIsBlockFinalized indicates an expected call of QueryIsBlockFinalized. +func (mr *MockConsumerControllerMockRecorder) QueryIsBlockFinalized(height interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryLastFinalizedEpoch", reflect.TypeOf((*MockClientController)(nil).QueryLastFinalizedEpoch)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryIsBlockFinalized", reflect.TypeOf((*MockConsumerController)(nil).QueryIsBlockFinalized), height) } -// QueryLatestFinalizedBlocks mocks base method. -func (m *MockClientController) QueryLatestFinalizedBlocks(count uint64) ([]*types.BlockInfo, error) { +// QueryLatestBlockHeight mocks base method. +func (m *MockConsumerController) QueryLatestBlockHeight() (uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryLatestFinalizedBlocks", count) - ret0, _ := ret[0].([]*types.BlockInfo) + ret := m.ctrl.Call(m, "QueryLatestBlockHeight") + ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 } -// QueryLatestFinalizedBlocks indicates an expected call of QueryLatestFinalizedBlocks. -func (mr *MockClientControllerMockRecorder) QueryLatestFinalizedBlocks(count interface{}) *gomock.Call { +// QueryLatestBlockHeight indicates an expected call of QueryLatestBlockHeight. +func (mr *MockConsumerControllerMockRecorder) QueryLatestBlockHeight() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryLatestFinalizedBlocks", reflect.TypeOf((*MockClientController)(nil).QueryLatestFinalizedBlocks), count) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryLatestBlockHeight", reflect.TypeOf((*MockConsumerController)(nil).QueryLatestBlockHeight)) } -// RegisterFinalityProvider mocks base method. -func (m *MockClientController) RegisterFinalityProvider(chainPk []byte, fpPk *btcec.PublicKey, pop []byte, commission *math.LegacyDec, description []byte, masterPubRand string) (*types.TxResponse, uint64, error) { +// QueryLatestFinalizedBlock mocks base method. +func (m *MockConsumerController) QueryLatestFinalizedBlock() (*types.BlockInfo, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterFinalityProvider", chainPk, fpPk, pop, commission, description, masterPubRand) - ret0, _ := ret[0].(*types.TxResponse) - ret1, _ := ret[1].(uint64) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 + ret := m.ctrl.Call(m, "QueryLatestFinalizedBlock") + ret0, _ := ret[0].(*types.BlockInfo) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// RegisterFinalityProvider indicates an expected call of RegisterFinalityProvider. -func (mr *MockClientControllerMockRecorder) RegisterFinalityProvider(chainPk, fpPk, pop, commission, description, masterPubRand interface{}) *gomock.Call { +// QueryLatestFinalizedBlock indicates an expected call of QueryLatestFinalizedBlock. +func (mr *MockConsumerControllerMockRecorder) QueryLatestFinalizedBlock() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterFinalityProvider", reflect.TypeOf((*MockClientController)(nil).RegisterFinalityProvider), chainPk, fpPk, pop, commission, description, masterPubRand) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryLatestFinalizedBlock", reflect.TypeOf((*MockConsumerController)(nil).QueryLatestFinalizedBlock)) } // SubmitBatchFinalitySigs mocks base method. -func (m *MockClientController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, blocks []*types.BlockInfo, sigs []*btcec.ModNScalar) (*types.TxResponse, error) { +func (m *MockConsumerController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, blocks []*types.BlockInfo, sigs []*btcec.ModNScalar) (*types.TxResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SubmitBatchFinalitySigs", fpPk, blocks, sigs) ret0, _ := ret[0].(*types.TxResponse) @@ -196,13 +248,13 @@ func (m *MockClientController) SubmitBatchFinalitySigs(fpPk *btcec.PublicKey, bl } // SubmitBatchFinalitySigs indicates an expected call of SubmitBatchFinalitySigs. -func (mr *MockClientControllerMockRecorder) SubmitBatchFinalitySigs(fpPk, blocks, sigs interface{}) *gomock.Call { +func (mr *MockConsumerControllerMockRecorder) SubmitBatchFinalitySigs(fpPk, blocks, sigs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitBatchFinalitySigs", reflect.TypeOf((*MockClientController)(nil).SubmitBatchFinalitySigs), fpPk, blocks, sigs) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitBatchFinalitySigs", reflect.TypeOf((*MockConsumerController)(nil).SubmitBatchFinalitySigs), fpPk, blocks, sigs) } // SubmitFinalitySig mocks base method. -func (m *MockClientController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) { +func (m *MockConsumerController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHeight uint64, blockHash []byte, sig *btcec.ModNScalar) (*types.TxResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SubmitFinalitySig", fpPk, blockHeight, blockHash, sig) ret0, _ := ret[0].(*types.TxResponse) @@ -211,7 +263,7 @@ func (m *MockClientController) SubmitFinalitySig(fpPk *btcec.PublicKey, blockHei } // SubmitFinalitySig indicates an expected call of SubmitFinalitySig. -func (mr *MockClientControllerMockRecorder) SubmitFinalitySig(fpPk, blockHeight, blockHash, sig interface{}) *gomock.Call { +func (mr *MockConsumerControllerMockRecorder) SubmitFinalitySig(fpPk, blockHeight, blockHash, sig interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitFinalitySig", reflect.TypeOf((*MockClientController)(nil).SubmitFinalitySig), fpPk, blockHeight, blockHash, sig) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitFinalitySig", reflect.TypeOf((*MockConsumerController)(nil).SubmitFinalitySig), fpPk, blockHeight, blockHash, sig) } diff --git a/testutil/utils.go b/testutil/utils.go index 76f14af2..05bc4c25 100644 --- a/testutil/utils.go +++ b/testutil/utils.go @@ -18,26 +18,31 @@ func ZeroCommissionRate() *sdkmath.LegacyDec { return &zeroCom } -func PrepareMockedClientController(t *testing.T, r *rand.Rand, startHeight, currentHeight uint64) *mocks.MockClientController { +func PrepareMockedConsumerController(t *testing.T, r *rand.Rand, startHeight, currentHeight uint64) *mocks.MockConsumerController { ctl := gomock.NewController(t) - mockClientController := mocks.NewMockClientController(ctl) + mockConsumerController := mocks.NewMockConsumerController(ctl) for i := startHeight + 1; i <= currentHeight; i++ { resBlock := &types.BlockInfo{ Height: currentHeight, Hash: GenRandomByteArray(r, 32), } - mockClientController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() + mockConsumerController.EXPECT().QueryBlock(i).Return(resBlock, nil).AnyTimes() } - currentBlockRes := &types.BlockInfo{ - Height: currentHeight, - Hash: GenRandomByteArray(r, 32), - } + mockConsumerController.EXPECT().Close().Return(nil).AnyTimes() + mockConsumerController.EXPECT().QueryLatestBlockHeight().Return(currentHeight, nil).AnyTimes() + mockConsumerController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() + + return mockConsumerController +} - mockClientController.EXPECT().Close().Return(nil).AnyTimes() - mockClientController.EXPECT().QueryBestBlock().Return(currentBlockRes, nil).AnyTimes() - mockClientController.EXPECT().QueryActivatedHeight().Return(uint64(1), nil).AnyTimes() +func PrepareMockedBabylonController(t *testing.T, randomRegiteredEpoch uint64) *mocks.MockClientController { + ctl := gomock.NewController(t) + mockBabylonController := mocks.NewMockClientController(ctl) + // mock finalised BTC timestamped + mockBabylonController.EXPECT().QueryLastFinalizedEpoch().Return(randomRegiteredEpoch, nil).AnyTimes() + mockBabylonController.EXPECT().Close().Return(nil).AnyTimes() - return mockClientController + return mockBabylonController } diff --git a/tools/go.mod b/tools/go.mod index 71cc1f36..827924e6 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -7,7 +7,7 @@ toolchain go1.21.4 require github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b require ( - cloud.google.com/go v0.110.10 // indirect + cloud.google.com/go v0.111.0 // indirect cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.5 // indirect @@ -93,6 +93,8 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -186,6 +188,9 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect @@ -196,13 +201,12 @@ require ( golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.153.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/grpc v1.60.1 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/grpc v1.61.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -217,5 +221,6 @@ require ( replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + github.com/babylonchain/babylon => github.com/babylonchain/babylon-private v0.8.6-0.20240517085408-3b1be7e7a63f github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/tools/go.sum b/tools/go.sum index f701268d..34829e60 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -30,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -268,8 +268,8 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b h1:HfjAGZiebrcInFAq8Lk8MXbKbtTYxRoO65vfLPOCXzw= -github.com/babylonchain/babylon v0.8.6-0.20240416015120-ffeb9c5b930b/go.mod h1:lfeASLNJgcUsX7LEns3HRUv0k+MjzcB2q2AMasfz38M= +github.com/babylonchain/babylon-private v0.8.6-0.20240517085408-3b1be7e7a63f h1:B9xJxEaRB7Z/C6bgEFDwNT8qNhCMt1/CZFtYV5+CvaM= +github.com/babylonchain/babylon-private v0.8.6-0.20240517085408-3b1be7e7a63f/go.mod h1:Ku+LtNN6bPMU3H58PiTiFvIWUvEcASigN7kQP87Eg/o= 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= @@ -510,6 +510,11 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -1099,6 +1104,14 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1638,12 +1651,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1685,8 +1698,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/types/blockinfo.go b/types/blockinfo.go index 4fbc3708..ec302ac2 100644 --- a/types/blockinfo.go +++ b/types/blockinfo.go @@ -1,7 +1,6 @@ package types type BlockInfo struct { - Height uint64 - Hash []byte - Finalized bool + Height uint64 + Hash []byte }