refactor: rename to CometBFT (#14914)
This commit is contained in:
parent
88909d6f2b
commit
80dd55f79b
26
Makefile
26
Makefile
@ -368,32 +368,6 @@ format:
|
||||
$(golangci_lint_cmd) run --fix
|
||||
.PHONY: format
|
||||
|
||||
###############################################################################
|
||||
### Devdoc ###
|
||||
###############################################################################
|
||||
|
||||
DEVDOC_SAVE = docker commit `docker ps -a -n 1 -q` devdoc:local
|
||||
|
||||
devdoc-init:
|
||||
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/cosmos/cosmos-sdk" -w "/go/src/github.com/cosmos/cosmos-sdk" tendermint/devdoc echo
|
||||
# TODO make this safer
|
||||
$(call DEVDOC_SAVE)
|
||||
|
||||
devdoc:
|
||||
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/cosmos/cosmos-sdk" -w "/go/src/github.com/cosmos/cosmos-sdk" devdoc:local bash
|
||||
|
||||
devdoc-save:
|
||||
# TODO make this safer
|
||||
$(call DEVDOC_SAVE)
|
||||
|
||||
devdoc-clean:
|
||||
docker rmi -f $$(docker images -f "dangling=true" -q)
|
||||
|
||||
devdoc-update:
|
||||
docker pull tendermint/devdoc
|
||||
|
||||
.PHONY: devdoc devdoc-clean devdoc-init devdoc-save devdoc-update
|
||||
|
||||
###############################################################################
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
@ -4,6 +4,15 @@ This guide provides instructions for upgrading to specific versions of Cosmos SD
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Consensus Engine
|
||||
|
||||
The Cosmos SDK has migrated to CometBFT as its default consensus engine.
|
||||
This is a breaking changes that needs chains to re-generate their protos.
|
||||
Some functions has been renamed to reflect the naming change, following an exhaustive list:
|
||||
|
||||
* `client.TendermintRPC` -> `client.CometRPC`
|
||||
* `clitestutil.MockTendermintRPC` -> `clitestutil.MockCometRPC`
|
||||
|
||||
### Configuration
|
||||
|
||||
A new tool have been created for migrating configuration of the SDK. Use the following command to migrate your configuration:
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
grpcstatus "google.golang.org/grpc/status"
|
||||
@ -38,7 +38,7 @@ const (
|
||||
func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain) {
|
||||
// On a new chain, we consider the init chain block height as 0, even though
|
||||
// req.InitialHeight is 1 by default.
|
||||
initHeader := tmproto.Header{ChainID: req.ChainId, Time: req.Time}
|
||||
initHeader := cmtproto.Header{ChainID: req.ChainId, Time: req.Time}
|
||||
|
||||
app.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId)
|
||||
|
||||
@ -46,7 +46,7 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
|
||||
// stores.
|
||||
if req.InitialHeight > 1 {
|
||||
app.initialHeight = req.InitialHeight
|
||||
initHeader = tmproto.Header{ChainID: req.ChainId, Height: req.InitialHeight, Time: req.Time}
|
||||
initHeader = cmtproto.Header{ChainID: req.ChainId, Height: req.InitialHeight, Time: req.Time}
|
||||
err := app.cms.SetInitialVersion(req.InitialHeight)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -265,7 +265,7 @@ func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) (resp abci.
|
||||
panic("PrepareProposal method not set")
|
||||
}
|
||||
|
||||
// Tendermint must never call PrepareProposal with a height of 0.
|
||||
// CometBFT must never call PrepareProposal with a height of 0.
|
||||
// Ref: https://github.com/cometbft/cometbft/blob/059798a4f5b0c9f52aa8655fa619054a0154088c/spec/core/state.md?plain=1#L37-L38
|
||||
if req.Height < 1 {
|
||||
panic("PrepareProposal called with invalid height")
|
||||
@ -301,7 +301,7 @@ func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) (resp abci.
|
||||
// block. Note, the application defines the exact implementation details of
|
||||
// ProcessProposal. In general, the application must at the very least ensure
|
||||
// that all transactions are valid. If all transactions are valid, then we inform
|
||||
// Tendermint that the Status is ACCEPT. However, the application is also able
|
||||
// CometBFT that the Status is ACCEPT. However, the application is also able
|
||||
// to implement optimizations such as executing the entire proposed block
|
||||
// immediately.
|
||||
//
|
||||
@ -449,7 +449,7 @@ func (app *BaseApp) Commit() abci.ResponseCommit {
|
||||
|
||||
// Reset the Check state to the latest committed.
|
||||
//
|
||||
// NOTE: This is safe because Tendermint holds a lock on the mempool for
|
||||
// NOTE: This is safe because CometBFT holds a lock on the mempool for
|
||||
// Commit. Use the header from this latest block.
|
||||
app.setState(runTxModeCheck, header)
|
||||
app.setState(runTxPrepareProposal, header)
|
||||
@ -469,7 +469,7 @@ func (app *BaseApp) Commit() abci.ResponseCommit {
|
||||
}
|
||||
|
||||
if halt {
|
||||
// Halt the binary and allow Tendermint to receive the ResponseCommit
|
||||
// Halt the binary and allow CometBFT to receive the ResponseCommit
|
||||
// response with the commit ID hash. This will allow the node to successfully
|
||||
// restart and process blocks assuming the halt configuration has been
|
||||
// reset or moved to a more distant value.
|
||||
@ -637,7 +637,7 @@ func (app *BaseApp) OfferSnapshot(req abci.RequestOfferSnapshot) abci.ResponseOf
|
||||
)
|
||||
|
||||
// We currently don't support resetting the IAVL stores and retrying a different snapshot,
|
||||
// so we ask Tendermint to abort all snapshot restoration.
|
||||
// so we ask CometBFT to abort all snapshot restoration.
|
||||
return abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ABORT}
|
||||
}
|
||||
}
|
||||
@ -777,7 +777,7 @@ func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, e
|
||||
}
|
||||
|
||||
// GetBlockRetentionHeight returns the height for which all blocks below this height
|
||||
// are pruned from Tendermint. Given a commitment height and a non-zero local
|
||||
// are pruned from CometBFT. Given a commitment height and a non-zero local
|
||||
// minRetainBlocks configuration, the retentionHeight is the smallest height that
|
||||
// satisfies:
|
||||
//
|
||||
@ -818,7 +818,7 @@ func (app *BaseApp) GetBlockRetentionHeight(commitHeight int64) int64 {
|
||||
|
||||
// Define retentionHeight as the minimum value that satisfies all non-zero
|
||||
// constraints. All blocks below (commitHeight-retentionHeight) are pruned
|
||||
// from Tendermint.
|
||||
// from CometBFT.
|
||||
var retentionHeight int64
|
||||
|
||||
// Define the number of blocks needed to protect against misbehaving validators
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -114,7 +114,7 @@ func TestABCI_InitChain(t *testing.T) {
|
||||
require.Equal(t, value, res.Value)
|
||||
|
||||
// commit and ensure we can still query
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
app.Commit()
|
||||
|
||||
@ -152,14 +152,14 @@ func TestABCI_BeginBlock_WithInitialHeight(t *testing.T) {
|
||||
|
||||
require.PanicsWithError(t, "invalid height: 4; expected: 3", func() {
|
||||
app.BeginBlock(abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{
|
||||
Header: cmtproto.Header{
|
||||
Height: 4,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
app.BeginBlock(abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{
|
||||
Header: cmtproto.Header{
|
||||
Height: 3,
|
||||
},
|
||||
})
|
||||
@ -179,7 +179,7 @@ func TestABCI_GRPCQuery(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, grpcQueryOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
req := testdata.SayHelloRequest{Name: "foo"}
|
||||
@ -193,7 +193,7 @@ func TestABCI_GRPCQuery(t *testing.T) {
|
||||
require.Equal(t, sdkerrors.ErrInvalidHeight.ABCICode(), resQuery.Code, resQuery)
|
||||
require.Contains(t, resQuery.Log, "TestABCI_GRPCQuery is not ready; please wait for first block")
|
||||
|
||||
header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
suite.baseApp.Commit()
|
||||
|
||||
@ -567,8 +567,8 @@ func TestABCI_EndBlock(t *testing.T) {
|
||||
name := t.Name()
|
||||
logger := defaultLogger()
|
||||
|
||||
cp := &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
cp := &cmtproto.ConsensusParams{
|
||||
Block: &cmtproto.BlockParams{
|
||||
MaxGas: 5000000,
|
||||
},
|
||||
}
|
||||
@ -606,7 +606,7 @@ func TestABCI_CheckTx(t *testing.T) {
|
||||
|
||||
nTxs := int64(5)
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
for i := int64(0); i < nTxs; i++ {
|
||||
@ -627,7 +627,7 @@ func TestABCI_CheckTx(t *testing.T) {
|
||||
require.Equal(t, nTxs, storedCounter)
|
||||
|
||||
// if a block is committed, CheckTx state should be reset
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")})
|
||||
|
||||
require.NotNil(t, getCheckStateCtx(suite.baseApp).BlockGasMeter(), "block gas meter should have been set to checkState")
|
||||
@ -647,7 +647,7 @@ func TestABCI_DeliverTx(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
deliverKey := []byte("deliver-key")
|
||||
@ -657,7 +657,7 @@ func TestABCI_DeliverTx(t *testing.T) {
|
||||
txPerHeight := 5
|
||||
|
||||
for blockN := 0; blockN < nBlocks; blockN++ {
|
||||
header := tmproto.Header{Height: int64(blockN) + 1}
|
||||
header := cmtproto.Header{Height: int64(blockN) + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
for i := 0; i < txPerHeight; i++ {
|
||||
@ -687,7 +687,7 @@ func TestABCI_DeliverTx_MultiMsg(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
deliverKey := []byte("deliver-key")
|
||||
@ -698,7 +698,7 @@ func TestABCI_DeliverTx_MultiMsg(t *testing.T) {
|
||||
|
||||
// run a multi-msg tx
|
||||
// with all msgs the same route
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, 0, 0, 1, 2)
|
||||
@ -762,7 +762,7 @@ func TestABCI_Query_SimulateTx(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{gasConsumed})
|
||||
@ -770,7 +770,7 @@ func TestABCI_Query_SimulateTx(t *testing.T) {
|
||||
nBlocks := 3
|
||||
for blockN := 0; blockN < nBlocks; blockN++ {
|
||||
count := int64(blockN + 1)
|
||||
header := tmproto.Header{Height: count}
|
||||
header := cmtproto.Header{Height: count}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, count, count)
|
||||
@ -822,10 +822,10 @@ func TestABCI_InvalidTransaction(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
// transaction with no messages
|
||||
@ -948,10 +948,10 @@ func TestABCI_TxGasLimits(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
testCases := []struct {
|
||||
@ -1027,14 +1027,14 @@ func TestABCI_MaxBlockGasLimits(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
ConsensusParams: &cmtproto.ConsensusParams{
|
||||
Block: &cmtproto.BlockParams{
|
||||
MaxGas: 100,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
testCases := []struct {
|
||||
@ -1060,7 +1060,7 @@ func TestABCI_MaxBlockGasLimits(t *testing.T) {
|
||||
tx := tc.tx
|
||||
|
||||
// reset the block gas
|
||||
header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
// execute the transaction multiple times
|
||||
@ -1126,14 +1126,14 @@ func TestABCI_GasConsumptionBadTx(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
ConsensusParams: &cmtproto.ConsensusParams{
|
||||
Block: &cmtproto.BlockParams{
|
||||
MaxGas: 9,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, 5, 0)
|
||||
@ -1167,7 +1167,7 @@ func TestABCI_Query(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
// NOTE: "/store/key1" tells us KVStore
|
||||
@ -1192,7 +1192,7 @@ func TestABCI_Query(t *testing.T) {
|
||||
require.Equal(t, 0, len(res.Value))
|
||||
|
||||
// query is still empty after a DeliverTx before we commit
|
||||
header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
_, resTx, err = suite.baseApp.SimDeliver(suite.txConfig.TxEncoder(), tx)
|
||||
@ -1305,8 +1305,8 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) {
|
||||
|
||||
tc.bapp.SetParamStore(¶mStore{db: dbm.NewMemDB()})
|
||||
tc.bapp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{
|
||||
Evidence: &tmproto.EvidenceParams{
|
||||
ConsensusParams: &cmtproto.ConsensusParams{
|
||||
Evidence: &cmtproto.EvidenceParams{
|
||||
MaxAgeNumBlocks: tc.maxAgeBlocks,
|
||||
},
|
||||
},
|
||||
@ -1330,7 +1330,7 @@ func TestABCI_Proposal_HappyPath(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, 0, 1)
|
||||
@ -1370,7 +1370,7 @@ func TestABCI_Proposal_HappyPath(t *testing.T) {
|
||||
require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status)
|
||||
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1},
|
||||
Header: cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1},
|
||||
})
|
||||
|
||||
res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes})
|
||||
@ -1402,7 +1402,7 @@ func TestABCI_Proposal_Read_State_PrepareProposal(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, setInitChainerOpt, prepareOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
reqPrepareProposal := abci.RequestPrepareProposal{
|
||||
@ -1421,7 +1421,7 @@ func TestABCI_Proposal_Read_State_PrepareProposal(t *testing.T) {
|
||||
require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status)
|
||||
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1},
|
||||
Header: cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1},
|
||||
})
|
||||
}
|
||||
|
||||
@ -1434,7 +1434,7 @@ func TestABCI_PrepareProposal_ReachedMaxBytes(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool))
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
@ -1460,7 +1460,7 @@ func TestABCI_PrepareProposal_BadEncoding(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool))
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, 0, 0)
|
||||
@ -1484,7 +1484,7 @@ func TestABCI_PrepareProposal_Failures(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool))
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
tx := newTxCounter(t, suite.txConfig, 0, 0)
|
||||
@ -1522,7 +1522,7 @@ func TestABCI_PrepareProposal_PanicRecovery(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, prepareOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
req := abci.RequestPrepareProposal{
|
||||
@ -1545,7 +1545,7 @@ func TestABCI_ProcessProposal_PanicRecovery(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, processOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
require.NotPanics(t, func() {
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/crypto/tmhash"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"golang.org/x/exp/maps"
|
||||
@ -114,11 +114,11 @@ type BaseApp struct { //nolint: maligned
|
||||
|
||||
// minRetainBlocks defines the minimum block height offset from the current
|
||||
// block being committed, such that all blocks past this offset are pruned
|
||||
// from Tendermint. It is used as part of the process of determining the
|
||||
// from CometBFT. It is used as part of the process of determining the
|
||||
// ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates
|
||||
// that no blocks should be pruned.
|
||||
//
|
||||
// Note: Tendermint block pruning is dependant on this parameter in conjunction
|
||||
// Note: CometBFT block pruning is dependant on this parameter in conjunction
|
||||
// with the unbonding (safety threshold) period, state pruning and state sync
|
||||
// snapshot parameters to determine the correct minimum value of
|
||||
// ResponseCommit.RetainHeight.
|
||||
@ -138,7 +138,7 @@ type BaseApp struct { //nolint: maligned
|
||||
trace bool
|
||||
|
||||
// indexEvents defines the set of events in the form {eventType}.{attributeKey},
|
||||
// which informs Tendermint what to index. If empty, all events will be indexed.
|
||||
// which informs CometBFT what to index. If empty, all events will be indexed.
|
||||
indexEvents map[string]struct{}
|
||||
|
||||
// abciListeners for hooking into the ABCI message processing of the BaseApp
|
||||
@ -349,7 +349,7 @@ func (app *BaseApp) Init() error {
|
||||
panic("cannot call initFromMainStore: baseapp already sealed")
|
||||
}
|
||||
|
||||
emptyHeader := tmproto.Header{}
|
||||
emptyHeader := cmtproto.Header{}
|
||||
|
||||
// needed for the export command which inits from store but never calls initchain
|
||||
app.setState(runTxModeCheck, emptyHeader)
|
||||
@ -407,7 +407,7 @@ func (app *BaseApp) IsSealed() bool { return app.sealed }
|
||||
// setState sets the BaseApp's state for the corresponding mode with a branched
|
||||
// multi-store (i.e. a CacheMultiStore) and a new Context with the same
|
||||
// multi-store branch, and provided header.
|
||||
func (app *BaseApp) setState(mode runTxMode, header tmproto.Header) {
|
||||
func (app *BaseApp) setState(mode runTxMode, header cmtproto.Header) {
|
||||
ms := app.cms.CacheMultiStore()
|
||||
baseState := &state{
|
||||
ms: ms,
|
||||
@ -435,7 +435,7 @@ func (app *BaseApp) setState(mode runTxMode, header tmproto.Header) {
|
||||
|
||||
// GetConsensusParams returns the current consensus parameters from the BaseApp's
|
||||
// ParamStore. If the BaseApp has no ParamStore defined, nil is returned.
|
||||
func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams {
|
||||
func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *cmtproto.ConsensusParams {
|
||||
if app.paramStore == nil {
|
||||
return nil
|
||||
}
|
||||
@ -449,7 +449,7 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams
|
||||
}
|
||||
|
||||
// StoreConsensusParams sets the consensus parameters to the baseapp's param store.
|
||||
func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) {
|
||||
func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *cmtproto.ConsensusParams) {
|
||||
if app.paramStore == nil {
|
||||
panic("cannot store consensus params with no params store set")
|
||||
}
|
||||
@ -459,7 +459,7 @@ func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusP
|
||||
}
|
||||
|
||||
app.paramStore.Set(ctx, cp)
|
||||
// We're explicitly not storing the Tendermint app_version in the param store. It's
|
||||
// We're explicitly not storing the CometBFT app_version in the param store. It's
|
||||
// stored instead in the x/upgrade store, with its own bump logic.
|
||||
}
|
||||
|
||||
@ -862,12 +862,12 @@ func createEvents(events sdk.Events, msg sdk.Msg) sdk.Events {
|
||||
// non-default handlers.
|
||||
//
|
||||
// - If no mempool is set or if the mempool is a no-op mempool, the transactions
|
||||
// requested from Tendermint will simply be returned, which, by default, are in
|
||||
// requested from CometBFT will simply be returned, which, by default, are in
|
||||
// FIFO order.
|
||||
func (app *BaseApp) DefaultPrepareProposal() sdk.PrepareProposalHandler {
|
||||
return func(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
|
||||
// If the mempool is nil or a no-op mempool, we simply return the transactions
|
||||
// requested from Tendermint, which, by default, should be in FIFO order.
|
||||
// requested from CometBFT, which, by default, should be in FIFO order.
|
||||
_, isNoOp := app.mempool.(mempool.NoOpMempool)
|
||||
if app.mempool == nil || isNoOp {
|
||||
return abci.ResponsePrepareProposal{Txs: req.Txs}
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -100,14 +100,14 @@ func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...fun
|
||||
baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
r := rand.New(rand.NewSource(3920758213583))
|
||||
keyCounter := 0
|
||||
|
||||
for height := int64(1); height <= int64(cfg.blocks); height++ {
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}})
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: height}})
|
||||
|
||||
for txNum := 0; txNum < cfg.blockTxs; txNum++ {
|
||||
msgs := []sdk.Msg{}
|
||||
@ -179,13 +179,13 @@ func TestLoadVersion(t *testing.T) {
|
||||
require.Equal(t, emptyCommitID, lastID)
|
||||
|
||||
// execute a block, collect commit ID
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
res := app.Commit()
|
||||
commitID1 := storetypes.CommitID{Version: 1, Hash: res.Data}
|
||||
|
||||
// execute a block, collect commit ID
|
||||
header = tmproto.Header{Height: 2}
|
||||
header = cmtproto.Header{Height: 2}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
res = app.Commit()
|
||||
commitID2 := storetypes.CommitID{Version: 2, Hash: res.Data}
|
||||
@ -291,7 +291,7 @@ func TestSetLoader(t *testing.T) {
|
||||
require.Nil(t, err)
|
||||
|
||||
// "execute" one block
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}})
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: 2}})
|
||||
res := app.Commit()
|
||||
require.NotNil(t, res.Data)
|
||||
|
||||
@ -337,7 +337,7 @@ func TestLoadVersionInvalid(t *testing.T) {
|
||||
err = app.LoadVersion(-1)
|
||||
require.Error(t, err)
|
||||
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
res := app.Commit()
|
||||
commitID1 := storetypes.CommitID{Version: 1, Hash: res.Data}
|
||||
@ -436,10 +436,10 @@ func TestCustomRunTxPanicHandler(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t, anteOpt)
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: 1}
|
||||
header := cmtproto.Header{Height: 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
suite.baseApp.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error {
|
||||
@ -476,10 +476,10 @@ func TestBaseAppAnteHandler(t *testing.T) {
|
||||
baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey})
|
||||
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{},
|
||||
ConsensusParams: &cmtproto.ConsensusParams{},
|
||||
})
|
||||
|
||||
header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}
|
||||
suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
// execute a tx that will fail ante handler execution
|
||||
@ -549,10 +549,10 @@ func TestABCI_CreateQueryContext(t *testing.T) {
|
||||
name := t.Name()
|
||||
app := baseapp.NewBaseApp(name, logger, db, nil)
|
||||
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}})
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: 1}})
|
||||
app.Commit()
|
||||
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}})
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: 2}})
|
||||
app.Commit()
|
||||
|
||||
testCases := []struct {
|
||||
@ -590,18 +590,18 @@ func TestSetMinGasPrices(t *testing.T) {
|
||||
func TestGetMaximumBlockGas(t *testing.T) {
|
||||
suite := NewBaseAppSuite(t)
|
||||
suite.baseApp.InitChain(abci.RequestInitChain{})
|
||||
ctx := suite.baseApp.NewContext(true, tmproto.Header{})
|
||||
ctx := suite.baseApp.NewContext(true, cmtproto.Header{})
|
||||
|
||||
suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 0}})
|
||||
suite.baseApp.StoreConsensusParams(ctx, &cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: 0}})
|
||||
require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx))
|
||||
|
||||
suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -1}})
|
||||
suite.baseApp.StoreConsensusParams(ctx, &cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: -1}})
|
||||
require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx))
|
||||
|
||||
suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 5000000}})
|
||||
suite.baseApp.StoreConsensusParams(ctx, &cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: 5000000}})
|
||||
require.Equal(t, uint64(5000000), suite.baseApp.GetMaximumBlockGas(ctx))
|
||||
|
||||
suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -5000000}})
|
||||
suite.baseApp.StoreConsensusParams(ctx, &cmtproto.ConsensusParams{Block: &cmtproto.BlockParams{MaxGas: -5000000}})
|
||||
require.Panics(t, func() { suite.baseApp.GetMaximumBlockGas(ctx) })
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ func TestLoadVersionPruning(t *testing.T) {
|
||||
// Commit seven blocks, of which 7 (latest) is kept in addition to 6, 5
|
||||
// (keep recent) and 3 (keep every).
|
||||
for i := int64(1); i <= 7; i++ {
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}})
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: i}})
|
||||
res := app.Commit()
|
||||
lastCommitID = storetypes.CommitID{Version: i, Hash: res.Data}
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@ import (
|
||||
"cosmossdk.io/depinject"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -112,7 +112,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
|
||||
})
|
||||
|
||||
genState := GenesisStateWithSingleValidator(t, cdc, appBuilder)
|
||||
stateBytes, err := tmjson.MarshalIndent(genState, "", " ")
|
||||
stateBytes, err := cmtjson.MarshalIndent(genState, "", " ")
|
||||
require.NoError(t, err)
|
||||
bapp.InitChain(abci.RequestInitChain{
|
||||
Validators: []abci.ValidatorUpdate{},
|
||||
@ -120,7 +120,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
|
||||
AppStateBytes: stateBytes,
|
||||
})
|
||||
|
||||
ctx := bapp.NewContext(false, tmproto.Header{})
|
||||
ctx := bapp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// tx fee
|
||||
feeCoin := sdk.NewCoin("atom", sdkmath.NewInt(150))
|
||||
@ -154,7 +154,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
|
||||
_, txBytes, err := createTestTx(txConfig, txBuilder, privs, accNums, accSeqs, ctx.ChainID())
|
||||
require.NoError(t, err)
|
||||
|
||||
bapp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}})
|
||||
bapp.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: 1}})
|
||||
rsp := bapp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes})
|
||||
|
||||
// check result
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -100,7 +100,7 @@ func TestMsgService(t *testing.T) {
|
||||
app.MsgServiceRouter(),
|
||||
testdata.MsgServerImpl{},
|
||||
)
|
||||
_ = app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}})
|
||||
_ = app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: 1}})
|
||||
|
||||
msg := testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package baseapp
|
||||
|
||||
import (
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
@ -9,7 +9,7 @@ import (
|
||||
// ParamStore defines the interface the parameter store used by the BaseApp must
|
||||
// fulfill.
|
||||
type ParamStore interface {
|
||||
Get(ctx sdk.Context) (*tmproto.ConsensusParams, error)
|
||||
Get(ctx sdk.Context) (*cmtproto.ConsensusParams, error)
|
||||
Has(ctx sdk.Context) bool
|
||||
Set(ctx sdk.Context, cp *tmproto.ConsensusParams)
|
||||
Set(ctx sdk.Context, cp *cmtproto.ConsensusParams)
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
Deprecated.
|
||||
|
||||
Legacy types are defined below to aid in the migration of Tendermint consensus
|
||||
Legacy types are defined below to aid in the migration of CometBFT consensus
|
||||
parameters from use of the now deprecated x/params modules to a new dedicated
|
||||
x/consensus module.
|
||||
|
||||
@ -29,7 +29,7 @@ Example:
|
||||
Developers can also bypass the use of the legacy Params subspace and set the
|
||||
values to app.ConsensusParamsKeeper.Set() explicitly.
|
||||
|
||||
Note, for new chains this is not necessary as Tendermint's consensus parameters
|
||||
Note, for new chains this is not necessary as CometBFT's consensus parameters
|
||||
will automatically be set for you in InitChain.
|
||||
*/
|
||||
package baseapp
|
||||
@ -38,7 +38,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
@ -57,7 +57,7 @@ type LegacyParamStore interface {
|
||||
}
|
||||
|
||||
func ValidateBlockParams(i interface{}) error {
|
||||
v, ok := i.(tmproto.BlockParams)
|
||||
v, ok := i.(cmtproto.BlockParams)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
@ -74,7 +74,7 @@ func ValidateBlockParams(i interface{}) error {
|
||||
}
|
||||
|
||||
func ValidateEvidenceParams(i interface{}) error {
|
||||
v, ok := i.(tmproto.EvidenceParams)
|
||||
v, ok := i.(cmtproto.EvidenceParams)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
@ -95,7 +95,7 @@ func ValidateEvidenceParams(i interface{}) error {
|
||||
}
|
||||
|
||||
func ValidateValidatorParams(i interface{}) error {
|
||||
v, ok := i.(tmproto.ValidatorParams)
|
||||
v, ok := i.(cmtproto.ValidatorParams)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
@ -107,29 +107,29 @@ func ValidateValidatorParams(i interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetConsensusParams(ctx sdk.Context, paramStore LegacyParamStore) *tmproto.ConsensusParams {
|
||||
func GetConsensusParams(ctx sdk.Context, paramStore LegacyParamStore) *cmtproto.ConsensusParams {
|
||||
if paramStore == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
cp := new(tmproto.ConsensusParams)
|
||||
cp := new(cmtproto.ConsensusParams)
|
||||
|
||||
if paramStore.Has(ctx, ParamStoreKeyBlockParams) {
|
||||
var bp tmproto.BlockParams
|
||||
var bp cmtproto.BlockParams
|
||||
|
||||
paramStore.Get(ctx, ParamStoreKeyBlockParams, &bp)
|
||||
cp.Block = &bp
|
||||
}
|
||||
|
||||
if paramStore.Has(ctx, ParamStoreKeyEvidenceParams) {
|
||||
var ep tmproto.EvidenceParams
|
||||
var ep cmtproto.EvidenceParams
|
||||
|
||||
paramStore.Get(ctx, ParamStoreKeyEvidenceParams, &ep)
|
||||
cp.Evidence = &ep
|
||||
}
|
||||
|
||||
if paramStore.Has(ctx, ParamStoreKeyValidatorParams) {
|
||||
var vp tmproto.ValidatorParams
|
||||
var vp cmtproto.ValidatorParams
|
||||
|
||||
paramStore.Get(ctx, ParamStoreKeyValidatorParams, &vp)
|
||||
cp.Validator = &vp
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package baseapp
|
||||
|
||||
import (
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
@ -37,7 +37,7 @@ func (app *BaseApp) SimDeliver(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo,
|
||||
}
|
||||
|
||||
// Context with current {check, deliver}State of the app used by tests.
|
||||
func (app *BaseApp) NewContext(isCheckTx bool, header tmproto.Header) sdk.Context {
|
||||
func (app *BaseApp) NewContext(isCheckTx bool, header cmtproto.Header) sdk.Context {
|
||||
if isCheckTx {
|
||||
return sdk.NewContext(app.checkState.ms, header, true, app.logger).
|
||||
WithMinGasPrices(app.minGasPrices)
|
||||
@ -46,7 +46,7 @@ func (app *BaseApp) NewContext(isCheckTx bool, header tmproto.Header) sdk.Contex
|
||||
return sdk.NewContext(app.deliverState.ms, header, false, app.logger)
|
||||
}
|
||||
|
||||
func (app *BaseApp) NewUncachedContext(isCheckTx bool, header tmproto.Header) sdk.Context {
|
||||
func (app *BaseApp) NewUncachedContext(isCheckTx bool, header cmtproto.Header) sdk.Context {
|
||||
return sdk.NewContext(app.cms, header, isCheckTx, app.logger)
|
||||
}
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ import (
|
||||
"cosmossdk.io/depinject"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -71,8 +71,8 @@ func GenesisStateWithSingleValidator(t *testing.T, codec codec.Codec, builder *r
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator})
|
||||
validator := cmttypes.NewValidator(pubKey, 1)
|
||||
valSet := cmttypes.NewValidatorSet([]*cmttypes.Validator{validator})
|
||||
|
||||
// generate genesis account
|
||||
senderPrivKey := secp256k1.GenPrivKey()
|
||||
@ -249,7 +249,7 @@ type paramStore struct {
|
||||
db *dbm.MemDB
|
||||
}
|
||||
|
||||
func (ps *paramStore) Set(_ sdk.Context, value *tmproto.ConsensusParams) {
|
||||
func (ps *paramStore) Set(_ sdk.Context, value *cmtproto.ConsensusParams) {
|
||||
bz, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -267,7 +267,7 @@ func (ps *paramStore) Has(_ sdk.Context) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
func (ps paramStore) Get(ctx sdk.Context) (*tmproto.ConsensusParams, error) {
|
||||
func (ps paramStore) Get(ctx sdk.Context) (*cmtproto.ConsensusParams, error) {
|
||||
bz, err := ps.db.Get(ParamStoreKey)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -277,7 +277,7 @@ func (ps paramStore) Get(ctx sdk.Context) (*tmproto.ConsensusParams, error) {
|
||||
return nil, errors.New("params not found")
|
||||
}
|
||||
|
||||
var params tmproto.ConsensusParams
|
||||
var params cmtproto.ConsensusParams
|
||||
if err := json.Unmarshal(bz, ¶ms); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cometbft/cometbft/mempool"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
@ -36,14 +36,14 @@ func (ctx Context) BroadcastTx(txBytes []byte) (res *sdk.TxResponse, err error)
|
||||
}
|
||||
|
||||
// CheckTendermintError checks if the error returned from BroadcastTx is a
|
||||
// Tendermint error that is returned before the tx is submitted due to
|
||||
// precondition checks that failed. If an Tendermint error is detected, this
|
||||
// CometBFT error that is returned before the tx is submitted due to
|
||||
// precondition checks that failed. If an CometBFT error is detected, this
|
||||
// function returns the correct code back in TxResponse.
|
||||
//
|
||||
// TODO: Avoid brittle string matching in favor of error matching. This requires
|
||||
// a change to Tendermint's RPCError type to allow retrieval or matching against
|
||||
// a change to CometBFT's RPCError type to allow retrieval or matching against
|
||||
// a concrete error type.
|
||||
func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse {
|
||||
func CheckTendermintError(err error, tx cmttypes.Tx) *sdk.TxResponse {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
@ -78,7 +78,7 @@ func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse {
|
||||
}
|
||||
}
|
||||
|
||||
// BroadcastTxSync broadcasts transaction bytes to a Tendermint node
|
||||
// BroadcastTxSync broadcasts transaction bytes to a CometBFT node
|
||||
// synchronously (i.e. returns after CheckTx execution).
|
||||
func (ctx Context) BroadcastTxSync(txBytes []byte) (*sdk.TxResponse, error) {
|
||||
node, err := ctx.GetNode()
|
||||
@ -94,7 +94,7 @@ func (ctx Context) BroadcastTxSync(txBytes []byte) (*sdk.TxResponse, error) {
|
||||
return sdk.NewResponseFormatBroadcastTx(res), err
|
||||
}
|
||||
|
||||
// BroadcastTxAsync broadcasts transaction bytes to a Tendermint node
|
||||
// BroadcastTxAsync broadcasts transaction bytes to a CometBFT node
|
||||
// asynchronously (i.e. returns immediately).
|
||||
func (ctx Context) BroadcastTxAsync(txBytes []byte) (*sdk.TxResponse, error) {
|
||||
node, err := ctx.GetNode()
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/cometbft/cometbft/mempool"
|
||||
"github.com/cometbft/cometbft/rpc/client/mock"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -21,11 +21,11 @@ type MockClient struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (c MockClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error) {
|
||||
func (c MockClient) BroadcastTxAsync(ctx context.Context, tx cmttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
|
||||
return nil, c.err
|
||||
}
|
||||
|
||||
func (c MockClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error) {
|
||||
func (c MockClient) BroadcastTxSync(ctx context.Context, tx cmttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
|
||||
return nil, c.err
|
||||
}
|
||||
|
||||
|
||||
@ -7,9 +7,9 @@ import (
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
)
|
||||
|
||||
// TendermintRPC defines the interface of a Tendermint RPC client needed for
|
||||
// CometRPC defines the interface of a CometBFT RPC client needed for
|
||||
// queries and transaction handling.
|
||||
type TendermintRPC interface {
|
||||
type CometRPC interface {
|
||||
rpcclient.ABCIClient
|
||||
|
||||
Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error)
|
||||
@ -21,7 +21,7 @@ chain-id = "{{ .ChainID }}"
|
||||
keyring-backend = "{{ .KeyringBackend }}"
|
||||
# CLI output format (text|json)
|
||||
output = "{{ .Output }}"
|
||||
# <host>:<port> to Tendermint RPC interface for this chain
|
||||
# <host>:<port> to CometBFT RPC interface for this chain
|
||||
node = "{{ .Node }}"
|
||||
# Transaction broadcasting mode (sync|async)
|
||||
broadcast-mode = "{{ .BroadcastMode }}"
|
||||
|
||||
@ -25,7 +25,7 @@ type PreprocessTxFn func(chainID string, key keyring.KeyType, tx TxBuilder) erro
|
||||
// handling and queries.
|
||||
type Context struct {
|
||||
FromAddress sdk.AccAddress
|
||||
Client TendermintRPC
|
||||
Client CometRPC
|
||||
GRPCClient *grpc.ClientConn
|
||||
ChainID string
|
||||
Codec codec.Codec
|
||||
@ -129,7 +129,7 @@ func (ctx Context) WithHeight(height int64) Context {
|
||||
|
||||
// WithClient returns a copy of the context with an updated RPC client
|
||||
// instance.
|
||||
func (ctx Context) WithClient(client TendermintRPC) Context {
|
||||
func (ctx Context) WithClient(client CometRPC) Context {
|
||||
ctx.Client = client
|
||||
return ctx
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
tmcli "github.com/cometbft/cometbft/libs/cli"
|
||||
cmtcli "github.com/cometbft/cometbft/libs/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
@ -45,7 +45,7 @@ const (
|
||||
|
||||
// List of CLI flags
|
||||
const (
|
||||
FlagHome = tmcli.HomeFlag
|
||||
FlagHome = cmtcli.HomeFlag
|
||||
FlagKeyringDir = "keyring-dir"
|
||||
FlagUseLedger = "ledger"
|
||||
FlagChainID = "chain-id"
|
||||
@ -85,9 +85,9 @@ const (
|
||||
FlagAux = "aux"
|
||||
// FlagOutput is the flag to set the output format.
|
||||
// This differs from FlagOutputDocument that is used to set the output file.
|
||||
FlagOutput = tmcli.OutputFlag
|
||||
FlagOutput = cmtcli.OutputFlag
|
||||
|
||||
// Tendermint logging flags
|
||||
// CometBFT logging flags
|
||||
FlagLogLevel = "log_level"
|
||||
FlagLogFormat = "log_format"
|
||||
)
|
||||
@ -98,7 +98,7 @@ var LineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}}
|
||||
|
||||
// AddQueryFlagsToCmd adds common flags to a module query command.
|
||||
func AddQueryFlagsToCmd(cmd *cobra.Command) {
|
||||
cmd.Flags().String(FlagNode, "tcp://localhost:26657", "<host>:<port> to Tendermint RPC interface for this chain")
|
||||
cmd.Flags().String(FlagNode, "tcp://localhost:26657", "<host>:<port> to CometBFT RPC interface for this chain")
|
||||
cmd.Flags().String(FlagGRPC, "", "the gRPC endpoint to use for this chain")
|
||||
cmd.Flags().Bool(FlagGRPCInsecure, false, "allow gRPC over insecure channels, if not the server must use TLS")
|
||||
cmd.Flags().Int64(FlagHeight, 0, "Use a specific height to query state at (this can error if the node is pruning state)")
|
||||
@ -119,7 +119,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) {
|
||||
f.String(FlagNote, "", "Note to add a description to the transaction (previously --memo)")
|
||||
f.String(FlagFees, "", "Fees to pay along with transaction; eg: 10uatom")
|
||||
f.String(FlagGasPrices, "", "Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)")
|
||||
f.String(FlagNode, "tcp://localhost:26657", "<host>:<port> to tendermint rpc interface for this chain")
|
||||
f.String(FlagNode, "tcp://localhost:26657", "<host>:<port> to cometbft rpc interface for this chain")
|
||||
f.Bool(FlagUseLedger, false, "Use a connected Ledger device")
|
||||
f.Float64(FlagGasAdjustment, DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ")
|
||||
f.StringP(FlagBroadcastMode, "b", BroadcastSync, "Transaction broadcasting mode (sync|async)")
|
||||
|
||||
@ -3,7 +3,7 @@ package tmservice
|
||||
import (
|
||||
"context"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
)
|
||||
@ -18,14 +18,14 @@ func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*co
|
||||
return node.Block(ctx, height)
|
||||
}
|
||||
|
||||
func GetProtoBlock(ctx context.Context, clientCtx client.Context, height *int64) (tmproto.BlockID, *tmproto.Block, error) {
|
||||
func GetProtoBlock(ctx context.Context, clientCtx client.Context, height *int64) (cmtproto.BlockID, *cmtproto.Block, error) {
|
||||
block, err := getBlock(ctx, clientCtx, height)
|
||||
if err != nil {
|
||||
return tmproto.BlockID{}, nil, err
|
||||
return cmtproto.BlockID{}, nil, err
|
||||
}
|
||||
protoBlock, err := block.Block.ToProto()
|
||||
if err != nil {
|
||||
return tmproto.BlockID{}, nil, err
|
||||
return cmtproto.BlockID{}, nil, err
|
||||
}
|
||||
protoBlockID := block.BlockID.ToProto()
|
||||
|
||||
|
||||
@ -7,9 +7,9 @@ import (
|
||||
"cosmossdk.io/depinject"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/grpc"
|
||||
@ -73,7 +73,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
genesisState, err := sims.GenesisStateWithValSet(cdc, app.DefaultGenesis(), valSet, []authtypes.GenesisAccount{acc}, balance)
|
||||
s.NoError(err)
|
||||
|
||||
stateBytes, err := tmjson.MarshalIndent(genesisState, "", " ")
|
||||
stateBytes, err := cmtjson.MarshalIndent(genesisState, "", " ")
|
||||
s.NoError(err)
|
||||
|
||||
// init chain will set the validator set and initialize the genesis accounts
|
||||
@ -86,7 +86,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
)
|
||||
|
||||
app.Commit()
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{
|
||||
Height: app.LastBlockHeight() + 1,
|
||||
AppHash: app.LastCommitID().Hash,
|
||||
ValidatorsHash: valSet.Hash(),
|
||||
@ -95,7 +95,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||
|
||||
// end of app init
|
||||
|
||||
s.ctx = app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
s.ctx = app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, interfaceRegistry)
|
||||
types.RegisterQueryServer(queryHelper, bankKeeper)
|
||||
testdata.RegisterQueryServer(queryHelper, testdata.QueryImpl{})
|
||||
|
||||
@ -251,7 +251,7 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf
|
||||
}
|
||||
|
||||
if len(mnemonic) == 0 {
|
||||
// read entropy seed straight from tmcrypto.Rand and convert to mnemonic
|
||||
// read entropy seed straight from cmtcrypto.Rand and convert to mnemonic
|
||||
entropySeed, err := bip39.NewEntropy(mnemonicEntropySize)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmbytes "github.com/cometbft/cometbft/libs/bytes"
|
||||
cmtbytes "github.com/cometbft/cometbft/libs/bytes"
|
||||
rpcclient "github.com/cometbft/cometbft/rpc/client"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
@ -20,7 +20,7 @@ import (
|
||||
|
||||
// GetNode returns an RPC client. If the context's client is not defined, an
|
||||
// error is returned.
|
||||
func (ctx Context) GetNode() (TendermintRPC, error) {
|
||||
func (ctx Context) GetNode() (CometRPC, error) {
|
||||
if ctx.Client == nil {
|
||||
return nil, errors.New("no RPC client is defined in offline mode")
|
||||
}
|
||||
@ -28,28 +28,28 @@ func (ctx Context) GetNode() (TendermintRPC, error) {
|
||||
return ctx.Client, nil
|
||||
}
|
||||
|
||||
// Query performs a query to a Tendermint node with the provided path.
|
||||
// Query performs a query to a CometBFT node with the provided path.
|
||||
// It returns the result and height of the query upon success or an error if
|
||||
// the query fails.
|
||||
func (ctx Context) Query(path string) ([]byte, int64, error) {
|
||||
return ctx.query(path, nil)
|
||||
}
|
||||
|
||||
// QueryWithData performs a query to a Tendermint node with the provided path
|
||||
// QueryWithData performs a query to a CometBFT node with the provided path
|
||||
// and a data payload. It returns the result and height of the query upon success
|
||||
// or an error if the query fails.
|
||||
func (ctx Context) QueryWithData(path string, data []byte) ([]byte, int64, error) {
|
||||
return ctx.query(path, data)
|
||||
}
|
||||
|
||||
// QueryStore performs a query to a Tendermint node with the provided key and
|
||||
// QueryStore performs a query to a CometBFT node with the provided key and
|
||||
// store name. It returns the result and height of the query upon success
|
||||
// or an error if the query fails.
|
||||
func (ctx Context) QueryStore(key tmbytes.HexBytes, storeName string) ([]byte, int64, error) {
|
||||
func (ctx Context) QueryStore(key cmtbytes.HexBytes, storeName string) ([]byte, int64, error) {
|
||||
return ctx.queryStore(key, storeName, "key")
|
||||
}
|
||||
|
||||
// QueryABCI performs a query to a Tendermint node with the provide RequestQuery.
|
||||
// QueryABCI performs a query to a CometBFT node with the provide RequestQuery.
|
||||
// It returns the ResultQuery obtained from the query. The height used to perform
|
||||
// the query is the RequestQuery Height if it is non-zero, otherwise the context
|
||||
// height is used.
|
||||
@ -126,10 +126,10 @@ func sdkErrorToGRPCError(resp abci.ResponseQuery) error {
|
||||
}
|
||||
}
|
||||
|
||||
// query performs a query to a Tendermint node with the provided store name
|
||||
// query performs a query to a CometBFT node with the provided store name
|
||||
// and path. It returns the result and height of the query upon success
|
||||
// or an error if the query fails.
|
||||
func (ctx Context) query(path string, key tmbytes.HexBytes) ([]byte, int64, error) {
|
||||
func (ctx Context) query(path string, key cmtbytes.HexBytes) ([]byte, int64, error) {
|
||||
resp, err := ctx.queryABCI(abci.RequestQuery{
|
||||
Path: path,
|
||||
Data: key,
|
||||
@ -142,10 +142,10 @@ func (ctx Context) query(path string, key tmbytes.HexBytes) ([]byte, int64, erro
|
||||
return resp.Value, resp.Height, nil
|
||||
}
|
||||
|
||||
// queryStore performs a query to a Tendermint node with the provided a store
|
||||
// queryStore performs a query to a CometBFT node with the provided a store
|
||||
// name and path. It returns the result and height of the query upon success
|
||||
// or an error if the query fails.
|
||||
func (ctx Context) queryStore(key tmbytes.HexBytes, storeName, endPath string) ([]byte, int64, error) {
|
||||
func (ctx Context) queryStore(key cmtbytes.HexBytes, storeName, endPath string) ([]byte, int64, error) {
|
||||
path := fmt.Sprintf("/store/%s/%s", storeName, endPath)
|
||||
return ctx.query(path, key)
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -57,7 +57,7 @@ func ValidatorCommand() *cobra.Command {
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().String(flags.FlagNode, "tcp://localhost:26657", "<host>:<port> to Tendermint RPC interface for this chain")
|
||||
cmd.Flags().String(flags.FlagNode, "tcp://localhost:26657", "<host>:<port> to CometBFT RPC interface for this chain")
|
||||
cmd.Flags().StringP(flags.FlagOutput, "o", "text", "Output format (text|json)")
|
||||
cmd.Flags().Int(flags.FlagPage, query.DefaultPage, "Query a specific page of paginated results")
|
||||
cmd.Flags().Int(flags.FlagLimit, 100, "Query number of results returned per page")
|
||||
@ -100,7 +100,7 @@ func (rvo ResultValidatorsOutput) String() string {
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func validatorOutput(validator *tmtypes.Validator) (ValidatorOutput, error) {
|
||||
func validatorOutput(validator *cmttypes.Validator) (ValidatorOutput, error) {
|
||||
pk, err := cryptocodec.FromTmPubKeyInterface(validator.PubKey)
|
||||
if err != nil {
|
||||
return ValidatorOutput{}, err
|
||||
|
||||
@ -8,11 +8,12 @@ require (
|
||||
cosmossdk.io/depinject v1.0.0-alpha.3
|
||||
github.com/cockroachdb/errors v1.9.1
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.1
|
||||
github.com/cosmos/cosmos-sdk v0.47.0-rc2
|
||||
// TODO to replace by a tagged version of the SDK (with CometBFT) when available
|
||||
github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230205135133-41a3dfeced29
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
google.golang.org/grpc v1.52.3
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af
|
||||
gotest.tools/v3 v3.4.0
|
||||
)
|
||||
|
||||
@ -20,7 +21,7 @@ require (
|
||||
cosmossdk.io/collections v0.0.0-20230204135315-697871069999 // indirect
|
||||
cosmossdk.io/errors v1.0.0-beta.7 // indirect
|
||||
cosmossdk.io/math v1.0.0-beta.6 // indirect
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999 // indirect
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7 // indirect
|
||||
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||
github.com/99designs/keyring v1.2.1 // indirect
|
||||
@ -113,6 +114,3 @@ require (
|
||||
pgregory.net/rapid v0.5.5 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
// This can be deleted after the CometBFT PR is merged
|
||||
replace github.com/cosmos/cosmos-sdk => ../..
|
||||
|
||||
@ -49,6 +49,8 @@ cosmossdk.io/math v1.0.0-beta.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE=
|
||||
cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999 h1:NrV990BIbdDngOoTrD3Hg5kqqgvy6c+ETaKGY5bSUmo=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999/go.mod h1:Sf3G8SV8e8H31CD6w+o2syqCwyaoL0fe244JcPSsaD4=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7 h1:IwyDN/YaQmF+Pmuv8d7vRWMM/k2RjSmPBycMcmd3ICE=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7/go.mod h1:1XOtuYs7jsfQkn7G3VQXB6I+2tHXKHZw2U/AafNbnlk=
|
||||
cosmossdk.io/x/tx v0.1.0 h1:uyyYVjG22B+jf54N803Z99Y1uPvfuNP3K1YShoCHYL8=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
||||
@ -134,6 +136,8 @@ github.com/cosmos/cosmos-db v1.0.0-rc.1 h1:SjnT8B6WKMW9WEIX32qMhnEEKcI7ZP0+G1Sa9
|
||||
github.com/cosmos/cosmos-db v1.0.0-rc.1/go.mod h1:Dnmk3flSf5lkwCqvvjNpoxjpXzhxnCAFzKHlbaForso=
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE=
|
||||
github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230205135133-41a3dfeced29 h1:HJIOs0YfTumgmw8MU1QIiCHO+tz2IWoLpXNOXzLJqnE=
|
||||
github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230205135133-41a3dfeced29/go.mod h1:9dul7UbanQCWIiz4b6FZ8QcKKU28EMgvXVNCTcc6Ivk=
|
||||
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
|
||||
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
|
||||
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
|
||||
@ -951,6 +955,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a h1:KJVqJe240LvVd+8lfzRx3hQ0UZ0fyeXEMDMHviRNQKs=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af h1:rAgzfIj9FJtmJ6ZPDlxXX6Fzzix6NOpPTvVmPY5rwQg=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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=
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
amino "github.com/tendermint/go-amino"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
@ -30,8 +30,8 @@ func NewLegacyAmino() *LegacyAmino {
|
||||
// RegisterEvidences registers Tendermint evidence types with the provided Amino
|
||||
// codec.
|
||||
func RegisterEvidences(cdc *LegacyAmino) {
|
||||
cdc.Amino.RegisterInterface((*tmtypes.Evidence)(nil), nil)
|
||||
cdc.Amino.RegisterConcrete(&tmtypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil)
|
||||
cdc.Amino.RegisterInterface((*cmttypes.Evidence)(nil), nil)
|
||||
cdc.Amino.RegisterConcrete(&cmttypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil)
|
||||
}
|
||||
|
||||
// MarshalJSONIndent provides a utility for indented JSON encoding of an object
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/cometbft/cometbft/crypto/xsalsa20symmetric"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -51,10 +51,10 @@ func TestArmorUnarmorPrivKey(t *testing.T) {
|
||||
|
||||
// armor key manually
|
||||
encryptPrivKeyFn := func(privKey cryptotypes.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) {
|
||||
saltBytes = tmcrypto.CRandBytes(16)
|
||||
saltBytes = cmtcrypto.CRandBytes(16)
|
||||
key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), crypto.BcryptSecurityParameter)
|
||||
require.NoError(t, err)
|
||||
key = tmcrypto.Sha256(key) // get 32 bytes
|
||||
key = cmtcrypto.Sha256(key) // get 32 bytes
|
||||
privKeyBytes := legacy.Cdc.Amino.MustMarshalBinaryBare(privKey)
|
||||
return saltBytes, xsalsa20symmetric.EncryptSymmetric(privKeyBytes, key)
|
||||
}
|
||||
@ -173,7 +173,7 @@ func BenchmarkBcryptGenerateFromPassword(b *testing.B) {
|
||||
param := securityParam
|
||||
b.Run(fmt.Sprintf("benchmark-security-param-%d", param), func(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
saltBytes := tmcrypto.CRandBytes(16)
|
||||
saltBytes := cmtcrypto.CRandBytes(16)
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
_, err := bcrypt.GenerateFromPassword(saltBytes, passphrase, param)
|
||||
|
||||
68
crypto/codec/cmt.go
Normal file
68
crypto/codec/cmt.go
Normal file
@ -0,0 +1,68 @@
|
||||
package codec
|
||||
|
||||
import (
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/cometbft/cometbft/crypto/encoding"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// FromTmProtoPublicKey converts a TM's cmtprotocrypto.PublicKey into our own PubKey.
|
||||
func FromTmProtoPublicKey(protoPk cmtprotocrypto.PublicKey) (cryptotypes.PubKey, error) {
|
||||
switch protoPk := protoPk.Sum.(type) {
|
||||
case *cmtprotocrypto.PublicKey_Ed25519:
|
||||
return &ed25519.PubKey{
|
||||
Key: protoPk.Ed25519,
|
||||
}, nil
|
||||
case *cmtprotocrypto.PublicKey_Secp256K1:
|
||||
return &secp256k1.PubKey{
|
||||
Key: protoPk.Secp256K1,
|
||||
}, nil
|
||||
default:
|
||||
return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk)
|
||||
}
|
||||
}
|
||||
|
||||
// ToTmProtoPublicKey converts our own PubKey to TM's cmtprotocrypto.PublicKey.
|
||||
func ToTmProtoPublicKey(pk cryptotypes.PubKey) (cmtprotocrypto.PublicKey, error) {
|
||||
switch pk := pk.(type) {
|
||||
case *ed25519.PubKey:
|
||||
return cmtprotocrypto.PublicKey{
|
||||
Sum: &cmtprotocrypto.PublicKey_Ed25519{
|
||||
Ed25519: pk.Key,
|
||||
},
|
||||
}, nil
|
||||
case *secp256k1.PubKey:
|
||||
return cmtprotocrypto.PublicKey{
|
||||
Sum: &cmtprotocrypto.PublicKey_Secp256K1{
|
||||
Secp256K1: pk.Key,
|
||||
},
|
||||
}, nil
|
||||
default:
|
||||
return cmtprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk)
|
||||
}
|
||||
}
|
||||
|
||||
// FromTmPubKeyInterface converts TM's cmtcrypto.PubKey to our own PubKey.
|
||||
func FromTmPubKeyInterface(tmPk cmtcrypto.PubKey) (cryptotypes.PubKey, error) {
|
||||
tmProtoPk, err := encoding.PubKeyToProto(tmPk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return FromTmProtoPublicKey(tmProtoPk)
|
||||
}
|
||||
|
||||
// ToTmPubKeyInterface converts our own PubKey to TM's cmtcrypto.PubKey.
|
||||
func ToTmPubKeyInterface(pk cryptotypes.PubKey) (cmtcrypto.PubKey, error) {
|
||||
tmProtoPk, err := ToTmProtoPublicKey(pk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return encoding.PubKeyFromProto(tmProtoPk)
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package codec
|
||||
|
||||
import (
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/cometbft/cometbft/crypto/encoding"
|
||||
tmprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// FromTmProtoPublicKey converts a TM's tmprotocrypto.PublicKey into our own PubKey.
|
||||
func FromTmProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, error) {
|
||||
switch protoPk := protoPk.Sum.(type) {
|
||||
case *tmprotocrypto.PublicKey_Ed25519:
|
||||
return &ed25519.PubKey{
|
||||
Key: protoPk.Ed25519,
|
||||
}, nil
|
||||
case *tmprotocrypto.PublicKey_Secp256K1:
|
||||
return &secp256k1.PubKey{
|
||||
Key: protoPk.Secp256K1,
|
||||
}, nil
|
||||
default:
|
||||
return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk)
|
||||
}
|
||||
}
|
||||
|
||||
// ToTmProtoPublicKey converts our own PubKey to TM's tmprotocrypto.PublicKey.
|
||||
func ToTmProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) {
|
||||
switch pk := pk.(type) {
|
||||
case *ed25519.PubKey:
|
||||
return tmprotocrypto.PublicKey{
|
||||
Sum: &tmprotocrypto.PublicKey_Ed25519{
|
||||
Ed25519: pk.Key,
|
||||
},
|
||||
}, nil
|
||||
case *secp256k1.PubKey:
|
||||
return tmprotocrypto.PublicKey{
|
||||
Sum: &tmprotocrypto.PublicKey_Secp256K1{
|
||||
Secp256K1: pk.Key,
|
||||
},
|
||||
}, nil
|
||||
default:
|
||||
return tmprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk)
|
||||
}
|
||||
}
|
||||
|
||||
// FromTmPubKeyInterface converts TM's tmcrypto.PubKey to our own PubKey.
|
||||
func FromTmPubKeyInterface(tmPk tmcrypto.PubKey) (cryptotypes.PubKey, error) {
|
||||
tmProtoPk, err := encoding.PubKeyToProto(tmPk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return FromTmProtoPublicKey(tmProtoPk)
|
||||
}
|
||||
|
||||
// ToTmPubKeyInterface converts our own PubKey to TM's tmcrypto.PubKey.
|
||||
func ToTmPubKeyInterface(pk cryptotypes.PubKey) (tmcrypto.PubKey, error) {
|
||||
tmProtoPk, err := ToTmProtoPublicKey(pk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return encoding.PubKeyFromProto(tmProtoPk)
|
||||
}
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/99designs/keyring"
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/input"
|
||||
@ -752,7 +752,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
saltBytes := tmcrypto.CRandBytes(16)
|
||||
saltBytes := cmtcrypto.CRandBytes(16)
|
||||
passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/address"
|
||||
"github.com/cosmos/cosmos-sdk/types/errors"
|
||||
@ -32,13 +32,13 @@ type PubKey struct {
|
||||
ecdsa.PublicKey
|
||||
|
||||
// cache
|
||||
address tmcrypto.Address
|
||||
address cmtcrypto.Address
|
||||
}
|
||||
|
||||
// Address gets the address associated with a pubkey. If no address exists, it returns a newly created ADR-28 address
|
||||
// for ECDSA keys.
|
||||
// protoName is a concrete proto structure id.
|
||||
func (pk *PubKey) Address(protoName string) tmcrypto.Address {
|
||||
func (pk *PubKey) Address(protoName string) cmtcrypto.Address {
|
||||
if pk.address == nil {
|
||||
pk.address = address.Hash(protoName, pk.Bytes())
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package multisig
|
||||
import (
|
||||
fmt "fmt"
|
||||
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
@ -36,7 +36,7 @@ func NewLegacyAminoPubKey(threshold int, pubKeys []cryptotypes.PubKey) *LegacyAm
|
||||
|
||||
// Address implements cryptotypes.PubKey Address method
|
||||
func (m *LegacyAminoPubKey) Address() cryptotypes.Address {
|
||||
return tmcrypto.AddressHash(m.Bytes())
|
||||
return cmtcrypto.AddressHash(m.Bytes())
|
||||
}
|
||||
|
||||
// Bytes returns the proto encoded version of the LegacyAminoPubKey
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package secp256r1
|
||||
|
||||
import (
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
ecdsa "github.com/cosmos/cosmos-sdk/crypto/keys/internal/ecdsa"
|
||||
@ -31,7 +31,7 @@ func (m *PubKey) Equals(other cryptotypes.PubKey) bool {
|
||||
}
|
||||
|
||||
// Address implements SDK PubKey interface.
|
||||
func (m *PubKey) Address() tmcrypto.Address {
|
||||
func (m *PubKey) Address() cmtcrypto.Address {
|
||||
return m.Key.Address(proto.MessageName(m))
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ func (mock LedgerSECP256K1Mock) GetAddressPubKeySECP256K1(derivationPath []uint3
|
||||
compressedPublicKey := make([]byte, csecp256k1.PubKeySize)
|
||||
copy(compressedPublicKey, cmp.SerializeCompressed())
|
||||
|
||||
// Generate the bech32 addr using existing tmcrypto/etc.
|
||||
// Generate the bech32 addr using existing cmtcrypto/etc.
|
||||
pub := &csecp256k1.PubKey{Key: compressedPublicKey}
|
||||
addr := sdk.AccAddress(pub.Address()).String()
|
||||
return pk, addr, err
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
tmrand "github.com/cometbft/cometbft/libs/rand"
|
||||
cmtrand "github.com/cometbft/cometbft/libs/rand"
|
||||
)
|
||||
|
||||
func randCompactBitArray(bits int) (*CompactBitArray, []byte) {
|
||||
numBytes := (bits + 7) / 8
|
||||
src := tmrand.Bytes((bits + 7) / 8)
|
||||
src := cmtrand.Bytes((bits + 7) / 8)
|
||||
bA := NewCompactBitArray(bits)
|
||||
|
||||
for i := 0; i < numBytes-1; i++ {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
tmcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
)
|
||||
|
||||
@ -50,5 +50,5 @@ type PrivKey interface {
|
||||
}
|
||||
|
||||
type (
|
||||
Address = tmcrypto.Address
|
||||
Address = cmtcrypto.Address
|
||||
)
|
||||
|
||||
@ -85,12 +85,12 @@ Also, it should be noted that this ADR includes only the simplest form of consen
|
||||
|
||||
```go
|
||||
abci.ValidatorUpdate{
|
||||
PubKey: tmtypes.TM2PB.PubKey(OldConsPubKey),
|
||||
PubKey: cmttypes.TM2PB.PubKey(OldConsPubKey),
|
||||
Power: 0,
|
||||
}
|
||||
|
||||
abci.ValidatorUpdate{
|
||||
PubKey: tmtypes.TM2PB.PubKey(NewConsPubKey),
|
||||
PubKey: cmttypes.TM2PB.PubKey(NewConsPubKey),
|
||||
Power: v.ConsensusPower(),
|
||||
}
|
||||
```
|
||||
|
||||
@ -109,7 +109,7 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) {
|
||||
|
||||
Here, the `EmitTypedEvent` is a method on `EventManager` which takes typed event as input and apply json serialization on it. Then it maps the JSON key/value pairs to `event.Attributes` and emits it in form of `sdk.Event`. `Event.Type` will be the type URL of the proto message.
|
||||
|
||||
When we subscribe to emitted events on the tendermint websocket, they are emitted in the form of an `abci.Event`. `ParseTypedEvent` parses the event back to it's original proto message.
|
||||
When we subscribe to emitted events on the cometbft websocket, they are emitted in the form of an `abci.Event`. `ParseTypedEvent` parses the event back to it's original proto message.
|
||||
|
||||
**Step-2**: Add proto definitions for typed events for msgs in each module:
|
||||
|
||||
@ -209,7 +209,7 @@ func SubmitProposalEventHandler(ev proto.Message) (err error) {
|
||||
// should be implemented somewhere in the Cosmos SDK. The Cosmos SDK can include an EventEmitters for tm.event='Tx'
|
||||
// and/or tm.event='NewBlock' (the new block events may contain typed events)
|
||||
func TxEmitter(ctx context.Context, cliCtx client.Context, ehs ...EventHandler) (err error) {
|
||||
// Instantiate and start tendermint RPC client
|
||||
// Instantiate and start CometBFT RPC client
|
||||
client, err := cliCtx.GetNode()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -260,8 +260,8 @@ func TxEmitter(ctx context.Context, cliCtx client.Context, ehs ...EventHandler)
|
||||
return group.Wait()
|
||||
}
|
||||
|
||||
// PublishChainTxEvents events using tmclient. Waits on context shutdown signals to exit.
|
||||
func PublishChainTxEvents(ctx context.Context, client tmclient.EventsClient, bus pubsub.Bus, mb module.BasicManager) (err error) {
|
||||
// PublishChainTxEvents events using cmtclient. Waits on context shutdown signals to exit.
|
||||
func PublishChainTxEvents(ctx context.Context, client cmtclient.EventsClient, bus pubsub.Bus, mb module.BasicManager) (err error) {
|
||||
// Subscribe to transaction events
|
||||
txch, err := client.Subscribe(ctx, "txevents", "tm.event='Tx'", 100)
|
||||
if err != nil {
|
||||
@ -285,7 +285,7 @@ func PublishChainTxEvents(ctx context.Context, client tmclient.EventsClient, bus
|
||||
break
|
||||
case ed := <-ch:
|
||||
switch evt := ed.Data.(type) {
|
||||
case tmtypes.EventDataTx:
|
||||
case cmttypes.EventDataTx:
|
||||
if !evt.Result.IsOK() {
|
||||
continue
|
||||
}
|
||||
|
||||
4
go.mod
4
go.mod
@ -9,7 +9,7 @@ require (
|
||||
cosmossdk.io/depinject v1.0.0-alpha.3
|
||||
cosmossdk.io/errors v1.0.0-beta.7
|
||||
cosmossdk.io/math v1.0.0-beta.6
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7
|
||||
cosmossdk.io/x/tx v0.1.0
|
||||
github.com/99designs/keyring v1.2.1
|
||||
github.com/armon/go-metrics v0.4.1
|
||||
@ -55,7 +55,7 @@ require (
|
||||
golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9
|
||||
google.golang.org/genproto v0.0.0-20230202175211-008b39050e57
|
||||
google.golang.org/grpc v1.52.3
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af
|
||||
gotest.tools/v3 v3.4.0
|
||||
pgregory.net/rapid v0.5.5
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
|
||||
4
go.sum
4
go.sum
@ -49,6 +49,8 @@ cosmossdk.io/math v1.0.0-beta.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE=
|
||||
cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999 h1:NrV990BIbdDngOoTrD3Hg5kqqgvy6c+ETaKGY5bSUmo=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999/go.mod h1:Sf3G8SV8e8H31CD6w+o2syqCwyaoL0fe244JcPSsaD4=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7 h1:IwyDN/YaQmF+Pmuv8d7vRWMM/k2RjSmPBycMcmd3ICE=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7/go.mod h1:1XOtuYs7jsfQkn7G3VQXB6I+2tHXKHZw2U/AafNbnlk=
|
||||
cosmossdk.io/x/tx v0.1.0 h1:uyyYVjG22B+jf54N803Z99Y1uPvfuNP3K1YShoCHYL8=
|
||||
cosmossdk.io/x/tx v0.1.0/go.mod h1:qsDv7e1fSftkF16kpSAk+7ROOojyj+SC0Mz3ukI52EQ=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
@ -1278,6 +1280,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a h1:KJVqJe240LvVd+8lfzRx3hQ0UZ0fyeXEMDMHviRNQKs=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af h1:rAgzfIj9FJtmJ6ZPDlxXX6Fzzix6NOpPTvVmPY5rwQg=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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=
|
||||
|
||||
@ -93,13 +93,13 @@ func New(clientCtx client.Context, logger log.Logger, grpcSrv *grpc.Server) *Ser
|
||||
func (s *Server) Start(cfg config.Config) error {
|
||||
s.mtx.Lock()
|
||||
|
||||
tmCfg := tmrpcserver.DefaultConfig()
|
||||
tmCfg.MaxOpenConnections = int(cfg.API.MaxOpenConnections)
|
||||
tmCfg.ReadTimeout = time.Duration(cfg.API.RPCReadTimeout) * time.Second
|
||||
tmCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second
|
||||
tmCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes)
|
||||
cmtCfg := tmrpcserver.DefaultConfig()
|
||||
cmtCfg.MaxOpenConnections = int(cfg.API.MaxOpenConnections)
|
||||
cmtCfg.ReadTimeout = time.Duration(cfg.API.RPCReadTimeout) * time.Second
|
||||
cmtCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second
|
||||
cmtCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes)
|
||||
|
||||
listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg)
|
||||
listener, err := tmrpcserver.Listen(cfg.API.Address, cmtCfg)
|
||||
if err != nil {
|
||||
s.mtx.Unlock()
|
||||
return err
|
||||
@ -137,10 +137,10 @@ func (s *Server) Start(cfg config.Config) error {
|
||||
s.logger.Info("starting API server...")
|
||||
if cfg.API.EnableUnsafeCORS {
|
||||
allowAllCORS := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"}))
|
||||
return tmrpcserver.Serve(s.listener, allowAllCORS(s.Router), s.logger, tmCfg)
|
||||
return tmrpcserver.Serve(s.listener, allowAllCORS(s.Router), s.logger, cmtCfg)
|
||||
}
|
||||
|
||||
return tmrpcserver.Serve(s.listener, s.Router, s.logger, tmCfg)
|
||||
return tmrpcserver.Serve(s.listener, s.Router, s.logger, cmtCfg)
|
||||
}
|
||||
|
||||
// Close closes the API server.
|
||||
|
||||
@ -3,8 +3,8 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
tmcli "github.com/cometbft/cometbft/libs/cli"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
cmtcli "github.com/cometbft/cometbft/libs/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -20,15 +20,15 @@ func Execute(rootCmd *cobra.Command, envPrefix string, defaultHome string) error
|
||||
// Create and set a client.Context on the command's Context. During the pre-run
|
||||
// of the root command, a default initialized client.Context is provided to
|
||||
// seed child command execution with values such as AccountRetriever, Keyring,
|
||||
// and a Tendermint RPC. This requires the use of a pointer reference when
|
||||
// and a CometBFT RPC. This requires the use of a pointer reference when
|
||||
// getting and setting the client.Context. Ideally, we utilize
|
||||
// https://github.com/spf13/cobra/pull/1118.
|
||||
ctx := CreateExecuteContext(context.Background())
|
||||
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogLevel, tmcfg.DefaultLogLevel, "The logging level (trace|debug|info|warn|error|fatal|panic)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatPlain, "The logging format (json|plain)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogLevel, cmtcfg.DefaultLogLevel, "The logging level (trace|debug|info|warn|error|fatal|panic)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
|
||||
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
|
||||
executor := cmtcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
|
||||
return executor.ExecuteContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
// ShowNodeIDCmd - ported from Tendermint, dump node ID to stdout
|
||||
// ShowNodeIDCmd - ported from CometBFT, dump node ID to stdout
|
||||
func ShowNodeIDCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "show-node-id",
|
||||
@ -34,11 +34,11 @@ func ShowNodeIDCmd() *cobra.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// ShowValidatorCmd - ported from Tendermint, show this node's validator info
|
||||
// ShowValidatorCmd - ported from CometBFT, show this node's validator info
|
||||
func ShowValidatorCmd() *cobra.Command {
|
||||
cmd := cobra.Command{
|
||||
Use: "show-validator",
|
||||
Short: "Show this node's tendermint validator info",
|
||||
Short: "Show this node's CometBFT validator info",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
cfg := serverCtx.Config
|
||||
@ -72,7 +72,7 @@ func ShowValidatorCmd() *cobra.Command {
|
||||
func ShowAddressCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "show-address",
|
||||
Short: "Shows this node's tendermint validator consensus address",
|
||||
Short: "Shows this node's CometBFT validator consensus address",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
cfg := serverCtx.Config
|
||||
@ -88,11 +88,11 @@ func ShowAddressCmd() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// VersionCmd prints tendermint and ABCI version numbers.
|
||||
// VersionCmd prints CometBFT and ABCI version numbers.
|
||||
func VersionCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print tendermint libraries' version",
|
||||
Short: "Print CometBFT libraries' version",
|
||||
Long: "Print protocols' and libraries' version numbers against which this app has been compiled.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
bs, err := yaml.Marshal(&struct {
|
||||
@ -61,15 +61,15 @@ type BaseConfig struct {
|
||||
|
||||
// MinRetainBlocks defines the minimum block height offset from the current
|
||||
// block being committed, such that blocks past this offset may be pruned
|
||||
// from Tendermint. It is used as part of the process of determining the
|
||||
// from CometBFT. It is used as part of the process of determining the
|
||||
// ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates
|
||||
// that no blocks should be pruned.
|
||||
//
|
||||
// This configuration value is only responsible for pruning Tendermint blocks.
|
||||
// This configuration value is only responsible for pruning CometBFT blocks.
|
||||
// It has no bearing on application state pruning which is determined by the
|
||||
// "pruning-*" configurations.
|
||||
//
|
||||
// Note: Tendermint block pruning is dependant on this parameter in conjunction
|
||||
// Note: CometBFT block pruning is dependant on this parameter in conjunction
|
||||
// with the unbonding (safety threshold) period, state pruning and state sync
|
||||
// snapshot parameters to determine the correct minimum value of
|
||||
// ResponseCommit.RetainHeight.
|
||||
@ -79,7 +79,7 @@ type BaseConfig struct {
|
||||
InterBlockCache bool `mapstructure:"inter-block-cache"`
|
||||
|
||||
// IndexEvents defines the set of events in the form {eventType}.{attributeKey},
|
||||
// which informs Tendermint what to index. If empty, all events will be indexed.
|
||||
// which informs CometBFT what to index. If empty, all events will be indexed.
|
||||
IndexEvents []string `mapstructure:"index-events"`
|
||||
|
||||
// IavlCacheSize set the size of the iavl tree cache.
|
||||
@ -92,7 +92,7 @@ type BaseConfig struct {
|
||||
IAVLLazyLoading bool `mapstructure:"iavl-lazy-loading"`
|
||||
|
||||
// AppDBBackend defines the type of Database to use for the application and snapshots databases.
|
||||
// An empty string indicates that the Tendermint config's DBBackend value should be used.
|
||||
// An empty string indicates that the CometBFT config's DBBackend value should be used.
|
||||
AppDBBackend string `mapstructure:"app-db-backend"`
|
||||
}
|
||||
|
||||
@ -113,13 +113,13 @@ type APIConfig struct {
|
||||
// MaxOpenConnections defines the number of maximum open connections
|
||||
MaxOpenConnections uint `mapstructure:"max-open-connections"`
|
||||
|
||||
// RPCReadTimeout defines the Tendermint RPC read timeout (in seconds)
|
||||
// RPCReadTimeout defines the CometBFT RPC read timeout (in seconds)
|
||||
RPCReadTimeout uint `mapstructure:"rpc-read-timeout"`
|
||||
|
||||
// RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds)
|
||||
// RPCWriteTimeout defines the CometBFT RPC write timeout (in seconds)
|
||||
RPCWriteTimeout uint `mapstructure:"rpc-write-timeout"`
|
||||
|
||||
// RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes)
|
||||
// RPCMaxBodyBytes defines the CometBFT maximum response body (in bytes)
|
||||
RPCMaxBodyBytes uint `mapstructure:"rpc-max-body-bytes"`
|
||||
|
||||
// TODO: TLS/Proxy configuration.
|
||||
|
||||
@ -46,15 +46,15 @@ halt-time = {{ .BaseConfig.HaltTime }}
|
||||
|
||||
# MinRetainBlocks defines the minimum block height offset from the current
|
||||
# block being committed, such that all blocks past this offset are pruned
|
||||
# from Tendermint. It is used as part of the process of determining the
|
||||
# from CometBFT. It is used as part of the process of determining the
|
||||
# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates
|
||||
# that no blocks should be pruned.
|
||||
#
|
||||
# This configuration value is only responsible for pruning Tendermint blocks.
|
||||
# This configuration value is only responsible for pruning CometBFT blocks.
|
||||
# It has no bearing on application state pruning which is determined by the
|
||||
# "pruning-*" configurations.
|
||||
#
|
||||
# Note: Tendermint block pruning is dependant on this parameter in conjunction
|
||||
# Note: CometBFT block pruning is dependant on this parameter in conjunction
|
||||
# with the unbonding (safety threshold) period, state pruning and state sync
|
||||
# snapshot parameters to determine the correct minimum value of
|
||||
# ResponseCommit.RetainHeight.
|
||||
@ -64,7 +64,7 @@ min-retain-blocks = {{ .BaseConfig.MinRetainBlocks }}
|
||||
inter-block-cache = {{ .BaseConfig.InterBlockCache }}
|
||||
|
||||
# IndexEvents defines the set of events in the form {eventType}.{attributeKey},
|
||||
# which informs Tendermint what to index. If empty, all events will be indexed.
|
||||
# which informs CometBFT what to index. If empty, all events will be indexed.
|
||||
#
|
||||
# Example:
|
||||
# ["message.sender", "message.recipient"]
|
||||
@ -84,7 +84,7 @@ iavl-lazy-loading = {{ .BaseConfig.IAVLLazyLoading }}
|
||||
# AppDBBackend defines the database backend type to use for the application and snapshots DBs.
|
||||
# An empty string indicates that a fallback will be used.
|
||||
# First fallback is the deprecated compile-time types.DBBackend value.
|
||||
# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml.
|
||||
# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in CometBFT's config.toml.
|
||||
app-db-backend = "{{ .BaseConfig.AppDBBackend }}"
|
||||
|
||||
###############################################################################
|
||||
@ -140,13 +140,13 @@ address = "{{ .API.Address }}"
|
||||
# MaxOpenConnections defines the number of maximum open connections.
|
||||
max-open-connections = {{ .API.MaxOpenConnections }}
|
||||
|
||||
# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds).
|
||||
# RPCReadTimeout defines the CometBFT RPC read timeout (in seconds).
|
||||
rpc-read-timeout = {{ .API.RPCReadTimeout }}
|
||||
|
||||
# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds).
|
||||
# RPCWriteTimeout defines the CometBFT RPC write timeout (in seconds).
|
||||
rpc-write-timeout = {{ .API.RPCWriteTimeout }}
|
||||
|
||||
# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes).
|
||||
# RPCMaxBodyBytes defines the CometBFT maximum response body (in bytes).
|
||||
rpc-max-body-bytes = {{ .API.RPCMaxBodyBytes }}
|
||||
|
||||
# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -73,7 +73,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com
|
||||
return fmt.Errorf("error exporting state: %v", err)
|
||||
}
|
||||
|
||||
doc, err := tmtypes.GenesisDocFromFile(serverCtx.Config.GenesisFile())
|
||||
doc, err := cmttypes.GenesisDocFromFile(serverCtx.Config.GenesisFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -81,25 +81,25 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com
|
||||
doc.AppState = exported.AppState
|
||||
doc.Validators = exported.Validators
|
||||
doc.InitialHeight = exported.Height
|
||||
doc.ConsensusParams = &tmtypes.ConsensusParams{
|
||||
Block: tmtypes.BlockParams{
|
||||
doc.ConsensusParams = &cmttypes.ConsensusParams{
|
||||
Block: cmttypes.BlockParams{
|
||||
MaxBytes: exported.ConsensusParams.Block.MaxBytes,
|
||||
MaxGas: exported.ConsensusParams.Block.MaxGas,
|
||||
},
|
||||
Evidence: tmtypes.EvidenceParams{
|
||||
Evidence: cmttypes.EvidenceParams{
|
||||
MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks,
|
||||
MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration,
|
||||
MaxBytes: exported.ConsensusParams.Evidence.MaxBytes,
|
||||
},
|
||||
Validator: tmtypes.ValidatorParams{
|
||||
Validator: cmttypes.ValidatorParams{
|
||||
PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes,
|
||||
},
|
||||
}
|
||||
|
||||
// NOTE: Tendermint uses a custom JSON decoder for GenesisDoc
|
||||
// NOTE: CometBFT uses a custom JSON decoder for GenesisDoc
|
||||
// (except for stuff inside AppState). Inside AppState, we're free
|
||||
// to encode as protobuf or amino.
|
||||
encoded, err := tmjson.Marshal(doc)
|
||||
encoded, err := cmtjson.Marshal(doc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -113,8 +113,8 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com
|
||||
return nil
|
||||
}
|
||||
|
||||
var exportedGenDoc tmtypes.GenesisDoc
|
||||
if err = tmjson.Unmarshal(out, &exportedGenDoc); err != nil {
|
||||
var exportedGenDoc cmttypes.GenesisDoc
|
||||
if err = cmtjson.Unmarshal(out, &exportedGenDoc); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = exportedGenDoc.SaveAs(outputDocument); err != nil {
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cometbft/cometbft/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -58,7 +58,7 @@ func TestDeliverTx(t *testing.T) {
|
||||
tx := NewTx(key, value, randomAccounts[0].Address)
|
||||
txBytes := tx.GetSignBytes()
|
||||
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{
|
||||
AppHash: []byte("apphash"),
|
||||
Height: 1,
|
||||
}})
|
||||
|
||||
@ -6,17 +6,17 @@ import (
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmlog "github.com/cometbft/cometbft/libs/log"
|
||||
cmtlog "github.com/cometbft/cometbft/libs/log"
|
||||
)
|
||||
|
||||
// SetupApp returns an application as well as a clean-up function to be used to
|
||||
// quickly setup a test case with an app.
|
||||
func SetupApp() (abci.Application, func(), error) {
|
||||
var logger tmlog.Logger
|
||||
var logger cmtlog.Logger
|
||||
if testing.Verbose() {
|
||||
logger = tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout)).With("module", "mock")
|
||||
logger = cmtlog.NewTMLogger(cmtlog.NewSyncWriter(os.Stdout)).With("module", "mock")
|
||||
} else {
|
||||
logger = tmlog.NewNopLogger()
|
||||
logger = cmtlog.NewNopLogger()
|
||||
}
|
||||
|
||||
rootDir, err := os.MkdirTemp("", "mock-sdk")
|
||||
|
||||
@ -3,25 +3,25 @@ package server
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
|
||||
cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// NewRollbackCmd creates a command to rollback tendermint and multistore state by one height.
|
||||
// NewRollbackCmd creates a command to rollback CometBFT and multistore state by one height.
|
||||
func NewRollbackCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command {
|
||||
var removeBlock bool
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "rollback",
|
||||
Short: "rollback cosmos-sdk and tendermint state by one height",
|
||||
Short: "rollback Cosmos SDK and CometBFT state by one height",
|
||||
Long: `
|
||||
A state rollback is performed to recover from an incorrect application state transition,
|
||||
when Tendermint has persisted an incorrect app hash and is thus unable to make
|
||||
when CometBFT has persisted an incorrect app hash and is thus unable to make
|
||||
progress. Rollback overwrites a state at height n with the state at height n - 1.
|
||||
The application also rolls back to height n - 1. No blocks are removed, so upon
|
||||
restarting Tendermint the transactions in block n will be re-executed against the
|
||||
restarting CometBFT the transactions in block n will be re-executed against the
|
||||
application.
|
||||
`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -33,10 +33,10 @@ application.
|
||||
return err
|
||||
}
|
||||
app := appCreator(ctx.Logger, db, nil, ctx.Viper)
|
||||
// rollback tendermint state
|
||||
height, hash, err := tmcmd.RollbackState(ctx.Config, removeBlock)
|
||||
// rollback CometBFT state
|
||||
height, hash, err := cmtcmd.RollbackState(ctx.Config, removeBlock)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to rollback tendermint state: %w", err)
|
||||
return fmt.Errorf("failed to rollback cometbft state: %w", err)
|
||||
}
|
||||
// rollback the multistore
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// Tendermint full-node start flags
|
||||
// CometBFT full-node start flags
|
||||
flagWithTendermint = "with-tendermint"
|
||||
flagAddress = "address"
|
||||
flagTransport = "transport"
|
||||
@ -80,13 +80,13 @@ const (
|
||||
)
|
||||
|
||||
// StartCmd runs the service passed in, either stand-alone or in-process with
|
||||
// Tendermint.
|
||||
// CometBFT.
|
||||
func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "start",
|
||||
Short: "Run the full node",
|
||||
Long: `Run the full node application with Tendermint in or out of process. By
|
||||
default, the application will run with Tendermint in process.
|
||||
Long: `Run the full node application with CometBFT in or out of process. By
|
||||
default, the application will run with CometBFT in process.
|
||||
|
||||
Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', and
|
||||
'pruning-interval' together.
|
||||
@ -108,7 +108,7 @@ For profiling and benchmarking purposes, CPU profiling can be enabled via the '-
|
||||
which accepts a path for the resulting pprof file.
|
||||
|
||||
The node may be started in a 'query only' mode where only the gRPC and JSON HTTP
|
||||
API services are enabled via the 'grpc-only' flag. In this mode, Tendermint is
|
||||
API services are enabled via the 'grpc-only' flag. In this mode, CometBFT is
|
||||
bypassed and can be used when legacy queries are needed after an on-chain upgrade
|
||||
is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
`,
|
||||
@ -133,7 +133,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
|
||||
withTM, _ := cmd.Flags().GetBool(flagWithTendermint)
|
||||
if !withTM {
|
||||
serverCtx.Logger.Info("starting ABCI without Tendermint")
|
||||
serverCtx.Logger.Info("starting ABCI without CometBFT")
|
||||
return startStandAlone(serverCtx, appCreator)
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
}
|
||||
|
||||
cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory")
|
||||
cmd.Flags().Bool(flagWithTendermint, true, "Run abci app embedded in-process with tendermint")
|
||||
cmd.Flags().Bool(flagWithTendermint, true, "Run abci app embedded in-process with CometBFT")
|
||||
cmd.Flags().String(flagAddress, "tcp://0.0.0.0:26658", "Listen address")
|
||||
cmd.Flags().String(flagTransport, "socket", "Transport protocol: socket, grpc")
|
||||
cmd.Flags().String(flagTraceStore, "", "Enable KVStore tracing to an output file")
|
||||
@ -165,18 +165,18 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')")
|
||||
cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')")
|
||||
cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks")
|
||||
cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks")
|
||||
cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune CometBFT blocks")
|
||||
|
||||
cmd.Flags().Bool(FlagAPIEnable, false, "Define if the API server should be enabled")
|
||||
cmd.Flags().Bool(FlagAPISwagger, false, "Define if swagger documentation should automatically be registered (Note: the API must also be enabled)")
|
||||
cmd.Flags().String(FlagAPIAddress, serverconfig.DefaultAPIAddress, "the API server address to listen on")
|
||||
cmd.Flags().Uint(FlagAPIMaxOpenConnections, 1000, "Define the number of maximum open connections")
|
||||
cmd.Flags().Uint(FlagRPCReadTimeout, 10, "Define the Tendermint RPC read timeout (in seconds)")
|
||||
cmd.Flags().Uint(FlagRPCWriteTimeout, 0, "Define the Tendermint RPC write timeout (in seconds)")
|
||||
cmd.Flags().Uint(FlagRPCMaxBodyBytes, 1000000, "Define the Tendermint maximum response body (in bytes)")
|
||||
cmd.Flags().Uint(FlagRPCReadTimeout, 10, "Define the CometBFT RPC read timeout (in seconds)")
|
||||
cmd.Flags().Uint(FlagRPCWriteTimeout, 0, "Define the CometBFT RPC write timeout (in seconds)")
|
||||
cmd.Flags().Uint(FlagRPCMaxBodyBytes, 1000000, "Define the CometBFT maximum response body (in bytes)")
|
||||
cmd.Flags().Bool(FlagAPIEnableUnsafeCORS, false, "Define if CORS should be enabled (unsafe - use it at your own risk)")
|
||||
|
||||
cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no Tendermint process is started)")
|
||||
cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no CometBFT process is started)")
|
||||
cmd.Flags().Bool(flagGRPCEnable, true, "Define if the gRPC server should be enabled")
|
||||
cmd.Flags().String(flagGRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on")
|
||||
|
||||
@ -189,7 +189,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
|
||||
cmd.Flags().Int(FlagMempoolMaxTxs, mempool.DefaultMaxTx, "Sets MaxTx value for the app-side mempool")
|
||||
|
||||
// add support for all Tendermint-specific command line options
|
||||
// add support for all CometBFT-specific command line options
|
||||
tcmd.AddNodeFlags(cmd)
|
||||
return cmd
|
||||
}
|
||||
@ -321,10 +321,10 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
)
|
||||
|
||||
if gRPCOnly {
|
||||
ctx.Logger.Info("starting node in gRPC only mode; Tendermint is disabled")
|
||||
ctx.Logger.Info("starting node in gRPC only mode; CometBFT is disabled")
|
||||
config.GRPC.Enable = true
|
||||
} else {
|
||||
ctx.Logger.Info("starting node with ABCI Tendermint in-process")
|
||||
ctx.Logger.Info("starting node with ABCI CometBFT in-process")
|
||||
|
||||
tmNode, err = node.NewNode(
|
||||
cfg,
|
||||
@ -347,7 +347,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
|
||||
// Add the tx service to the gRPC router. We only need to register this
|
||||
// service if API or gRPC is enabled, and avoid doing so in the general
|
||||
// case, because it spawns a new local tendermint RPC client.
|
||||
// case, because it spawns a new local CometBFT RPC client.
|
||||
if (config.API.Enable || config.GRPC.Enable) && tmNode != nil {
|
||||
// re-assign for making the client available below
|
||||
// do not use := to avoid shadowing clientCtx
|
||||
@ -453,7 +453,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
}
|
||||
|
||||
// At this point it is safe to block the process if we're in gRPC only mode as
|
||||
// we do not need to handle any Tendermint related processes.
|
||||
// we do not need to handle any CometBFT related processes.
|
||||
if gRPCOnly {
|
||||
// wait for signal capture and gracefully return
|
||||
return WaitForQuitSignals()
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/cosmos/gogoproto/grpc"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@ -53,7 +53,7 @@ type (
|
||||
// simulation, fetching txs by hash...).
|
||||
RegisterTxService(client.Context)
|
||||
|
||||
// RegisterTendermintService registers the gRPC Query service for tendermint queries.
|
||||
// RegisterTendermintService registers the gRPC Query service for CometBFT queries.
|
||||
RegisterTendermintService(client.Context)
|
||||
|
||||
// RegisterNodeService registers the node gRPC Query service.
|
||||
@ -76,11 +76,11 @@ type (
|
||||
// AppState is the application state as JSON.
|
||||
AppState json.RawMessage
|
||||
// Validators is the exported validator set.
|
||||
Validators []tmtypes.GenesisValidator
|
||||
Validators []cmttypes.GenesisValidator
|
||||
// Height is the app's latest block height.
|
||||
Height int64
|
||||
// ConsensusParams are the exported consensus params for ABCI.
|
||||
ConsensusParams *tmproto.ConsensusParams
|
||||
ConsensusParams *cmtproto.ConsensusParams
|
||||
}
|
||||
|
||||
// AppExporter is a function that dumps all app state to
|
||||
|
||||
@ -16,11 +16,11 @@ import (
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
tmcli "github.com/cometbft/cometbft/libs/cli"
|
||||
tmflags "github.com/cometbft/cometbft/libs/cli/flags"
|
||||
tmlog "github.com/cometbft/cometbft/libs/log"
|
||||
cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
cmtcli "github.com/cometbft/cometbft/libs/cli"
|
||||
cmtflags "github.com/cometbft/cometbft/libs/cli/flags"
|
||||
cmtlog "github.com/cometbft/cometbft/libs/log"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
@ -47,8 +47,8 @@ const ServerContextKey = sdk.ContextKey("server.context")
|
||||
// server context
|
||||
type Context struct {
|
||||
Viper *viper.Viper
|
||||
Config *tmcfg.Config
|
||||
Logger tmlog.Logger
|
||||
Config *cmtcfg.Config
|
||||
Logger cmtlog.Logger
|
||||
}
|
||||
|
||||
// ErrorCode contains the exit code for server exit.
|
||||
@ -63,12 +63,12 @@ func (e ErrorCode) Error() string {
|
||||
func NewDefaultContext() *Context {
|
||||
return NewContext(
|
||||
viper.New(),
|
||||
tmcfg.DefaultConfig(),
|
||||
tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout)),
|
||||
cmtcfg.DefaultConfig(),
|
||||
cmtlog.NewTMLogger(cmtlog.NewSyncWriter(os.Stdout)),
|
||||
)
|
||||
}
|
||||
|
||||
func NewContext(v *viper.Viper, config *tmcfg.Config, logger tmlog.Logger) *Context {
|
||||
func NewContext(v *viper.Viper, config *cmtcfg.Config, logger cmtlog.Logger) *Context {
|
||||
return &Context{v, config, logger}
|
||||
}
|
||||
|
||||
@ -108,15 +108,15 @@ func bindFlags(basename string, cmd *cobra.Command, v *viper.Viper) (err error)
|
||||
|
||||
// InterceptConfigsPreRunHandler performs a pre-run function for the root daemon
|
||||
// application command. It will create a Viper literal and a default server
|
||||
// Context. The server Tendermint configuration will either be read and parsed
|
||||
// Context. The server CometBFT configuration will either be read and parsed
|
||||
// or created and saved to disk, where the server Context is updated to reflect
|
||||
// the Tendermint configuration. It takes custom app config template and config
|
||||
// settings to create a custom Tendermint configuration. If the custom template
|
||||
// the CometBFT configuration. It takes custom app config template and config
|
||||
// settings to create a custom CometBFT configuration. If the custom template
|
||||
// is empty, it uses default-template provided by the server. The Viper literal
|
||||
// is used to read and parse the application configuration. Command handlers can
|
||||
// fetch the server Context to get the Tendermint configuration or to get access
|
||||
// fetch the server Context to get the CometBFT configuration or to get access
|
||||
// to Viper.
|
||||
func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate string, customAppConfig interface{}, tmConfig *tmcfg.Config) error {
|
||||
func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate string, customAppConfig interface{}, cmtConfig *cmtcfg.Config) error {
|
||||
serverCtx := NewDefaultContext()
|
||||
|
||||
// Get the executable name and configure the viper instance so that environmental
|
||||
@ -142,32 +142,32 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s
|
||||
serverCtx.Viper.AutomaticEnv()
|
||||
|
||||
// intercept configuration files, using both Viper instances separately
|
||||
config, err := interceptConfigs(serverCtx.Viper, customAppConfigTemplate, customAppConfig, tmConfig)
|
||||
config, err := interceptConfigs(serverCtx.Viper, customAppConfigTemplate, customAppConfig, cmtConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// return value is a tendermint configuration object
|
||||
// return value is a CometBFT configuration object
|
||||
serverCtx.Config = config
|
||||
if err = bindFlags(basename, cmd, serverCtx.Viper); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var logger tmlog.Logger
|
||||
if serverCtx.Viper.GetString(flags.FlagLogFormat) == tmcfg.LogFormatJSON {
|
||||
logger = tmlog.NewTMJSONLogger(tmlog.NewSyncWriter(os.Stdout))
|
||||
var logger cmtlog.Logger
|
||||
if serverCtx.Viper.GetString(flags.FlagLogFormat) == cmtcfg.LogFormatJSON {
|
||||
logger = cmtlog.NewTMJSONLogger(cmtlog.NewSyncWriter(os.Stdout))
|
||||
} else {
|
||||
logger = tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout))
|
||||
logger = cmtlog.NewTMLogger(cmtlog.NewSyncWriter(os.Stdout))
|
||||
}
|
||||
logger, err = tmflags.ParseLogLevel(config.LogLevel, logger, tmcfg.DefaultLogLevel)
|
||||
logger, err = cmtflags.ParseLogLevel(config.LogLevel, logger, cmtcfg.DefaultLogLevel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Check if the tendermint flag for trace logging is set if it is then setup
|
||||
// Check if the CometBFT flag for trace logging is set if it is then setup
|
||||
// a tracing logger in this app as well.
|
||||
if serverCtx.Viper.GetBool(tmcli.TraceFlag) {
|
||||
logger = tmlog.NewTracingLogger(logger)
|
||||
if serverCtx.Viper.GetBool(cmtcli.TraceFlag) {
|
||||
logger = cmtlog.NewTracingLogger(logger)
|
||||
}
|
||||
|
||||
serverCtx.Logger = logger.With("module", "server")
|
||||
@ -199,21 +199,21 @@ func SetCmdServerContext(cmd *cobra.Command, serverCtx *Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// interceptConfigs parses and updates a Tendermint configuration file or
|
||||
// interceptConfigs parses and updates a CometBFT configuration file or
|
||||
// creates a new one and saves it. It also parses and saves the application
|
||||
// configuration file. The Tendermint configuration file is parsed given a root
|
||||
// configuration file. The CometBFT configuration file is parsed given a root
|
||||
// Viper object, whereas the application is parsed with the private package-aware
|
||||
// viperCfg object.
|
||||
func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customConfig interface{}, tmConfig *tmcfg.Config) (*tmcfg.Config, error) {
|
||||
func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customConfig interface{}, cmtConfig *cmtcfg.Config) (*cmtcfg.Config, error) {
|
||||
rootDir := rootViper.GetString(flags.FlagHome)
|
||||
configPath := filepath.Join(rootDir, "config")
|
||||
tmCfgFile := filepath.Join(configPath, "config.toml")
|
||||
cmtCfgFile := filepath.Join(configPath, "config.toml")
|
||||
|
||||
conf := tmConfig
|
||||
conf := cmtConfig
|
||||
|
||||
switch _, err := os.Stat(tmCfgFile); {
|
||||
switch _, err := os.Stat(cmtCfgFile); {
|
||||
case os.IsNotExist(err):
|
||||
tmcfg.EnsureRoot(rootDir)
|
||||
cmtcfg.EnsureRoot(rootDir)
|
||||
|
||||
if err = conf.ValidateBasic(); err != nil {
|
||||
return nil, fmt.Errorf("error in config file: %w", err)
|
||||
@ -223,7 +223,7 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
|
||||
conf.P2P.RecvRate = 5120000
|
||||
conf.P2P.SendRate = 5120000
|
||||
conf.Consensus.TimeoutCommit = 5 * time.Second
|
||||
tmcfg.WriteConfigFile(tmCfgFile, conf)
|
||||
cmtcfg.WriteConfigFile(cmtCfgFile, conf)
|
||||
|
||||
case err != nil:
|
||||
return nil, err
|
||||
@ -234,7 +234,7 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
|
||||
rootViper.AddConfigPath(configPath)
|
||||
|
||||
if err := rootViper.ReadInConfig(); err != nil {
|
||||
return nil, fmt.Errorf("failed to read in %s: %w", tmCfgFile, err)
|
||||
return nil, fmt.Errorf("failed to read in %s: %w", cmtCfgFile, err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,18 +280,19 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
|
||||
|
||||
// add server commands
|
||||
func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter, addStartFlags types.ModuleInitFlags) {
|
||||
tendermintCmd := &cobra.Command{
|
||||
Use: "tendermint",
|
||||
Short: "Tendermint subcommands",
|
||||
cometCmd := &cobra.Command{
|
||||
Use: "comet",
|
||||
Aliases: []string{"cmt", "cometbft", "tendermint"},
|
||||
Short: "CometBFT subcommands",
|
||||
}
|
||||
|
||||
tendermintCmd.AddCommand(
|
||||
cometCmd.AddCommand(
|
||||
ShowNodeIDCmd(),
|
||||
ShowValidatorCmd(),
|
||||
ShowAddressCmd(),
|
||||
VersionCmd(),
|
||||
tmcmd.ResetAllCmd,
|
||||
tmcmd.ResetStateCmd,
|
||||
cmtcmd.ResetAllCmd,
|
||||
cmtcmd.ResetStateCmd,
|
||||
)
|
||||
|
||||
startCmd := StartCmd(appCreator, defaultNodeHome)
|
||||
@ -299,7 +300,7 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type
|
||||
|
||||
rootCmd.AddCommand(
|
||||
startCmd,
|
||||
tendermintCmd,
|
||||
cometCmd,
|
||||
ExportCmd(appExport, defaultNodeHome),
|
||||
version.NewVersionCommand(),
|
||||
NewRollbackCmd(appCreator, defaultNodeHome),
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -30,7 +30,7 @@ var errCanceledInPreRun = errors.New("canceled in prerun")
|
||||
// Used in each test to run the function under test via Cobra
|
||||
// but to always halt the command
|
||||
func preRunETestImpl(cmd *cobra.Command, args []string) error {
|
||||
err := server.InterceptConfigsPreRunHandler(cmd, "", nil, tmcfg.DefaultConfig())
|
||||
err := server.InterceptConfigsPreRunHandler(cmd, "", nil, cmtcfg.DefaultConfig())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -435,7 +435,7 @@ func TestEmptyMinGasPrices(t *testing.T) {
|
||||
// Run StartCmd.
|
||||
cmd = server.StartCmd(nil, tempDir)
|
||||
cmd.PreRunE = func(cmd *cobra.Command, _ []string) error {
|
||||
return server.InterceptConfigsPreRunHandler(cmd, "", nil, tmcfg.DefaultConfig())
|
||||
return server.InterceptConfigsPreRunHandler(cmd, "", nil, cmtcfg.DefaultConfig())
|
||||
}
|
||||
err = cmd.ExecuteContext(ctx)
|
||||
require.Errorf(t, err, sdkerrors.ErrAppConfig.Error())
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"cosmossdk.io/x/upgrade"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -174,7 +174,7 @@ func TestRunMigrations(t *testing.T) {
|
||||
// version for bank as 1, and for all other modules, we put as
|
||||
// their latest ConsensusVersion.
|
||||
_, err = app.ModuleManager.RunMigrations(
|
||||
app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}), configurator,
|
||||
app.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight()}), configurator,
|
||||
module.VersionMap{
|
||||
"bank": 1,
|
||||
"auth": auth.AppModule{}.ConsensusVersion(),
|
||||
@ -210,7 +210,7 @@ func TestInitGenesisOnMigration(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
app := NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(t.TempDir()))
|
||||
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
ctx := app.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight()})
|
||||
|
||||
// Create a mock module. This module will serve as the new module we're
|
||||
// adding during a migration.
|
||||
@ -259,7 +259,7 @@ func TestUpgradeStateOnGenesis(t *testing.T) {
|
||||
})
|
||||
|
||||
// make sure the upgrade keeper has version map in state
|
||||
ctx := app.NewContext(false, tmproto.Header{})
|
||||
ctx := app.NewContext(false, cmtproto.Header{})
|
||||
vm := app.UpgradeKeeper.GetModuleVersionMap(ctx)
|
||||
for v, i := range app.ModuleManager.Modules {
|
||||
if i, ok := i.(module.HasConsensusVersion); ok {
|
||||
|
||||
@ -5,9 +5,8 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -20,7 +19,7 @@ import (
|
||||
// file.
|
||||
func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error) {
|
||||
// as if they could withdraw from the start of the next block
|
||||
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
ctx := app.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight()})
|
||||
|
||||
// We export at last height + 1, because that's the height at which
|
||||
// Tendermint will start InitChain.
|
||||
|
||||
@ -8,9 +8,10 @@ require (
|
||||
cosmossdk.io/core v0.5.1
|
||||
cosmossdk.io/depinject v1.0.0-alpha.3
|
||||
cosmossdk.io/math v1.0.0-beta.6
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7
|
||||
cosmossdk.io/tools/confix v0.0.0-20230120150717-4f6f6c00021f
|
||||
cosmossdk.io/tools/rosetta v0.2.0
|
||||
// TODO to replace by a tagged version of rosetta
|
||||
cosmossdk.io/tools/rosetta v0.2.1-0.20230205135133-41a3dfeced29
|
||||
cosmossdk.io/x/evidence v0.1.0
|
||||
cosmossdk.io/x/feegrant v0.0.0-20230117113717-50e7c4a4ceff
|
||||
cosmossdk.io/x/nft v0.0.0-20230113085233-fae3332d62fc
|
||||
@ -25,7 +26,7 @@ require (
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.15.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af
|
||||
)
|
||||
|
||||
require (
|
||||
@ -186,11 +187,8 @@ require (
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
// This can be deleted after the CometBFT PR is merged
|
||||
replace (
|
||||
cosmossdk.io/tools/rosetta => ../tools/rosetta
|
||||
github.com/cometbft/cometbft => github.com/cometbft/cometbft v0.0.0-20230203130311-387422ac220d
|
||||
)
|
||||
// TODO update/remove after v0.37.x tag of CometBFT
|
||||
replace github.com/cometbft/cometbft => github.com/cometbft/cometbft v0.0.0-20230203130311-387422ac220d
|
||||
|
||||
// TODO tag all extracted modules after SDK refactor
|
||||
replace (
|
||||
|
||||
@ -62,8 +62,12 @@ cosmossdk.io/math v1.0.0-beta.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE=
|
||||
cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999 h1:NrV990BIbdDngOoTrD3Hg5kqqgvy6c+ETaKGY5bSUmo=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999/go.mod h1:Sf3G8SV8e8H31CD6w+o2syqCwyaoL0fe244JcPSsaD4=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7 h1:IwyDN/YaQmF+Pmuv8d7vRWMM/k2RjSmPBycMcmd3ICE=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7/go.mod h1:1XOtuYs7jsfQkn7G3VQXB6I+2tHXKHZw2U/AafNbnlk=
|
||||
cosmossdk.io/tools/confix v0.0.0-20230120150717-4f6f6c00021f h1:LMXqH69KBG/R8w18sooHtoUZ0+5hcc99m6OjBiooDAo=
|
||||
cosmossdk.io/tools/confix v0.0.0-20230120150717-4f6f6c00021f/go.mod h1:/apC5+JHM2A72kUY3z+55FWdIn/2ai2mTAYtSBDY4Lo=
|
||||
cosmossdk.io/tools/rosetta v0.2.1-0.20230205135133-41a3dfeced29 h1:AwJJkPk/jr6DpSzd016AEZX7dT0mUvafpamQ3s6VF1I=
|
||||
cosmossdk.io/tools/rosetta v0.2.1-0.20230205135133-41a3dfeced29/go.mod h1:jzFZh60Di2rszgQPZhxdbQB6KMEst1kacFDvQDf+O6A=
|
||||
cosmossdk.io/x/tx v0.1.0 h1:uyyYVjG22B+jf54N803Z99Y1uPvfuNP3K1YShoCHYL8=
|
||||
cosmossdk.io/x/tx v0.1.0/go.mod h1:qsDv7e1fSftkF16kpSAk+7ROOojyj+SC0Mz3ukI52EQ=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
@ -1351,6 +1355,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a h1:KJVqJe240LvVd+8lfzRx3hQ0UZ0fyeXEMDMHviRNQKs=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af h1:rAgzfIj9FJtmJ6ZPDlxXX6Fzzix6NOpPTvVmPY5rwQg=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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=
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -125,7 +125,7 @@ func BenchmarkInvariants(b *testing.B) {
|
||||
simtestutil.PrintStats(db)
|
||||
}
|
||||
|
||||
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight() + 1})
|
||||
ctx := app.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight() + 1})
|
||||
|
||||
// 3. Benchmark each invariant separately
|
||||
//
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
evidencetypes "cosmossdk.io/x/evidence/types"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -186,8 +186,8 @@ func TestAppImportExport(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
ctxA := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
ctxB := newApp.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
ctxA := app.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight()})
|
||||
ctxB := newApp.NewContext(true, cmtproto.Header{Height: app.LastBlockHeight()})
|
||||
newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState)
|
||||
newApp.StoreConsensusParams(ctxB, exported.ConsensusParams)
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/spf13/cobra"
|
||||
@ -97,9 +97,9 @@ func NewRootCmd() *cobra.Command {
|
||||
}
|
||||
|
||||
customAppTemplate, customAppConfig := initAppConfig()
|
||||
customTMConfig := initTendermintConfig()
|
||||
customCMTConfig := initTendermintConfig()
|
||||
|
||||
return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customTMConfig)
|
||||
return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customCMTConfig)
|
||||
},
|
||||
}
|
||||
|
||||
@ -113,9 +113,9 @@ func NewRootCmd() *cobra.Command {
|
||||
}
|
||||
|
||||
// initTendermintConfig helps to override default Tendermint Config values.
|
||||
// return tmcfg.DefaultConfig if no custom configuration is required for the application.
|
||||
func initTendermintConfig() *tmcfg.Config {
|
||||
cfg := tmcfg.DefaultConfig()
|
||||
// return cmtcfg.DefaultConfig if no custom configuration is required for the application.
|
||||
func initTendermintConfig() *cmtcfg.Config {
|
||||
cfg := cmtcfg.DefaultConfig()
|
||||
|
||||
// these values put a higher strain on node memory
|
||||
// cfg.P2P.MaxNumInboundPeers = 100
|
||||
|
||||
@ -9,10 +9,10 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
tmconfig "github.com/cometbft/cometbft/config"
|
||||
tmrand "github.com/cometbft/cometbft/libs/rand"
|
||||
cmtconfig "github.com/cometbft/cometbft/config"
|
||||
cmtrand "github.com/cometbft/cometbft/libs/rand"
|
||||
"github.com/cometbft/cometbft/types"
|
||||
tmtime "github.com/cometbft/cometbft/types/time"
|
||||
cmttime "github.com/cometbft/cometbft/types/time"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
@ -110,7 +110,7 @@ func NewTestnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBala
|
||||
return testnetCmd
|
||||
}
|
||||
|
||||
// testnetInitFilesCmd returns a cmd to initialize all files for tendermint testnet and application
|
||||
// testnetInitFilesCmd returns a cmd to initialize all files for CometBFT testnet and application
|
||||
func testnetInitFilesCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "init-files",
|
||||
@ -189,7 +189,7 @@ Example:
|
||||
}
|
||||
|
||||
addTestnetFlagsToCmd(cmd)
|
||||
cmd.Flags().Bool(flagEnableLogging, false, "Enable INFO logging of tendermint validator nodes")
|
||||
cmd.Flags().Bool(flagEnableLogging, false, "Enable INFO logging of CometBFT validator nodes")
|
||||
cmd.Flags().String(flagRPCAddress, "tcp://0.0.0.0:26657", "the RPC address to listen on")
|
||||
cmd.Flags().String(flagAPIAddress, "tcp://0.0.0.0:1317", "the address to listen on for REST API")
|
||||
cmd.Flags().String(flagGRPCAddress, "0.0.0.0:9090", "the gRPC server address to listen on")
|
||||
@ -203,13 +203,13 @@ const nodeDirPerm = 0o755
|
||||
func initTestnetFiles(
|
||||
clientCtx client.Context,
|
||||
cmd *cobra.Command,
|
||||
nodeConfig *tmconfig.Config,
|
||||
nodeConfig *cmtconfig.Config,
|
||||
mbm module.BasicManager,
|
||||
genBalIterator banktypes.GenesisBalancesIterator,
|
||||
args initArgs,
|
||||
) error {
|
||||
if args.chainID == "" {
|
||||
args.chainID = "chain-" + tmrand.Str(6)
|
||||
args.chainID = "chain-" + cmtrand.Str(6)
|
||||
}
|
||||
nodeIDs := make([]string, args.numValidators)
|
||||
valPubKeys := make([]cryptotypes.PubKey, args.numValidators)
|
||||
@ -408,12 +408,12 @@ func initGenFiles(
|
||||
}
|
||||
|
||||
func collectGenFiles(
|
||||
clientCtx client.Context, nodeConfig *tmconfig.Config, chainID string,
|
||||
clientCtx client.Context, nodeConfig *cmtconfig.Config, chainID string,
|
||||
nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int,
|
||||
outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator,
|
||||
) error {
|
||||
var appState json.RawMessage
|
||||
genTime := tmtime.Now()
|
||||
genTime := cmttime.Now()
|
||||
|
||||
for i := 0; i < numValidators; i++ {
|
||||
nodeDirName := fmt.Sprintf("%s%d", nodeDirPrefix, i)
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
simappparams "cosmossdk.io/simapp/params"
|
||||
@ -199,15 +199,15 @@ func AppStateRandomizedFn(
|
||||
|
||||
// AppStateFromGenesisFileFn util function to generate the genesis AppState
|
||||
// from a genesis.json file.
|
||||
func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account) {
|
||||
func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (cmttypes.GenesisDoc, []simtypes.Account) {
|
||||
bytes, err := os.ReadFile(genesisFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var genesis tmtypes.GenesisDoc
|
||||
// NOTE: Tendermint uses a custom JSON decoder for GenesisDoc
|
||||
err = tmjson.Unmarshal(bytes, &genesis)
|
||||
var genesis cmttypes.GenesisDoc
|
||||
// NOTE: CometNFT uses a custom JSON decoder for GenesisDoc
|
||||
err = cmtjson.Unmarshal(bytes, &genesis)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -226,8 +226,8 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str
|
||||
newAccs := make([]simtypes.Account, len(authGenesis.Accounts))
|
||||
for i, acc := range authGenesis.Accounts {
|
||||
// Pick a random private key, since we don't know the actual key
|
||||
// This should be fine as it's only used for mock Tendermint validators
|
||||
// and these keys are never actually used to sign by mock Tendermint.
|
||||
// This should be fine as it's only used for mock CometBFT validators
|
||||
// and these keys are never actually used to sign by mock CometBFT.
|
||||
privkeySeed := make([]byte, 15)
|
||||
if _, err := r.Read(privkeySeed); err != nil {
|
||||
panic(err)
|
||||
|
||||
@ -8,10 +8,10 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -61,8 +61,8 @@ func NewSimappWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptio
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator})
|
||||
validator := cmttypes.NewValidator(pubKey, 1)
|
||||
valSet := cmttypes.NewValidatorSet([]*cmttypes.Validator{validator})
|
||||
|
||||
// generate genesis account
|
||||
senderPrivKey := secp256k1.GenPrivKey()
|
||||
@ -79,7 +79,7 @@ func NewSimappWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptio
|
||||
|
||||
if !isCheckTx {
|
||||
// init chain must be called to stop deliverState from being nil
|
||||
stateBytes, err := tmjson.MarshalIndent(genesisState, "", " ")
|
||||
stateBytes, err := cmtjson.MarshalIndent(genesisState, "", " ")
|
||||
require.NoError(t, err)
|
||||
|
||||
// Initialize the chain
|
||||
@ -104,8 +104,8 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp {
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator})
|
||||
validator := cmttypes.NewValidator(pubKey, 1)
|
||||
valSet := cmttypes.NewValidatorSet([]*cmttypes.Validator{validator})
|
||||
|
||||
// generate genesis account
|
||||
senderPrivKey := secp256k1.GenPrivKey()
|
||||
@ -124,7 +124,7 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp {
|
||||
// that also act as delegators. For simplicity, each validator is bonded with a delegation
|
||||
// of one consensus engine unit in the default token of the simapp from first genesis
|
||||
// account. A Nop logger is set in SimApp.
|
||||
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp {
|
||||
func SetupWithGenesisValSet(t *testing.T, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp {
|
||||
t.Helper()
|
||||
|
||||
app, genesisState := setup(true, 5)
|
||||
@ -145,7 +145,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs
|
||||
|
||||
// commit genesis changes
|
||||
app.Commit()
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{
|
||||
Height: app.LastBlockHeight() + 1,
|
||||
AppHash: app.LastCommitID().Hash,
|
||||
ValidatorsHash: valSet.Hash(),
|
||||
@ -165,8 +165,8 @@ func GenesisStateWithSingleValidator(t *testing.T, app *SimApp) GenesisState {
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator})
|
||||
validator := cmttypes.NewValidator(pubKey, 1)
|
||||
valSet := cmttypes.NewValidatorSet([]*cmttypes.Validator{validator})
|
||||
|
||||
// generate genesis account
|
||||
senderPrivKey := secp256k1.GenPrivKey()
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
tmrand "github.com/cometbft/cometbft/libs/rand"
|
||||
cmtrand "github.com/cometbft/cometbft/libs/rand"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -461,7 +461,7 @@ const (
|
||||
)
|
||||
|
||||
func randInt(n int) int {
|
||||
return tmrand.NewRand().Int() % n
|
||||
return cmtrand.NewRand().Int() % n
|
||||
}
|
||||
|
||||
// useful for replaying a error case if we find one
|
||||
|
||||
22
store/go.mod
22
store/go.mod
@ -8,7 +8,7 @@ require (
|
||||
github.com/armon/go-metrics v0.4.1
|
||||
github.com/cometbft/cometbft v0.0.0-20230202201700-d159562d0d96
|
||||
github.com/confio/ics23/go v0.9.0
|
||||
github.com/cosmos/cosmos-db v0.0.0-20230119180254-161cf3632b7c
|
||||
github.com/cosmos/cosmos-db v1.0.0-rc.1
|
||||
github.com/cosmos/gogoproto v1.4.4
|
||||
github.com/cosmos/iavl v0.20.0-alpha3
|
||||
github.com/golang/mock v1.6.0
|
||||
@ -20,18 +20,18 @@ require (
|
||||
golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9
|
||||
google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa // indirect
|
||||
google.golang.org/grpc v1.52.3 // indirect
|
||||
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a // indirect
|
||||
gotest.tools/v3 v3.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/DataDog/zstd v1.4.5 // indirect
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
|
||||
github.com/DataDog/zstd v1.5.2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cockroachdb/errors v1.9.1 // indirect
|
||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
||||
github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect
|
||||
github.com/cockroachdb/pebble v0.0.0-20230203182935-f2e58dc4a0e1 // indirect
|
||||
github.com/cockroachdb/redact v1.1.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
|
||||
@ -44,18 +44,22 @@ require (
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/klauspost/compress v1.15.14 // indirect
|
||||
github.com/klauspost/compress v1.15.15 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/linxGnu/grocksdb v1.7.10 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/linxGnu/grocksdb v1.7.14 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/onsi/gomega v1.20.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.39.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
|
||||
golang.org/x/crypto v0.5.0 // indirect
|
||||
golang.org/x/net v0.5.0 // indirect
|
||||
golang.org/x/sys v0.4.0 // indirect
|
||||
|
||||
153
store/go.sum
153
store/go.sum
@ -3,24 +3,16 @@ cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w
|
||||
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
|
||||
cosmossdk.io/math v1.0.0-beta.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE=
|
||||
cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw=
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
|
||||
github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
|
||||
github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo=
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
|
||||
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
|
||||
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
||||
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
|
||||
github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM=
|
||||
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
|
||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
@ -31,6 +23,7 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+
|
||||
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
|
||||
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=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U=
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
|
||||
@ -40,27 +33,24 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
|
||||
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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4=
|
||||
github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=
|
||||
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
|
||||
github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM=
|
||||
github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac=
|
||||
github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8=
|
||||
github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk=
|
||||
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
|
||||
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
|
||||
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 v0.0.0-20220817183557-09c6e030a677 h1:qbb/AE938DFhOajUYh9+OXELpSF9KZw2ZivtmW6eX1Q=
|
||||
github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677/go.mod h1:890yq1fUb9b6dGNwssgeUO5vQV9qfXnCPxAJhBQfXw0=
|
||||
github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
|
||||
github.com/cockroachdb/pebble v0.0.0-20230203182935-f2e58dc4a0e1 h1:g6MDPQ7X2UK1K4cHB5uBguGwudRBoFJ2aeK5DBP0Y8k=
|
||||
github.com/cockroachdb/pebble v0.0.0-20230203182935-f2e58dc4a0e1/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM=
|
||||
github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ=
|
||||
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
|
||||
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/cometbft/cometbft v0.0.0-20230203130311-387422ac220d h1:akhMrKe9V6+f+K8Brq3Cx+I2kRIizVsnU6+frARVTzo=
|
||||
github.com/cometbft/cometbft v0.0.0-20230203130311-387422ac220d/go.mod h1:EZUXFIzOBV/rscOektBL3X4FI5zHpu7tQMNNMwzv4ac=
|
||||
@ -69,8 +59,8 @@ github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/cosmos/cosmos-db v0.0.0-20230119180254-161cf3632b7c h1:18vrPZBG4Zuh8A/sD5hFu252QLLgwdQ6mTsc8pT56QU=
|
||||
github.com/cosmos/cosmos-db v0.0.0-20230119180254-161cf3632b7c/go.mod h1:NoM5UQkpKJY86c0Acb8Hy7HyNrltal8+BxQyerU8fzM=
|
||||
github.com/cosmos/cosmos-db v1.0.0-rc.1 h1:SjnT8B6WKMW9WEIX32qMhnEEKcI7ZP0+G1Sa9HD3nmY=
|
||||
github.com/cosmos/cosmos-db v1.0.0-rc.1/go.mod h1:Dnmk3flSf5lkwCqvvjNpoxjpXzhxnCAFzKHlbaForso=
|
||||
github.com/cosmos/gogoproto v1.4.4 h1:nVAsgLlAf5jeN0fV7hRlkZvf768zU+dy4pG+hxc2P34=
|
||||
github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU=
|
||||
github.com/cosmos/iavl v0.20.0-alpha3 h1:hbUyr0dkiGDlmmbrArvte0lXv6VkMrGQNr3b29xvmVk=
|
||||
@ -84,37 +74,31 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4=
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc=
|
||||
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
|
||||
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
|
||||
github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c=
|
||||
github.com/getsentry/sentry-go v0.17.0 h1:UustVWnOoDFHBS7IJUB2QK/nB5pap748ZEp0swnQJak=
|
||||
github.com/getsentry/sentry-go v0.17.0/go.mod h1:B82dxtBvxG0KaPD8/hfSV+VcHD+Lg/xUS4JuQn1P4cM=
|
||||
github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
|
||||
@ -129,6 +113,7 @@ github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
@ -137,12 +122,10 @@ github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q8
|
||||
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
@ -150,7 +133,7 @@ github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+Licev
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
@ -161,7 +144,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
@ -172,15 +154,14 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
@ -190,19 +171,17 @@ github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es
|
||||
github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE=
|
||||
github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
|
||||
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
|
||||
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
|
||||
github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk=
|
||||
github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g=
|
||||
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
|
||||
@ -210,30 +189,19 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q=
|
||||
github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
|
||||
github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
||||
github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk=
|
||||
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
|
||||
github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U=
|
||||
github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE=
|
||||
github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw=
|
||||
github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE=
|
||||
github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0=
|
||||
github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro=
|
||||
github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.15.14 h1:i7WCKDToww0wA+9qrUZ1xOjp218vfFo3nTU6UHp+gOc=
|
||||
github.com/klauspost/compress v1.15.14/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
|
||||
github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
|
||||
github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4=
|
||||
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
@ -246,12 +214,11 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
|
||||
github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y=
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/linxGnu/grocksdb v1.7.10 h1:dz7RY7GnFUA+GJO6jodyxgkUeGMEkPp3ikt9hAcNGEw=
|
||||
github.com/linxGnu/grocksdb v1.7.10/go.mod h1:0hTf+iA+GOr0jDX4CgIYyJZxqOH9XlBh6KVj8+zmF34=
|
||||
github.com/linxGnu/grocksdb v1.7.14 h1:8lMZzyWeNP5lI0BIppX05DzmQzXj/Tgu82bgWYtowLY=
|
||||
github.com/linxGnu/grocksdb v1.7.14/go.mod h1:pY55D0o+r8yUYLq70QmhdudxYvoDb9F+9puf4m3/W+U=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
@ -262,8 +229,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
|
||||
github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
@ -276,23 +243,23 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
|
||||
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
||||
github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM=
|
||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||
github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4=
|
||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/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/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.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.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
||||
github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q=
|
||||
github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
||||
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
|
||||
@ -313,15 +280,23 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw=
|
||||
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/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.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
|
||||
github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI=
|
||||
github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/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.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
|
||||
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
||||
@ -332,9 +307,7 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo
|
||||
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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
|
||||
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
@ -359,11 +332,12 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 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/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
|
||||
github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg=
|
||||
github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
@ -392,7 +366,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
@ -402,26 +375,14 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
|
||||
golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9 h1:frX3nT9RkKybPnjyI+yvZh6ZucTZatCCEm9D47sZ2zo=
|
||||
golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
@ -440,11 +401,13 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@ -456,7 +419,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
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=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@ -464,23 +427,21 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/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-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -489,14 +450,17 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
@ -506,22 +470,18 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
@ -530,11 +490,7 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
|
||||
gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
@ -549,7 +505,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ=
|
||||
google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
|
||||
@ -565,13 +520,12 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
|
||||
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a h1:KJVqJe240LvVd+8lfzRx3hQ0UZ0fyeXEMDMHviRNQKs=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
@ -596,5 +550,4 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
|
||||
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
ics23 "github.com/confio/ics23/go"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/iavl"
|
||||
@ -396,7 +396,7 @@ func (st *Store) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
|
||||
// Takes a MutableTree, a key, and a flag for creating existence or absence proof and returns the
|
||||
// appropriate merkle.Proof. Since this must be called after querying for the value, this function should never error
|
||||
// Thus, it will panic on error rather than returning it
|
||||
func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *tmcrypto.ProofOps {
|
||||
func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *cmtprotocrypto.ProofOps {
|
||||
var (
|
||||
commitmentProof *ics23.CommitmentProof
|
||||
err error
|
||||
@ -419,5 +419,5 @@ func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *tmcrypto
|
||||
}
|
||||
|
||||
op := types.NewIavlCommitmentOp(key, commitmentProof)
|
||||
return &tmcrypto.ProofOps{Ops: []tmcrypto.ProofOp{op.ProofOp()}}
|
||||
return &cmtprotocrypto.ProofOps{Ops: []cmtprotocrypto.ProofOp{op.ProofOp()}}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/cometbft/cometbft/crypto/merkle"
|
||||
"github.com/cometbft/cometbft/crypto/tmhash"
|
||||
tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
)
|
||||
@ -183,7 +183,7 @@ func HashFromMap(m map[string][]byte) []byte {
|
||||
// ProofsFromMap generates proofs from a map. The keys/values of the map will be used as the keys/values
|
||||
// in the underlying key-value pairs.
|
||||
// The keys are sorted before the proofs are computed.
|
||||
func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*tmcrypto.Proof, []string) {
|
||||
func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*cmtprotocrypto.Proof, []string) {
|
||||
sm := newSimpleMap()
|
||||
for k, v := range m {
|
||||
sm.Set(k, v)
|
||||
@ -197,7 +197,7 @@ func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*tmcrypto.Proof, []s
|
||||
}
|
||||
|
||||
rootHash, proofList := merkle.ProofsFromByteSlices(kvsBytes)
|
||||
proofs := make(map[string]*tmcrypto.Proof)
|
||||
proofs := make(map[string]*cmtprotocrypto.Proof)
|
||||
keys := make([]string, len(proofList))
|
||||
|
||||
for i, kvp := range kvs.Pairs {
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"math/bits"
|
||||
|
||||
"github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
ics23 "github.com/confio/ics23/go"
|
||||
)
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
//
|
||||
// This is the simplest case of the range proof and we will focus on
|
||||
// demoing compatibility here
|
||||
func ConvertExistenceProof(p *crypto.Proof, key, value []byte) (*ics23.ExistenceProof, error) {
|
||||
func ConvertExistenceProof(p *cmtprotocrypto.Proof, key, value []byte) (*ics23.ExistenceProof, error) {
|
||||
path, err := convertInnerOps(p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -42,7 +42,7 @@ func convertLeafOp() *ics23.LeafOp {
|
||||
}
|
||||
}
|
||||
|
||||
func convertInnerOps(p *crypto.Proof) ([]*ics23.InnerOp, error) {
|
||||
func convertInnerOps(p *cmtprotocrypto.Proof) ([]*ics23.InnerOp, error) {
|
||||
inners := make([]*ics23.InnerOp, 0, len(p.Aunts))
|
||||
path := buildPath(p.Index, p.Total)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/cometbft/cometbft/libs/rand"
|
||||
tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
sdkmaps "cosmossdk.io/store/internal/maps"
|
||||
@ -14,7 +14,7 @@ import (
|
||||
type SimpleResult struct {
|
||||
Key []byte
|
||||
Value []byte
|
||||
Proof *tmcrypto.Proof
|
||||
Proof *cmtprotocrypto.Proof
|
||||
RootHash []byte
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
//
|
||||
// 1. In the future, ABCI should support streaming. Consider e.g. InitChain during chain
|
||||
// upgrades, which currently passes the entire chain state as an in-memory byte slice.
|
||||
// https://github.com/cometbft/cometbft/issues/5184
|
||||
// https://github.com/tendermint/tendermint/issues/5184
|
||||
//
|
||||
// 2. io.ReadCloser streams automatically propagate IO errors, and can pass arbitrary
|
||||
// errors via io.Pipe.CloseWithError().
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
@ -27,7 +27,7 @@ var (
|
||||
// test abci message types
|
||||
mockHash = []byte{1, 2, 3, 4, 5, 6, 7, 8, 9}
|
||||
testBeginBlockReq = abci.RequestBeginBlock{
|
||||
Header: tmproto.Header{
|
||||
Header: cmtproto.Header{
|
||||
Height: 1,
|
||||
},
|
||||
ByzantineValidators: []abci.Misbehavior{},
|
||||
@ -52,7 +52,7 @@ var (
|
||||
}
|
||||
testEndBlockRes = abci.ResponseEndBlock{
|
||||
Events: []abci.Event{},
|
||||
ConsensusParamUpdates: &tmproto.ConsensusParams{},
|
||||
ConsensusParamUpdates: &cmtproto.ConsensusParams{},
|
||||
ValidatorUpdates: []abci.ValidatorUpdate{},
|
||||
}
|
||||
testCommitRes = abci.ResponseCommit{
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
|
||||
sdkmaps "cosmossdk.io/store/internal/maps"
|
||||
"cosmossdk.io/store/internal/maps"
|
||||
)
|
||||
|
||||
// GetHash returns the GetHash from the CommitID.
|
||||
@ -33,11 +33,11 @@ func (ci CommitInfo) Hash() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
rootHash, _, _ := sdkmaps.ProofsFromMap(ci.toMap())
|
||||
rootHash, _, _ := maps.ProofsFromMap(ci.toMap())
|
||||
return rootHash
|
||||
}
|
||||
|
||||
func (ci CommitInfo) ProofOp(storeName string) tmcrypto.ProofOp {
|
||||
func (ci CommitInfo) ProofOp(storeName string) cmtprotocrypto.ProofOp {
|
||||
ret, err := ProofOpFromMap(ci.toMap(), storeName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cometbft/cometbft/crypto/merkle"
|
||||
tmmerkle "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
ics23 "github.com/confio/ics23/go"
|
||||
|
||||
sdkerrors "cosmossdk.io/errors"
|
||||
@ -63,7 +63,7 @@ func NewSmtCommitmentOp(key []byte, proof *ics23.CommitmentProof) CommitmentOp {
|
||||
// CommitmentOpDecoder takes a merkle.ProofOp and attempts to decode it into a CommitmentOp ProofOperator
|
||||
// The proofOp.Data is just a marshalled CommitmentProof. The Key of the CommitmentOp is extracted
|
||||
// from the unmarshalled proof.
|
||||
func CommitmentOpDecoder(pop tmmerkle.ProofOp) (merkle.ProofOperator, error) {
|
||||
func CommitmentOpDecoder(pop cmtprotocrypto.ProofOp) (merkle.ProofOperator, error) {
|
||||
var spec *ics23.ProofSpec
|
||||
switch pop.Type {
|
||||
case ProofOpIAVLCommitment:
|
||||
@ -134,12 +134,12 @@ func (op CommitmentOp) Run(args [][]byte) ([][]byte, error) {
|
||||
// ProofOp implements ProofOperator interface and converts a CommitmentOp
|
||||
// into a merkle.ProofOp format that can later be decoded by CommitmentOpDecoder
|
||||
// back into a CommitmentOp for proof verification
|
||||
func (op CommitmentOp) ProofOp() tmmerkle.ProofOp {
|
||||
func (op CommitmentOp) ProofOp() cmtprotocrypto.ProofOp {
|
||||
bz, err := op.Proof.Marshal()
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
return tmmerkle.ProofOp{
|
||||
return cmtprotocrypto.ProofOp{
|
||||
Type: op.Type,
|
||||
Key: op.Key,
|
||||
Data: bz,
|
||||
@ -147,7 +147,7 @@ func (op CommitmentOp) ProofOp() tmmerkle.ProofOp {
|
||||
}
|
||||
|
||||
// ProofOpFromMap generates a single proof from a map and converts it to a ProofOp.
|
||||
func ProofOpFromMap(cmap map[string][]byte, storeName string) (ret tmmerkle.ProofOp, err error) {
|
||||
func ProofOpFromMap(cmap map[string][]byte, storeName string) (ret cmtprotocrypto.ProofOp, err error) {
|
||||
_, proofs, _ := sdkmaps.ProofsFromMap(cmap)
|
||||
|
||||
proof := proofs[storeName]
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
tmcli "github.com/cometbft/cometbft/libs/cli"
|
||||
cmtcli "github.com/cometbft/cometbft/libs/cli"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -223,7 +223,7 @@ func (s *E2ETestSuite) TestCLISignGenOnly() {
|
||||
|
||||
for _, tc := range cases {
|
||||
cmd := authcli.GetSignCommand()
|
||||
tmcli.PrepareBaseCmd(cmd, "", "")
|
||||
cmtcli.PrepareBaseCmd(cmd, "", "")
|
||||
out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...))
|
||||
if tc.expErr {
|
||||
s.Require().Error(err)
|
||||
|
||||
@ -16,10 +16,10 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
"github.com/cometbft/cometbft/libs/log"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
tmtypes "github.com/cometbft/cometbft/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
@ -42,8 +42,8 @@ func TestExportCmd_ConsensusParams(t *testing.T) {
|
||||
cmd.SetArgs([]string{fmt.Sprintf("--%s=%s", flags.FlagHome, tempDir)})
|
||||
require.NoError(t, cmd.ExecuteContext(ctx))
|
||||
|
||||
var exportedGenDoc tmtypes.GenesisDoc
|
||||
err := tmjson.Unmarshal(output.Bytes(), &exportedGenDoc)
|
||||
var exportedGenDoc cmttypes.GenesisDoc
|
||||
err := cmtjson.Unmarshal(output.Bytes(), &exportedGenDoc)
|
||||
if err != nil {
|
||||
t.Fatalf("error unmarshaling exported genesis doc: %s", err)
|
||||
}
|
||||
@ -101,7 +101,7 @@ func TestExportCmd_Height(t *testing.T) {
|
||||
|
||||
// Fast forward to block `tc.fastForward`.
|
||||
for i := int64(2); i <= tc.fastForward; i++ {
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}})
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: i}})
|
||||
app.Commit()
|
||||
}
|
||||
|
||||
@ -111,8 +111,8 @@ func TestExportCmd_Height(t *testing.T) {
|
||||
cmd.SetArgs(args)
|
||||
require.NoError(t, cmd.ExecuteContext(ctx))
|
||||
|
||||
var exportedGenDoc tmtypes.GenesisDoc
|
||||
err := tmjson.Unmarshal(output.Bytes(), &exportedGenDoc)
|
||||
var exportedGenDoc cmttypes.GenesisDoc
|
||||
err := cmtjson.Unmarshal(output.Bytes(), &exportedGenDoc)
|
||||
if err != nil {
|
||||
t.Fatalf("error unmarshaling exported genesis doc: %s", err)
|
||||
}
|
||||
@ -148,12 +148,12 @@ func TestExportCmd_Output(t *testing.T) {
|
||||
cmd.SetArgs(args)
|
||||
require.NoError(t, cmd.ExecuteContext(ctx))
|
||||
|
||||
var exportedGenDoc tmtypes.GenesisDoc
|
||||
var exportedGenDoc cmttypes.GenesisDoc
|
||||
f, err := os.ReadFile(tc.outputDocument)
|
||||
if err != nil {
|
||||
t.Fatalf("error reading exported genesis doc: %s", err)
|
||||
}
|
||||
require.NoError(t, tmjson.Unmarshal(f, &exportedGenDoc))
|
||||
require.NoError(t, cmtjson.Unmarshal(f, &exportedGenDoc))
|
||||
|
||||
// Cleanup
|
||||
if err = os.Remove(tc.outputDocument); err != nil {
|
||||
@ -163,7 +163,7 @@ func TestExportCmd_Output(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *tmtypes.GenesisDoc, *cobra.Command) {
|
||||
func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *cmttypes.GenesisDoc, *cobra.Command) {
|
||||
t.Helper()
|
||||
|
||||
if err := createConfigFolder(tempDir); err != nil {
|
||||
@ -175,14 +175,14 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t
|
||||
app := simapp.NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(tempDir))
|
||||
|
||||
genesisState := simapp.GenesisStateWithSingleValidator(t, app)
|
||||
stateBytes, err := tmjson.MarshalIndent(genesisState, "", " ")
|
||||
stateBytes, err := cmtjson.MarshalIndent(genesisState, "", " ")
|
||||
require.NoError(t, err)
|
||||
|
||||
serverCtx := server.NewDefaultContext()
|
||||
serverCtx.Config.RootDir = tempDir
|
||||
|
||||
clientCtx := client.Context{}.WithCodec(app.AppCodec())
|
||||
genDoc := &tmtypes.GenesisDoc{}
|
||||
genDoc := &cmttypes.GenesisDoc{}
|
||||
genDoc.ChainID = "theChainId"
|
||||
genDoc.Validators = nil
|
||||
genDoc.AppState = stateBytes
|
||||
@ -224,7 +224,7 @@ func createConfigFolder(dir string) error {
|
||||
return os.Mkdir(path.Join(dir, "config"), 0o700)
|
||||
}
|
||||
|
||||
func saveGenesisFile(genDoc *tmtypes.GenesisDoc, dir string) error {
|
||||
func saveGenesisFile(genDoc *cmttypes.GenesisDoc, dir string) error {
|
||||
err := genutil.ExportGenesisFile(genDoc, dir)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error creating file")
|
||||
|
||||
@ -6,7 +6,7 @@ package upgrade
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
@ -18,7 +18,7 @@ func TestE2ETestSuite(t *testing.T) {
|
||||
cfg.NumValidators = 1
|
||||
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
app.UpgradeKeeper.SetVersionSetter(app.BaseApp)
|
||||
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap())
|
||||
|
||||
@ -7,7 +7,7 @@ require (
|
||||
cosmossdk.io/depinject v1.0.0-alpha.3
|
||||
cosmossdk.io/math v1.0.0-beta.6
|
||||
cosmossdk.io/simapp v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7
|
||||
cosmossdk.io/x/evidence v0.1.0
|
||||
cosmossdk.io/x/feegrant v0.0.0-20230117113717-50e7c4a4ceff
|
||||
cosmossdk.io/x/nft v0.0.0-20230113085233-fae3332d62fc
|
||||
@ -21,7 +21,7 @@ require (
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/stretchr/testify v1.8.1
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af
|
||||
gotest.tools/v3 v3.4.0
|
||||
pgregory.net/rapid v0.5.5
|
||||
)
|
||||
|
||||
@ -62,6 +62,8 @@ cosmossdk.io/math v1.0.0-beta.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE=
|
||||
cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999 h1:NrV990BIbdDngOoTrD3Hg5kqqgvy6c+ETaKGY5bSUmo=
|
||||
cosmossdk.io/store v0.0.0-20230204135315-697871069999/go.mod h1:Sf3G8SV8e8H31CD6w+o2syqCwyaoL0fe244JcPSsaD4=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7 h1:IwyDN/YaQmF+Pmuv8d7vRWMM/k2RjSmPBycMcmd3ICE=
|
||||
cosmossdk.io/store v0.0.0-20230206092147-e03195e4b8a7/go.mod h1:1XOtuYs7jsfQkn7G3VQXB6I+2tHXKHZw2U/AafNbnlk=
|
||||
cosmossdk.io/x/tx v0.1.0 h1:uyyYVjG22B+jf54N803Z99Y1uPvfuNP3K1YShoCHYL8=
|
||||
cosmossdk.io/x/tx v0.1.0/go.mod h1:qsDv7e1fSftkF16kpSAk+7ROOojyj+SC0Mz3ukI52EQ=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
@ -1332,6 +1334,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a h1:KJVqJe240LvVd+8lfzRx3hQ0UZ0fyeXEMDMHviRNQKs=
|
||||
google.golang.org/protobuf v1.28.2-0.20230130093322-0430d694e04a/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af h1:rAgzfIj9FJtmJ6ZPDlxXX6Fzzix6NOpPTvVmPY5rwQg=
|
||||
google.golang.org/protobuf v1.28.2-0.20230206090356-358fe40267af/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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=
|
||||
|
||||
@ -3,7 +3,7 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
"pgregory.net/rapid"
|
||||
|
||||
@ -75,7 +75,7 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
f.ctx = ctx
|
||||
|
||||
queryHelper := baseapp.NewQueryServerTestHelper(ctx, interfaceRegistry)
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1"
|
||||
"cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
tmtime "github.com/cometbft/cometbft/types/time"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttime "github.com/cometbft/cometbft/types/time"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
@ -130,7 +130,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
f.ctx = ctx
|
||||
f.fetchStoreKey = app.UnsafeFindStoreKey
|
||||
|
||||
@ -542,8 +542,8 @@ func TestValidateBalance(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
addr1 := sdk.AccAddress([]byte("addr1_______________"))
|
||||
@ -575,7 +575,7 @@ func TestSendCoins_Invalid_SendLockedCoins(t *testing.T) {
|
||||
addr := sdk.AccAddress([]byte("addr1_______________"))
|
||||
addr2 := sdk.AccAddress([]byte("addr2_______________"))
|
||||
|
||||
now := tmtime.Now()
|
||||
now := cmttime.Now()
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
@ -801,8 +801,8 @@ func TestSpendableCoins(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
@ -837,8 +837,8 @@ func TestVestingAccountSend(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
@ -869,8 +869,8 @@ func TestPeriodicVestingAccountSend(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50))
|
||||
|
||||
@ -905,8 +905,8 @@ func TestVestingAccountReceive(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
@ -942,8 +942,8 @@ func TestPeriodicVestingAccountReceive(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50))
|
||||
@ -984,8 +984,8 @@ func TestDelegateCoins(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
@ -1053,8 +1053,8 @@ func TestUndelegateCoins(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := f.ctx
|
||||
now := tmtime.Now()
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: now})
|
||||
now := cmttime.Now()
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: now})
|
||||
endTime := now.Add(24 * time.Hour)
|
||||
|
||||
origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100))
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@ -36,7 +36,7 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
addrs := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 3, sdk.NewInt(1234))
|
||||
valAddrs := simtestutil.ConvertAddrsToValAddrs(addrs)
|
||||
@ -79,7 +79,7 @@ func TestAllocateTokensToManyValidators(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// reset fee pool
|
||||
distrKeeper.SetFeePool(ctx, disttypes.InitialFeePool())
|
||||
@ -172,7 +172,7 @@ func TestAllocateTokensTruncation(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// reset fee pool
|
||||
distrKeeper.SetFeePool(ctx, disttypes.InitialFeePool())
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@ -34,7 +34,7 @@ func TestCalculateRewardsBasic(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
distrKeeper.DeleteAllValidatorHistoricalRewards(ctx)
|
||||
|
||||
@ -103,7 +103,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(100000000))
|
||||
valAddrs := simtestutil.ConvertAddrsToValAddrs(addr)
|
||||
@ -178,7 +178,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
tstaking := stakingtestutil.NewHelper(t, ctx, stakingKeeper)
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(100000000))
|
||||
@ -265,7 +265,7 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
tstaking := stakingtestutil.NewHelper(t, ctx, stakingKeeper)
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(100000000))
|
||||
@ -342,7 +342,7 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
distrKeeper.DeleteAllValidatorHistoricalRewards(ctx)
|
||||
|
||||
@ -427,7 +427,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 1, sdk.NewInt(1000000000))
|
||||
valAddrs := simtestutil.ConvertAddrsToValAddrs(addr)
|
||||
@ -507,7 +507,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
tstaking := stakingtestutil.NewHelper(t, ctx, stakingKeeper)
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(1000000000))
|
||||
@ -595,7 +595,7 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
distrKeeper.DeleteAllValidatorHistoricalRewards(ctx)
|
||||
|
||||
@ -756,7 +756,7 @@ func Test100PercentCommissionReward(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
tstaking := stakingtestutil.NewHelper(t, ctx, stakingKeeper)
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(1000000000))
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -50,7 +50,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
queryHelper := baseapp.NewQueryServerTestHelper(ctx, f.interfaceRegistry)
|
||||
types.RegisterQueryServer(queryHelper, keeper.NewQuerier(f.distrKeeper))
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@ -33,7 +33,7 @@ func TestSetWithdrawAddr(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
addr := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(1000000000))
|
||||
|
||||
@ -69,7 +69,7 @@ func TestWithdrawValidatorCommission(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
valCommission := sdk.DecCoins{
|
||||
sdk.NewDecCoinFromDec("mytoken", math.LegacyNewDec(5).Quo(math.LegacyNewDec(4))),
|
||||
@ -131,7 +131,7 @@ func TestGetTotalRewards(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
valCommission := sdk.DecCoins{
|
||||
sdk.NewDecCoinFromDec("mytoken", math.LegacyNewDec(5).Quo(math.LegacyNewDec(4))),
|
||||
@ -164,7 +164,7 @@ func TestFundCommunityPool(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// reset fee pool
|
||||
distrKeeper.SetFeePool(ctx, types.InitialFeePool())
|
||||
|
||||
@ -3,7 +3,7 @@ package distribution_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@ -19,7 +19,7 @@ func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
|
||||
app, err := simtestutil.SetupAtGenesis(testutil.AppConfig, &accountKeeper)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
acc := accountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName))
|
||||
assert.Assert(t, acc != nil)
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"cosmossdk.io/x/evidence/keeper"
|
||||
"cosmossdk.io/x/evidence/testutil"
|
||||
"cosmossdk.io/x/evidence/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
@ -77,7 +77,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
router = router.AddRoute(types.RouteEquivocation, testEquivocationHandler(evidenceKeeper))
|
||||
evidenceKeeper.SetRouter(router)
|
||||
|
||||
f.ctx = app.BaseApp.NewContext(false, tmproto.Header{Height: 1})
|
||||
f.ctx = app.BaseApp.NewContext(false, cmtproto.Header{Height: 1})
|
||||
f.app = app
|
||||
f.evidenceKeeper = evidenceKeeper
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -73,7 +73,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
&f.accountKeeper, &f.bankKeeper, &f.stakingKeeper)
|
||||
assert.NilError(t, err)
|
||||
|
||||
f.ctx = app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
f.ctx = app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
f.encodingConfig = encCfg
|
||||
f.baseApp = app.BaseApp
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
@ -66,13 +66,13 @@ func TestImportExportQueues(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := s1.app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := s1.app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
addrs := simtestutil.AddTestAddrs(s1.BankKeeper, s1.StakingKeeper, ctx, 1, valTokens)
|
||||
|
||||
header := tmproto.Header{Height: s1.app.LastBlockHeight() + 1}
|
||||
header := cmtproto.Header{Height: s1.app.LastBlockHeight() + 1}
|
||||
s1.app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
ctx = s1.app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx = s1.app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
// Create two proposals, put the second into the voting period
|
||||
proposal1, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
@ -128,12 +128,12 @@ func TestImportExportQueues(t *testing.T) {
|
||||
)
|
||||
|
||||
s2.app.Commit()
|
||||
s2.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: s2.app.LastBlockHeight() + 1}})
|
||||
s2.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s2.app.LastBlockHeight() + 1}})
|
||||
|
||||
header = tmproto.Header{Height: s2.app.LastBlockHeight() + 1}
|
||||
header = cmtproto.Header{Height: s2.app.LastBlockHeight() + 1}
|
||||
s2.app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
ctx2 := s2.app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx2 := s2.app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// Jump the time forward past the DepositPeriod and VotingPeriod
|
||||
ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(*s2.GovKeeper.GetParams(ctx2).MaxDepositPeriod).Add(*s2.GovKeeper.GetParams(ctx2).VotingPeriod))
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -39,7 +39,7 @@ func initFixture(t *testing.T) *fixture {
|
||||
f := &fixture{}
|
||||
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// Populate the gov account with some coins, as the TestProposal we have
|
||||
// is a MsgSend from the gov account.
|
||||
|
||||
@ -3,7 +3,7 @@ package gov_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/configurator"
|
||||
@ -31,7 +31,7 @@ func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
acc := accountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName))
|
||||
assert.Assert(t, acc != nil)
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
@ -53,7 +53,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
f.ctx = app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
f.ctx = app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
queryHelper := &baseapp.QueryServiceTestHelper{
|
||||
GRPCQueryRouter: app.BaseApp.GRPCQueryRouter(),
|
||||
Ctx: f.ctx,
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -51,7 +51,7 @@ func initFixture(t assert.TestingT) *fixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
// TestParams set the SignedBlocksWindow to 1000 and MaxMissedBlocksPerWindow to 500
|
||||
f.slashingKeeper.SetParams(ctx, testutil.TestParams())
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
@ -29,7 +29,7 @@ func init() {
|
||||
// to avoid messing with the hooks.
|
||||
func createTestInput(t *testing.T) (*codec.LegacyAmino, *simapp.SimApp, sdk.Context) {
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
app.StakingKeeper = keeper.NewKeeper(
|
||||
app.AppCodec(),
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
"pgregory.net/rapid"
|
||||
|
||||
@ -59,7 +59,7 @@ func initDeterministicFixture(t *testing.T) *deterministicFixture {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
f.ctx = app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
f.ctx = app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
queryHelper := baseapp.NewQueryServerTestHelper(f.ctx, interfaceRegistry)
|
||||
stakingtypes.RegisterQueryServer(queryHelper, stakingkeeper.Querier{Keeper: f.stakingKeeper})
|
||||
@ -565,7 +565,7 @@ func TestGRPCHistoricalInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
historicalInfo := stakingtypes.HistoricalInfo{
|
||||
Header: tmproto.Header{},
|
||||
Header: cmtproto.Header{},
|
||||
Valset: vals,
|
||||
}
|
||||
|
||||
@ -589,7 +589,7 @@ func TestGRPCHistoricalInfo(t *testing.T) {
|
||||
validator := getStaticValidator(f, t)
|
||||
|
||||
historicalInfo := stakingtypes.HistoricalInfo{
|
||||
Header: tmproto.Header{},
|
||||
Header: cmtproto.Header{},
|
||||
Valset: []stakingtypes.Validator{validator},
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/simapp"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
@ -20,7 +20,7 @@ import (
|
||||
|
||||
func bootstrapGenesisTest(t *testing.T, numAddrs int) (*simapp.SimApp, sdk.Context, []sdk.AccAddress) {
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
addrDels, _ := generateAddresses(app, ctx, numAddrs)
|
||||
return app, ctx, addrDels
|
||||
@ -116,7 +116,7 @@ func TestInitGenesis(t *testing.T) {
|
||||
|
||||
func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) {
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.NewContext(false, tmproto.Header{})
|
||||
ctx := app.NewContext(false, cmtproto.Header{})
|
||||
|
||||
consPub, err := codectypes.NewAnyWithValue(PKs[0])
|
||||
assert.NilError(t, err)
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/simapp"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -30,7 +30,7 @@ func initFixture(t *testing.T) *fixture {
|
||||
f := &fixture{}
|
||||
|
||||
app := simapp.Setup(t, false)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
querier := keeper.Querier{Keeper: app.StakingKeeper}
|
||||
|
||||
@ -41,7 +41,7 @@ func initFixture(t *testing.T) *fixture {
|
||||
f.msgServer = keeper.NewMsgServerImpl(app.StakingKeeper)
|
||||
|
||||
addrs, _, validators := createValidators(t, ctx, app, []int64{9, 8, 7})
|
||||
header := tmproto.Header{
|
||||
header := cmtproto.Header{
|
||||
ChainID: "HelloChain",
|
||||
Height: 5,
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/configurator"
|
||||
@ -37,7 +37,7 @@ func TestCancelUnbondingDelegation(t *testing.T) {
|
||||
&stakingKeeper, &bankKeeper, &accountKeeper)
|
||||
assert.NilError(t, err)
|
||||
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
msgServer := keeper.NewMsgServerImpl(stakingKeeper)
|
||||
bondDenom := stakingKeeper.BondDenom(ctx)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package keeper
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/configurator"
|
||||
@ -26,7 +26,7 @@ func TestParams(t *testing.T) {
|
||||
simtestutil.DefaultStartUpConfig(),
|
||||
&stakingKeeper)
|
||||
assert.NilError(t, err)
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
ctx := app.BaseApp.NewContext(false, cmtproto.Header{})
|
||||
|
||||
expParams := types.DefaultParams()
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/simapp"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
sdktestutil "github.com/cosmos/cosmos-sdk/testutil"
|
||||
@ -67,7 +67,7 @@ func TestSlashUnbondingDelegation(t *testing.T) {
|
||||
assert.Assert(t, slashAmount.Equal(sdk.NewInt(0)))
|
||||
|
||||
// after the expiration time, no longer eligible for slashing
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(10, 0)})
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: time.Unix(10, 0)})
|
||||
app.StakingKeeper.SetUnbondingDelegation(ctx, ubd)
|
||||
slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction)
|
||||
assert.Assert(t, slashAmount.Equal(sdk.NewInt(0)))
|
||||
@ -75,7 +75,7 @@ func TestSlashUnbondingDelegation(t *testing.T) {
|
||||
// test valid slash, before expiration timestamp and to which stake contributed
|
||||
notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx)
|
||||
oldUnbondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress())
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(0, 0)})
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: time.Unix(0, 0)})
|
||||
app.StakingKeeper.SetUnbondingDelegation(ctx, ubd)
|
||||
slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction)
|
||||
assert.Assert(t, slashAmount.Equal(sdk.NewInt(5)))
|
||||
@ -124,7 +124,7 @@ func TestSlashRedelegation(t *testing.T) {
|
||||
assert.Assert(t, slashAmount.Equal(sdk.NewInt(0)))
|
||||
|
||||
// after the expiration time, no longer eligible for slashing
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(10, 0)})
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: time.Unix(10, 0)})
|
||||
app.StakingKeeper.SetRedelegation(ctx, rd)
|
||||
validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1])
|
||||
assert.Assert(t, found)
|
||||
@ -134,7 +134,7 @@ func TestSlashRedelegation(t *testing.T) {
|
||||
balances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress())
|
||||
|
||||
// test valid slash, before expiration timestamp and to which stake contributed
|
||||
ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(0, 0)})
|
||||
ctx = ctx.WithBlockHeader(cmtproto.Header{Time: time.Unix(0, 0)})
|
||||
app.StakingKeeper.SetRedelegation(ctx, rd)
|
||||
validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1])
|
||||
assert.Assert(t, found)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user