From 0cca15676385684d1408aa308c404ef980aff94a Mon Sep 17 00:00:00 2001 From: Philip Offtermatt Date: Mon, 27 Nov 2023 14:39:43 +0100 Subject: [PATCH] Start fixing merge --- cometmock/abci_client/client.go | 140 +------------------------------- cometmock/main.go | 20 +---- cometmock/rpc_server/routes.go | 17 ---- e2e-tests/main_test.go | 56 +------------ e2e-tests/test_utils.go | 14 ++-- go.mod | 8 +- go.sum | 14 +++- 7 files changed, 26 insertions(+), 243 deletions(-) diff --git a/cometmock/abci_client/client.go b/cometmock/abci_client/client.go index 8b25e33..122f15a 100644 --- a/cometmock/abci_client/client.go +++ b/cometmock/abci_client/client.go @@ -13,12 +13,9 @@ import ( "github.com/cometbft/cometbft/crypto/merkle" cometlog "github.com/cometbft/cometbft/libs/log" cmtmath "github.com/cometbft/cometbft/libs/math" -<<<<<<< HEAD cmtstate "github.com/cometbft/cometbft/proto/tendermint/state" cmttypes "github.com/cometbft/cometbft/proto/tendermint/types" -======= cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) "github.com/cometbft/cometbft/state" blockindexkv "github.com/cometbft/cometbft/state/indexer/block/kv" "github.com/cometbft/cometbft/state/txindex" @@ -48,13 +45,10 @@ const ( Equivocation ) -<<<<<<< HEAD -======= -// hardcode max data bytes to -1 (unlimited) since we do not utilize a mempool +// hardcode max data bytes to the maximal since we do not utilize a mempool // to pick evidence/txs out of const maxDataBytes = cmttypes.MaxBlockSizeBytes ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) // AbciClient facilitates calls to the ABCI interface of multiple nodes. // It also tracks the current state and a common logger. type AbciClient struct { @@ -131,11 +125,7 @@ func (a *AbciClient) CauseLightClientAttack(address string, misbehaviourType str return fmt.Errorf("unknown misbehaviour type %s, possible types are: Equivocation, Lunatic, Amnesia", misbehaviourType) } -<<<<<<< HEAD - _, _, _, _, _, err = a.RunBlockWithEvidence(nil, map[*types.Validator]MisbehaviourType{validator: misbehaviour}) -======= err = a.RunBlockWithEvidence(map[*types.Validator]MisbehaviourType{validator: misbehaviour}) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) return err } @@ -147,12 +137,7 @@ func (a *AbciClient) CauseDoubleSign(address string) error { return err } -<<<<<<< HEAD - _, _, _, _, _, err = a.RunBlockWithEvidence(nil, map[*types.Validator]MisbehaviourType{validator: DuplicateVote}) - return err -======= return a.RunBlockWithEvidence(map[*types.Validator]MisbehaviourType{validator: DuplicateVote}) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) } func (a *AbciClient) GetValidatorFromAddress(address string) (*types.Validator, error) { @@ -222,9 +207,6 @@ func CreateAndStartIndexerService(eventBus *types.EventBus, logger cometlog.Logg return indexerService, txIndexer, blockIndexer, indexerService.Start() } -<<<<<<< HEAD -func NewAbciClient(clients []AbciCounterpartyClient, logger cometlog.Logger, curState state.State, lastBlock *types.Block, lastCommit *types.Commit, storage storage.Storage, privValidators map[string]types.PrivValidator, errorOnUnequalResponses bool) *AbciClient { -======= func NewAbciClient( clients map[string]AbciCounterpartyClient, logger cometlog.Logger, @@ -235,7 +217,6 @@ func NewAbciClient( timeHandler TimeHandler, errorOnUnequalResponses bool, ) *AbciClient { ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) signingStatus := make(map[string]bool) for addr := range privValidators { signingStatus[addr] = true @@ -681,11 +662,7 @@ func (a *AbciClient) SendAbciQuery(data []byte, path string, height int64, prove // RunEmptyBlocks runs a specified number of empty blocks through ABCI. func (a *AbciClient) RunEmptyBlocks(numBlocks int) error { for i := 0; i < numBlocks; i++ { -<<<<<<< HEAD - _, _, _, _, _, err := a.RunBlock(nil) -======= err := a.RunBlock() ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) if err != nil { return err } @@ -693,115 +670,6 @@ func (a *AbciClient) RunEmptyBlocks(numBlocks int) error { return nil } -<<<<<<< HEAD -// RunBlock runs a block with a specified transaction through the ABCI application. -// It calls RunBlockWithTimeAndProposer with the current time and the LastValidators.Proposer. -func (a *AbciClient) RunBlock(tx *[]byte) (*abcitypes.ResponseBeginBlock, *abcitypes.ResponseCheckTx, *abcitypes.ResponseDeliverTx, *abcitypes.ResponseEndBlock, *abcitypes.ResponseCommit, error) { - return a.RunBlockWithTimeAndProposer(tx, time.Now().Add(a.timeOffset), a.CurState.LastValidators.Proposer, make(map[*types.Validator]MisbehaviourType, 0)) -======= -func (a *AbciClient) decideProposal( - proposerApp *AbciCounterpartyClient, - proposerVal *types.Validator, - height int64, - round int32, - txs *types.Txs, - misbehaviour []types.Evidence, -) (*types.Proposal, *types.Block, error) { - var block *types.Block - var blockParts *types.PartSet - - // Create a new proposal block from state/txs from the mempool. - var err error - numTxs := len(*txs) - _ = numTxs - block, err = a.CreateProposalBlock( - proposerApp, - proposerVal, - height, - a.CurState, - a.LastCommit, - txs, - &misbehaviour, - ) - if err != nil { - return nil, nil, err - } else if block == nil { - panic("Method createProposalBlock should not provide a nil block without errors") - } - blockParts, err = block.MakePartSet(types.BlockPartSizeBytes) - if err != nil { - return nil, nil, fmt.Errorf("unable to create proposal block part set: %v", err) - } - - // Make proposal - propBlockID := types.BlockID{Hash: block.Hash(), PartSetHeader: blockParts.Header()} - proposal := types.NewProposal(height, round, 0, propBlockID) - p := proposal.ToProto() - if err := proposerApp.PrivValidator.SignProposal(a.CurState.ChainID, p); err == nil { - proposal.Signature = p.Signature - - // TODO: evaluate if we need to emulate message sending - // send proposal and block parts on internal msg queue - // cs.sendInternalMessage(msgInfo{&ProposalMessage{proposal}, ""}) - - // for i := 0; i < int(blockParts.Total()); i++ { - // part := blockParts.GetPart(i) - // cs.sendInternalMessage(msgInfo{&BlockPartMessage{cs.Height, cs.Round, part}, ""}) - // } - - a.Logger.Debug("signed proposal", "height", height, "round", round, "proposal", proposal) - } else { - a.Logger.Error("propose step; failed signing proposal", "height", height, "round", round, "err", err) - } - - return proposal, block, nil -} - -// Create a proposal block with the given height and proposer, -// and including the given tx and misbehaviour. -// Essentially a hollowed-out version of CreateProposalBlock in CometBFT, see -// https://github.com/cometbft/cometbft/blob/33d276831843854881e6365b9696ac39dda12922/state/execution.go#L101 -func (a *AbciClient) CreateProposalBlock( - proposerApp *AbciCounterpartyClient, - proposerVal *types.Validator, - height int64, - curState state.State, - lastExtCommit *types.ExtendedCommit, - txs *types.Txs, - misbehaviour *[]types.Evidence, -) (*types.Block, error) { - commit := lastExtCommit.ToCommit() - - block := curState.MakeBlock(height, *txs, commit, *misbehaviour, proposerVal.Address) - - request := &abcitypes.RequestPrepareProposal{ - MaxTxBytes: maxDataBytes, - Txs: block.Txs.ToSliceOfBytes(), - LocalLastCommit: utils.BuildExtendedCommitInfo(lastExtCommit, curState.LastValidators, curState.InitialHeight, curState.ConsensusParams.ABCI), - Misbehavior: block.Evidence.Evidence.ToABCI(), - Height: block.Height, - Time: block.Time, - NextValidatorsHash: block.NextValidatorsHash, - ProposerAddress: block.ProposerAddress, - } - - ctx, cancel := context.WithTimeout(context.Background(), ABCI_TIMEOUT) - response, err := proposerApp.Client.PrepareProposal(ctx, request) - cancel() - if err != nil { - // We panic, since there is no meaninful recovery we can perform here. - panic(err) - } - - modifiedTxs := response.GetTxs() - txl := types.ToTxs(modifiedTxs) - if err := txl.Validate(maxDataBytes); err != nil { - return nil, err - } - - return curState.MakeBlock(height, txl, commit, *misbehaviour, block.ProposerAddress), nil -} - // RunBlock runs a block with a specified transaction through the ABCI application. // It calls RunBlockWithTimeAndProposer with the current time and the LastValidators.Proposer. func (a *AbciClient) RunBlock() error { @@ -811,19 +679,13 @@ func (a *AbciClient) RunBlock() error { func (a *AbciClient) RunBlockWithTime(t time.Time) error { return a.RunBlockWithTimeAndProposer(t, a.CurState.LastValidators.Proposer, make(map[*types.Validator]MisbehaviourType, 0)) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) } // RunBlockWithEvidence runs a block with a specified transaction through the ABCI application. // It also produces the specified evidence for the specified misbehaving validators. -<<<<<<< HEAD -func (a *AbciClient) RunBlockWithEvidence(tx *[]byte, misbehavingValidators map[*types.Validator]MisbehaviourType) (*abcitypes.ResponseBeginBlock, *abcitypes.ResponseCheckTx, *abcitypes.ResponseDeliverTx, *abcitypes.ResponseEndBlock, *abcitypes.ResponseCommit, error) { - return a.RunBlockWithTimeAndProposer(tx, time.Now().Add(a.timeOffset), a.CurState.LastValidators.Proposer, misbehavingValidators) -======= func (a *AbciClient) RunBlockWithEvidence(misbehavingValidators map[*types.Validator]MisbehaviourType) error { blockTime := a.TimeHandler.GetBlockTime(a.LastBlock.Time) return a.RunBlockWithTimeAndProposer(blockTime, a.CurState.LastValidators.Proposer, misbehavingValidators) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) } func (a *AbciClient) ConstructDuplicateVoteEvidence(v *types.Validator) (*types.DuplicateVoteEvidence, error) { diff --git a/cometmock/main.go b/cometmock/main.go index 52aebc4..4de5f7e 100644 --- a/cometmock/main.go +++ b/cometmock/main.go @@ -140,10 +140,8 @@ or the system time between creating the genesis request and producing the first logger.Error(err.Error()) } -<<<<<<< HEAD clients := []abci_client.AbciCounterpartyClient{} privValsMap := make(map[string]types.PrivValidator) -======= // read starting timestamp from args // if starting timestamp should be taken from genesis, // read it from there @@ -164,9 +162,6 @@ or the system time between creating the genesis request and producing the first blockTime := time.Duration(c.Int64("block-time")) * time.Millisecond fmt.Printf("Block time: %d\n", blockTime.Milliseconds()) - clientMap := make(map[string]abci_client.AbciCounterpartyClient) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) - for i, appAddress := range appAddresses { logger.Info("Connecting to client at %v", appAddress) @@ -221,21 +216,16 @@ or the system time between creating the genesis request and producing the first &types.Block{}, &types.Commit{}, &storage.MapStorage{}, -<<<<<<< HEAD privValsMap, + timeHandler, true, ) // connect to clients abci_client.GlobalClient.RetryDisconnectedClients() -======= - timeHandler, - true, - ) abci_client.GlobalClient.AutoIncludeTx = c.Bool("auto-tx") fmt.Printf("Auto include tx: %t\n", abci_client.GlobalClient.AutoIncludeTx) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) // initialize chain err = abci_client.GlobalClient.SendInitChain(curState, genesisDoc) @@ -252,11 +242,7 @@ or the system time between creating the genesis request and producing the first } // run an empty block -<<<<<<< HEAD - _, _, _, _, _, err = abci_client.GlobalClient.RunBlock(nil) -======= err = abci_client.GlobalClient.RunBlockWithTime(firstBlockTime) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) if err != nil { logger.Error(err.Error()) panic(err) @@ -267,11 +253,7 @@ or the system time between creating the genesis request and producing the first if blockProductionInterval > 0 { // produce blocks according to blockTime for { -<<<<<<< HEAD - _, _, _, _, _, err := abci_client.GlobalClient.RunBlock(nil) -======= err := abci_client.GlobalClient.RunBlock() ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) if err != nil { logger.Error(err.Error()) panic(err) diff --git a/cometmock/rpc_server/routes.go b/cometmock/rpc_server/routes.go index 6bc10b3..fd3d7de 100644 --- a/cometmock/rpc_server/routes.go +++ b/cometmock/rpc_server/routes.go @@ -10,12 +10,9 @@ import ( cmtmath "github.com/cometbft/cometbft/libs/math" cmtquery "github.com/cometbft/cometbft/libs/pubsub/query" "github.com/cometbft/cometbft/p2p" -<<<<<<< HEAD cometp2p "github.com/cometbft/cometbft/p2p" -======= abcitypes "github.com/cometbft/cometbft/abci/types" ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) ctypes "github.com/cometbft/cometbft/rpc/core/types" rpc "github.com/cometbft/cometbft/rpc/jsonrpc/server" rpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types" @@ -488,14 +485,8 @@ func BroadcastTx(tx *types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { abci_client.GlobalClient.Logger.Info( "BroadcastTxs called", "tx", tx) -<<<<<<< HEAD - byteTx := []byte(*tx) - - _, responseCheckTx, responseDeliverTx, _, _, err := abci_client.GlobalClient.RunBlock(&byteTx) -======= txBytes := []byte(*tx) checkTxResponse, err := abci_client.GlobalClient.SendCheckTx(abcitypes.CheckTxType_New, &txBytes) ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) if err != nil { return nil, err } @@ -506,18 +497,10 @@ func BroadcastTx(tx *types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { } return &ctypes.ResultBroadcastTxCommit{ -<<<<<<< HEAD - CheckTx: *responseCheckTx, - DeliverTx: *responseDeliverTx, - Height: abci_client.GlobalClient.LastBlock.Height, - Hash: tx.Hash(), - }, nil -======= CheckTx: *checkTxResponse, Hash: tx.Hash(), Height: abci_client.GlobalClient.CurState.LastBlockHeight, }, err ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) } func ABCIInfo(ctx *rpctypes.Context) (*ctypes.ResultABCIInfo, error) { diff --git a/e2e-tests/main_test.go b/e2e-tests/main_test.go index a345554..17570a9 100644 --- a/e2e-tests/main_test.go +++ b/e2e-tests/main_test.go @@ -11,58 +11,10 @@ import ( "github.com/stretchr/testify/require" ) -<<<<<<< HEAD -func runCommandWithOutput(cmd *exec.Cmd) (string, error) { - var stdout, stderr bytes.Buffer - cmd.Stdout = &stdout - cmd.Stderr = &stderr - - err := cmd.Run() - if err != nil { - return "", fmt.Errorf("error running command: %v\nstdout: %s\nstderr: %s", err, stdout.String(), stderr.String()) - } - - return stdout.String(), nil -} - -// From the output of the AbciInfo command, extract the latest block height. -// The json bytes should look e.g. like this: -// {"jsonrpc":"2.0","id":1,"result":{"response":{"data":"interchain-security-p","last_block_height":"2566","last_block_app_hash":"R4Q3Si7+t7TIidl2oTHcQRDNEz+lP0IDWhU5OI89psg="}}} -func extractHeightFromInfo(jsonBytes []byte) (int, error) { - // Use a generic map to represent the JSON structure - var data map[string]interface{} - - if err := json.Unmarshal(jsonBytes, &data); err != nil { - return -1, fmt.Errorf("Failed to unmarshal JSON %s \n error was %v", string(jsonBytes), err) - } - - // Navigate the map and use type assertions to get the last_block_height - result, ok := data["result"].(map[string]interface{}) - if !ok { - return -1, fmt.Errorf("Failed to navigate abci_info output structure trying to access result: json was %s", string(jsonBytes)) - } - - response, ok := result["response"].(map[string]interface{}) - if !ok { - return -1, fmt.Errorf("Failed to navigate abci_info output structure trying to access response: json was %s", string(jsonBytes)) - } - - lastBlockHeight, ok := response["last_block_height"].(string) - if !ok { - return -1, fmt.Errorf("Failed to navigate abci_info output structure trying to access last_block_height: json was %s", string(jsonBytes)) - } - - return strconv.Atoi(lastBlockHeight) -} - -// Tests happy path functionality for Abci Info. -func TestAbciInfo(t *testing.T) { -======= func StartChain( t *testing.T, cometmockArgs string, ) error { ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) // execute the local-testnet-singlechain.sh script t.Log("Running local-testnet-singlechain.sh") cmd := exec.Command("./local-testnet-singlechain-restart.sh", "simd") @@ -89,8 +41,6 @@ func StartChain( t.Log("Waiting for blocks to be produced, latest output: ", string(out)) time.Sleep(1 * time.Second) } -<<<<<<< HEAD -======= time.Sleep(5 * time.Second) return nil } @@ -102,12 +52,11 @@ func TestAbciInfo(t *testing.T) { if err != nil { t.Fatalf("Error starting chain: %v", err) } ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) // call the abci_info command by calling curl on the REST endpoint // curl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{"jsonrpc":"2.0","method":"abci_info","id":1}' 127.0.0.1:22331 args := []string{"bash", "-c", "curl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{\"jsonrpc\":\"2.0\",\"method\":\"abci_info\",\"id\":1}' 127.0.0.1:22331"} - cmd = exec.Command(args[0], args[1:]...) + cmd := exec.Command(args[0], args[1:]...) out, err := runCommandWithOutput(cmd) if err != nil { t.Fatalf("Error running curl\ncommand: %v\noutput: %v\nerror: %v", cmd, string(out), err) @@ -140,8 +89,6 @@ func TestAbciInfo(t *testing.T) { t.Fatalf("Expected block height to increase, but it did not. First height was %v, second height was %v", height, height2) } } -<<<<<<< HEAD -======= func TestAbciQuery(t *testing.T) { // start the chain @@ -385,4 +332,3 @@ func TestSystemStartingTime(t *testing.T) { require.True(t, diff <= delta, "expectedTime: %v, blockTime: %v", expectedTime, blockTime) } ->>>>>>> 7edb4c1 (Add fine-grained control of time (#88)) diff --git a/e2e-tests/test_utils.go b/e2e-tests/test_utils.go index 0f92b56..2cc4ced 100644 --- a/e2e-tests/test_utils.go +++ b/e2e-tests/test_utils.go @@ -54,10 +54,12 @@ func QueryBlock() (string, error) { } type BlockInfo struct { - Header struct { - Height string `json:"height"` - Time string `json:"time"` - } `json:"header"` + Block struct { + Header struct { + Height string `json:"height"` + Time string `json:"time"` + } `json:"header"` + } `json:"block"` } func GetHeightFromBlock(blockString string) (int, error) { @@ -67,7 +69,7 @@ func GetHeightFromBlock(blockString string) (int, error) { return 0, err } - res, err := strconv.Atoi(block.Header.Height) + res, err := strconv.Atoi(block.Block.Header.Height) if err != nil { return 0, err } @@ -82,7 +84,7 @@ func GetTimeFromBlock(blockBytes string) (time.Time, error) { return time.Time{}, err } - res, err := time.Parse(time.RFC3339, block.Header.Time) + res, err := time.Parse(time.RFC3339, block.Block.Header.Time) if err != nil { return time.Time{}, err } diff --git a/go.mod b/go.mod index fef14e2..e53e269 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,8 @@ module github.com/informalsystems/CometMock go 1.20 require ( - github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df github.com/cometbft/cometbft v0.34.27-alpha.1 - github.com/cometbft/cometbft-db v0.7.0 + github.com/stretchr/testify v1.8.1 github.com/urfave/cli/v2 v2.25.7 ) @@ -14,7 +13,9 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect @@ -27,7 +28,6 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -39,6 +39,7 @@ require ( github.com/onsi/gomega v1.19.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect @@ -56,4 +57,5 @@ require ( google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect google.golang.org/grpc v1.52.0 // indirect google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index dd21f77..f9e9ad8 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF 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/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= -github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= 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= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -169,8 +167,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= -github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -211,8 +207,10 @@ github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrD github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 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= @@ -298,11 +296,16 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= @@ -611,6 +614,7 @@ google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QO gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -623,7 +627,9 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=