Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server/v2/comebft): wire missing services + fix simulation #21964

Merged
merged 29 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6e59fbb
feat(server/v2/comebft): fix simulation wiring
julienrbrt Sep 27, 2024
19debfe
updates
julienrbrt Sep 27, 2024
9aba7af
Merge branch 'main' into julien/fix-simulate
julienrbrt Oct 8, 2024
e6c8460
updates
julienrbrt Oct 8, 2024
edde74d
Merge branch 'main' into julien/fix-simulate
julienrbrt Oct 9, 2024
daf2ea5
Merge branch 'main' into julien/fix-simulate
julienrbrt Oct 15, 2024
420220e
Merge branch 'main' into julien/fix-simulate
julienrbrt Oct 27, 2024
b550b90
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 5, 2024
a15551e
wip
julienrbrt Nov 5, 2024
4f54f1c
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 8, 2024
7f707dc
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 8, 2024
e81317a
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 11, 2024
9315b59
wire nodeservice
julienrbrt Nov 11, 2024
e15a675
simplify
julienrbrt Nov 11, 2024
6fcfead
updates
julienrbrt Nov 13, 2024
5dc9e8e
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 18, 2024
1722c18
tidy
julienrbrt Nov 18, 2024
28c7ddf
updates
julienrbrt Nov 18, 2024
c67a32e
simulate
julienrbrt Nov 18, 2024
5e55ce8
updates
julienrbrt Nov 18, 2024
b995dbd
remove scrums of previous app closer
julienrbrt Nov 18, 2024
5bbd256
implement nodeservice v1beta1 by comet
julienrbrt Nov 18, 2024
f33fe9e
meh
julienrbrt Nov 18, 2024
d3e7082
`make lint-fix`
julienrbrt Nov 18, 2024
765bd57
`make lint-fix`
julienrbrt Nov 18, 2024
eb78af6
updates
julienrbrt Nov 18, 2024
3f6c19b
tpo
julienrbrt Nov 18, 2024
c7d65a8
Merge branch 'main' into julien/fix-simulate
julienrbrt Nov 18, 2024
c86df3a
feedback
julienrbrt Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/grpc/cmtservice/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ type (

// NewQueryServer creates a new CometBFT query server.
func NewQueryServer(
clientCtx CometRPC,
cometRPC CometRPC,
queryFn abciQueryFn,
consensusAddressCodec address.Codec,
) ServiceServer {
return queryServer{
rpc: clientCtx,
rpc: cometRPC,
queryFn: queryFn,
consensusCodec: consensusAddressCodec,
}
Expand Down
15 changes: 10 additions & 5 deletions server/v2/cometbft/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"cosmossdk.io/log"
"cosmossdk.io/schema/appdata"
"cosmossdk.io/server/v2/appmanager"
"cosmossdk.io/server/v2/cometbft/client/grpc/cmtservice"
"cosmossdk.io/server/v2/cometbft/handlers"
"cosmossdk.io/server/v2/cometbft/mempool"
"cosmossdk.io/server/v2/cometbft/types"
Expand All @@ -37,6 +36,12 @@ import (
consensustypes "cosmossdk.io/x/consensus/types"
)

const (
QueryPathApp = "app"
QueryPathP2P = "p2p"
QueryPathStore = "store"
)

var _ abci.Application = (*Consensus[transaction.Tx])(nil)

type Consensus[T transaction.Tx] struct {
Expand Down Expand Up @@ -221,17 +226,17 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abciproto.QueryRequest) (
}

switch path[0] {
case cmtservice.QueryPathApp:
case QueryPathApp:
resp, err = c.handlerQueryApp(ctx, path, req)

case cmtservice.QueryPathStore:
case QueryPathStore:
resp, err = c.handleQueryStore(path, c.store, req)

case cmtservice.QueryPathP2P:
case QueryPathP2P:
resp, err = c.handleQueryP2P(path)

default:
resp = QueryResult(errorsmod.Wrap(cometerrors.ErrUnknownRequest, "unknown query path"), c.cfg.AppTomlConfig.Trace)
resp = QueryResult(errorsmod.Wrapf(cometerrors.ErrUnknownRequest, "unknown query path %s", req.Path), c.cfg.AppTomlConfig.Trace)
}

if err != nil {
Expand Down
71 changes: 0 additions & 71 deletions server/v2/cometbft/client/grpc/cmtservice/autocli.go

This file was deleted.

56 changes: 0 additions & 56 deletions server/v2/cometbft/client/grpc/cmtservice/service.go

This file was deleted.

15 changes: 2 additions & 13 deletions server/v2/cometbft/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ replace (
)

require (
cosmossdk.io/api v0.7.6
cosmossdk.io/collections v0.4.0
cosmossdk.io/core v1.0.0-alpha.4
cosmossdk.io/errors/v2 v2.0.0-20240731132947-df72853b3ca5
Expand All @@ -32,7 +31,6 @@ require (
github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
Expand All @@ -43,6 +41,7 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect
cosmossdk.io/api v0.7.6 // indirect
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 // indirect
cosmossdk.io/depinject v1.0.0 // indirect
cosmossdk.io/errors v1.0.1 // indirect
Expand All @@ -54,9 +53,7 @@ require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
Expand All @@ -72,7 +69,6 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect
github.com/cosmos/crypto v0.1.2 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.3.0 // indirect
github.com/cosmos/ics23/go v0.11.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
Expand All @@ -85,14 +81,12 @@ require (
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-kit/kit v0.13.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand All @@ -102,10 +96,8 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
Expand All @@ -116,7 +108,6 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
github.com/huandu/skiplist v1.2.1 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
Expand Down Expand Up @@ -169,13 +160,11 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect
Expand Down
Loading
Loading