chore: use comet api pkg instead of comet alias (#20614)
This commit is contained in:
parent
9e1d28e2a6
commit
28fa3b8dfc
@ -8,7 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abcitypes "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
@ -116,8 +117,7 @@ func (app *BaseApp) InitChain(req *abci.InitChainRequest) (*abci.InitChainRespon
|
||||
)
|
||||
}
|
||||
|
||||
sort.Sort(abci.ValidatorUpdates(req.Validators))
|
||||
sort.Sort(abci.ValidatorUpdates(res.Validators))
|
||||
sort.Sort(abcitypes.ValidatorUpdates(req.Validators))
|
||||
|
||||
for i := range res.Validators {
|
||||
if !proto.Equal(&res.Validators[i], &req.Validators[i]) {
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/cometbft/cometbft/crypto/secp256k1"
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cryptoenc "github.com/cometbft/cometbft/crypto/encoding"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1"
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/cometbft/cometbft/crypto/tmhash"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/encoding"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
gocontext "context"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
"cosmossdk.io/core/log"
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"cosmossdk.io/core/log"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
tmproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package cmtservice
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"google.golang.org/grpc/codes"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package cmtservice
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/encoding"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclient "github.com/cometbft/cometbft/rpc/client"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package context
|
||||
|
||||
type contextKey uint8
|
||||
|
||||
type (
|
||||
execModeKey struct{}
|
||||
cometInfoKey struct{}
|
||||
|
||||
@ -81,7 +81,7 @@ Then, the instance of `app` is used to instantiate a new CometBFT node:
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L341-L378
|
||||
```
|
||||
|
||||
The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/abci/types#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file.
|
||||
The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/api/cometbft/abci/v1#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file.
|
||||
|
||||
Once the CometBFT node is instantiated and in sync with the application, the node can be started:
|
||||
|
||||
|
||||
@ -16,12 +16,12 @@ const (
|
||||
|
||||
// DurationCodec encodes google.protobuf.Duration values with the following
|
||||
// encoding:
|
||||
// - nil is encoded as []byte{0xFF}
|
||||
// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes
|
||||
// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
|
||||
// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
|
||||
// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
|
||||
// preserved when comparing the encoded values of two Durations:
|
||||
// - nil is encoded as []byte{0xFF}
|
||||
// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes
|
||||
// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
|
||||
// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
|
||||
// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
|
||||
// preserved when comparing the encoded values of two Durations:
|
||||
// - []byte{0xBB, 0x9A, 0xC9, 0xFF} for zero nanos
|
||||
// - 4 fixed bytes with the bit mask 0x80 applied to the first byte, with negative nanos scaled so that -999,999,999
|
||||
// is encoded as 0 and -1 is encoded as 999,999,998
|
||||
|
||||
@ -9,12 +9,12 @@ import (
|
||||
|
||||
// TimestampCodec encodes google.protobuf.Timestamp values with the following
|
||||
// encoding:
|
||||
// - nil is encoded as []byte{0xFF}
|
||||
// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes
|
||||
// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
|
||||
// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
|
||||
// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
|
||||
// preserved when comparing the encoded values of two Timestamps.
|
||||
// - nil is encoded as []byte{0xFF}
|
||||
// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes
|
||||
// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
|
||||
// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
|
||||
// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
|
||||
// preserved when comparing the encoded values of two Timestamps.
|
||||
//
|
||||
// When iterating over timestamp indexes, nil values will always be ordered last.
|
||||
//
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
|
||||
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
)
|
||||
@ -16,58 +17,58 @@ func NewCometABCIWrapper(app servertypes.ABCI) abci.Application {
|
||||
return cometABCIWrapper{app: app}
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) Info(_ context.Context, req *abci.InfoRequest) (*abci.InfoResponse, error) {
|
||||
func (w cometABCIWrapper) Info(_ context.Context, req *abciproto.InfoRequest) (*abciproto.InfoResponse, error) {
|
||||
return w.app.Info(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) {
|
||||
func (w cometABCIWrapper) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) {
|
||||
return w.app.Query(ctx, req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) CheckTx(_ context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) {
|
||||
func (w cometABCIWrapper) CheckTx(_ context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) {
|
||||
return w.app.CheckTx(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) InitChain(_ context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) {
|
||||
func (w cometABCIWrapper) InitChain(_ context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) {
|
||||
return w.app.InitChain(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error) {
|
||||
func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abciproto.PrepareProposalRequest) (*abciproto.PrepareProposalResponse, error) {
|
||||
return w.app.PrepareProposal(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error) {
|
||||
func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abciproto.ProcessProposalRequest) (*abciproto.ProcessProposalResponse, error) {
|
||||
return w.app.ProcessProposal(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error) {
|
||||
func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abciproto.FinalizeBlockRequest) (*abciproto.FinalizeBlockResponse, error) {
|
||||
return w.app.FinalizeBlock(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) {
|
||||
func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) {
|
||||
return w.app.ExtendVote(ctx, req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error) {
|
||||
func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abciproto.VerifyVoteExtensionRequest) (*abciproto.VerifyVoteExtensionResponse, error) {
|
||||
return w.app.VerifyVoteExtension(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) Commit(_ context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) {
|
||||
func (w cometABCIWrapper) Commit(_ context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) {
|
||||
return w.app.Commit()
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error) {
|
||||
func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abciproto.ListSnapshotsRequest) (*abciproto.ListSnapshotsResponse, error) {
|
||||
return w.app.ListSnapshots(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error) {
|
||||
func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abciproto.OfferSnapshotRequest) (*abciproto.OfferSnapshotResponse, error) {
|
||||
return w.app.OfferSnapshot(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error) {
|
||||
func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abciproto.LoadSnapshotChunkRequest) (*abciproto.LoadSnapshotChunkResponse, error) {
|
||||
return w.app.LoadSnapshotChunk(req)
|
||||
}
|
||||
|
||||
func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error) {
|
||||
func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abciproto.ApplySnapshotChunkRequest) (*abciproto.ApplySnapshotChunkResponse, error) {
|
||||
return w.app.ApplySnapshotChunk(req)
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
|
||||
@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// ABCI is an interface that enables any finite, deterministic state machine
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
coreappmgr "cosmossdk.io/core/app"
|
||||
"cosmossdk.io/core/comet"
|
||||
@ -125,7 +126,7 @@ type BlockData struct {
|
||||
|
||||
// CheckTx implements types.Application.
|
||||
// It is called by cometbft to verify transaction validity
|
||||
func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) {
|
||||
func (c *Consensus[T]) CheckTx(ctx context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) {
|
||||
decodedTx, err := c.txCodec.Decode(req.Tx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -154,7 +155,7 @@ func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (*
|
||||
}
|
||||
|
||||
// Info implements types.Application.
|
||||
func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.InfoResponse, error) {
|
||||
func (c *Consensus[T]) Info(ctx context.Context, _ *abciproto.InfoRequest) (*abciproto.InfoResponse, error) {
|
||||
version, _, err := c.store.StateLatest()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -182,7 +183,7 @@ func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.Inf
|
||||
|
||||
// Query implements types.Application.
|
||||
// It is called by cometbft to query application state.
|
||||
func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) {
|
||||
func (c *Consensus[T]) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) {
|
||||
// follow the query path from here
|
||||
decodedMsg, err := c.txCodec.Decode(req.Data)
|
||||
protoMsg, ok := any(decodedMsg).(transaction.Msg)
|
||||
@ -208,7 +209,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci
|
||||
return QueryResult(errorsmod.Wrap(cometerrors.ErrUnknownRequest, "no query path provided"), c.cfg.Trace), nil
|
||||
}
|
||||
|
||||
var resp *abci.QueryResponse
|
||||
var resp *abciproto.QueryResponse
|
||||
|
||||
switch path[0] {
|
||||
case QueryPathApp:
|
||||
@ -232,7 +233,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci
|
||||
}
|
||||
|
||||
// InitChain implements types.Application.
|
||||
func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) {
|
||||
func (c *Consensus[T]) InitChain(ctx context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) {
|
||||
c.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId)
|
||||
|
||||
// store chainID to be used later on in execution
|
||||
@ -304,8 +305,8 @@ func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest
|
||||
// It is called by cometbft to prepare a proposal block.
|
||||
func (c *Consensus[T]) PrepareProposal(
|
||||
ctx context.Context,
|
||||
req *abci.PrepareProposalRequest,
|
||||
) (resp *abci.PrepareProposalResponse, err error) {
|
||||
req *abciproto.PrepareProposalRequest,
|
||||
) (resp *abciproto.PrepareProposalResponse, err error) {
|
||||
if req.Height < 1 {
|
||||
return nil, errors.New("PrepareProposal called with invalid height")
|
||||
}
|
||||
@ -347,8 +348,8 @@ func (c *Consensus[T]) PrepareProposal(
|
||||
// It is called by cometbft to process/verify a proposal block.
|
||||
func (c *Consensus[T]) ProcessProposal(
|
||||
ctx context.Context,
|
||||
req *abci.ProcessProposalRequest,
|
||||
) (*abci.ProcessProposalResponse, error) {
|
||||
req *abciproto.ProcessProposalRequest,
|
||||
) (*abciproto.ProcessProposalResponse, error) {
|
||||
decodedTxs := make([]T, len(req.Txs))
|
||||
for _, tx := range req.Txs {
|
||||
decTx, err := c.txCodec.Decode(tx)
|
||||
@ -384,8 +385,8 @@ func (c *Consensus[T]) ProcessProposal(
|
||||
// It is called by cometbft to finalize a block.
|
||||
func (c *Consensus[T]) FinalizeBlock(
|
||||
ctx context.Context,
|
||||
req *abci.FinalizeBlockRequest,
|
||||
) (*abci.FinalizeBlockResponse, error) {
|
||||
req *abciproto.FinalizeBlockRequest,
|
||||
) (*abciproto.FinalizeBlockResponse, error) {
|
||||
if err := c.validateFinalizeBlockHeight(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -494,7 +495,7 @@ func (c *Consensus[T]) FinalizeBlock(
|
||||
|
||||
// Commit implements types.Application.
|
||||
// It is called by cometbft to notify the application that a block was committed.
|
||||
func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) {
|
||||
func (c *Consensus[T]) Commit(ctx context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) {
|
||||
lastCommittedBlock := c.lastCommittedBlock.Load()
|
||||
|
||||
c.snapshotManager.SnapshotIfApplicable(lastCommittedBlock.Height)
|
||||
@ -513,8 +514,8 @@ func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci
|
||||
// VerifyVoteExtension implements types.Application.
|
||||
func (c *Consensus[T]) VerifyVoteExtension(
|
||||
ctx context.Context,
|
||||
req *abci.VerifyVoteExtensionRequest,
|
||||
) (*abci.VerifyVoteExtensionResponse, error) {
|
||||
req *abciproto.VerifyVoteExtensionRequest,
|
||||
) (*abciproto.VerifyVoteExtensionResponse, error) {
|
||||
// If vote extensions are not enabled, as a safety precaution, we return an
|
||||
// error.
|
||||
cp, err := c.GetConsensusParams(ctx)
|
||||
@ -548,7 +549,7 @@ func (c *Consensus[T]) VerifyVoteExtension(
|
||||
}
|
||||
|
||||
// ExtendVote implements types.Application.
|
||||
func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) {
|
||||
func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) {
|
||||
// If vote extensions are not enabled, as a safety precaution, we return an
|
||||
// error.
|
||||
cp, err := c.GetConsensusParams(ctx)
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package cmtservice
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
consensusv1 "cosmossdk.io/api/cosmos/consensus/v1"
|
||||
|
||||
@ -3,7 +3,7 @@ package handlers
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
crypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/store/v2/snapshots"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package types
|
||||
|
||||
import abci "github.com/cometbft/cometbft/abci/types"
|
||||
import abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
// PeerFilter responds to p2p filtering queries from Tendermint
|
||||
type PeerFilter func(info string) (*abci.QueryResponse, error)
|
||||
|
||||
@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// VoteExtensionsHandler defines how to implement vote extension handlers
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
abciv1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
gogoproto "github.com/cosmos/gogoproto/proto"
|
||||
gogoany "github.com/cosmos/gogoproto/types/any"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/spf13/cast"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package maps
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/binary"
|
||||
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
|
||||
"github.com/cometbft/cometbft/crypto/merkle"
|
||||
"github.com/cometbft/cometbft/crypto/tmhash"
|
||||
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
"cosmossdk.io/store/internal/tree"
|
||||
@ -36,11 +36,11 @@ func (sm *merkleMap) set(key string, value []byte) {
|
||||
|
||||
// The value is hashed, so you can check for equality with a cached value (say)
|
||||
// and make a determination to fetch or not.
|
||||
vhash := tmhash.Sum(value)
|
||||
vhash := sha256.Sum256(value)
|
||||
|
||||
sm.kvs.Pairs = append(sm.kvs.Pairs, kv.Pair{
|
||||
Key: byteKey,
|
||||
Value: vhash,
|
||||
Value: vhash[:],
|
||||
})
|
||||
}
|
||||
|
||||
@ -97,11 +97,11 @@ func (sm *simpleMap) Set(key string, value []byte) {
|
||||
// The value is hashed, so you can
|
||||
// check for equality with a cached value (say)
|
||||
// and make a determination to fetch or not.
|
||||
vhash := tmhash.Sum(value)
|
||||
vhash := sha256.Sum256(value)
|
||||
|
||||
sm.Kvs.Pairs = append(sm.Kvs.Pairs, kv.Pair{
|
||||
Key: byteKey,
|
||||
Value: vhash,
|
||||
Value: vhash[:],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/hashicorp/go-plugin"
|
||||
|
||||
streamingabci "cosmossdk.io/store/streaming/abci"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/hashicorp/go-plugin"
|
||||
|
||||
streamingabci "cosmossdk.io/store/streaming/abci"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/hashicorp/go-plugin"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// ABCIListener is the interface that we're exposing as a streaming service.
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package bank_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
authtypes "cosmossdk.io/x/auth/types"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/golang/mock/gomock"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
protoio "github.com/cosmos/gogoproto/io"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -3,7 +3,7 @@ package cli
|
||||
import (
|
||||
"context"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtbytes "github.com/cometbft/cometbft/libs/bytes"
|
||||
rpcclient "github.com/cometbft/cometbft/rpc/client"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
cmtabcitypes "github.com/cometbft/cometbft/abci/types"
|
||||
cmtabcitypes "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
types2 "github.com/cometbft/cometbft/abci/types"
|
||||
types2 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/core/header"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
)
|
||||
|
||||
// InitChainer initializes application state at genesis
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
|
||||
"cosmossdk.io/core/comet"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package errors
|
||||
|
||||
import (
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
)
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtt "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
cmt "github.com/cometbft/cometbft/types"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ require (
|
||||
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/tx v0.13.3
|
||||
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.5
|
||||
github.com/cosmos/cosmos-sdk v0.51.0
|
||||
github.com/cosmos/gogoproto v1.5.0
|
||||
@ -57,7 +58,6 @@ require (
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||
github.com/cometbft/cometbft-db v0.12.0 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/cosmos-db v1.0.2 // indirect
|
||||
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ require (
|
||||
github.com/cockroachdb/pebble v1.1.0 // indirect
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cometbft/cometbft-db v0.12.0 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/cosmos-db v1.0.2 // indirect
|
||||
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
@ -55,7 +55,7 @@ require (
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||
github.com/cometbft/cometbft-db v0.12.0 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/cosmos-db v1.0.2 // indirect
|
||||
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ require (
|
||||
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
|
||||
github.com/cockroachdb/apd/v2 v2.0.2
|
||||
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1
|
||||
github.com/cosmos/cosmos-db v1.0.2
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.5
|
||||
github.com/cosmos/cosmos-sdk v0.51.0
|
||||
@ -61,7 +62,6 @@ require (
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||
github.com/cometbft/cometbft-db v0.12.0 // indirect
|
||||
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
|
||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/golang/mock/gomock"
|
||||
|
||||
"cosmossdk.io/core/header"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user