Description
Recent PRs (including #20412) have introduced server/v2 infrastructure and an example app, simapp/v2, using this code. In short server/v2 is a decomposition of baseapp and friends into modular, composable, parts. What is merged into main
at the time of writing this issue should be considered a functional PoC. Completion of the issues enumerated here will harden the code quality of server/v2 and elevate it from PoC to production ready.
Testing
For comprehensive testing, we should adapt all integration, e2e, and sims tests currently covering runtime/v1 for runtime/v2. Perhaps the clever use of a build flag and interfaces in the right places could make this easier.
- convert simapp-v2-init to a tests/systemtests #20471
- server/v2/cometbft needs unit tests with mocks #20484
- server/v2: integration tests #20799
- server/v2: e2e/system tests #20800
- tests/sims support for runtime/v2 #20469
- simulation.SimulateFromSeed expects a
BaseApp
. Is it possible for this function to accept an abstraction which both BaseApp and something from runtime/v2 satisfy?
- simulation.SimulateFromSeed expects a
- v2/cometbft unit tests don't compile
- server/v2: wire grpc and gateway #20798
Breaking
- simapp/v2 start crashes with
panic: proto:not found
when using go.mod replaces instead of go.work #20492 - server/v2 handles genesis by processing gentxs as a genesis block, but store/v2 and iavl do not support the creation of genesis block at height 0.
- store/v2 and iavl v1 must support the creation of state at version 0 to support server/v2 style genesis #20443
- this hack in the init script is required to overcome it (initial height = 2)
cosmos-sdk/scripts/simapp-v2-init.sh
Line 25 in 5bf88be
- refactor(x/**): rewrite ante handlers as tx validators #19949 (merged into
server_modular
) and possibly follow up PRs around TxValidators must be rebased onto main -
sdk.Context
is not provided by runtime/v2, but required for certain tx handlers using gogo interface types Environment in context #19640
Feature Parity
- simapp/v2 is started using an ad-hoc start command handler, neither an api nor grpc server is started. this should be refactored to use
ServerModule
, i.e. comet node as a module, api server as a module, etc.cosmos-sdk/server/v2/server.go
Line 16 in 5bf88be
- server/v2/comebft queries for the paths
"app", "store", "p2p", "custom"
are not yet implemented #20494 - server/v2/cometbft commands should support both json and yaml output #20495
- simapp/v2 needs an implementation of CLI pruning commands #20511
- simapp/v2 needs an implementation of CLI snapshot commands #20512
- server/v1 may produce a hash of empty string instead of nil, should server/v2? #20513
- simapp/v2 needs an export implementation #20514
Code quality
- deferred initialization of routers is not thread-safe but required to resolve an initialization circular dependency.
cosmos-sdk/server/v2/stf/core_router_service.go
Lines 98 to 105 in 5bf88be
- simapp/v2 still uses server/v1 CLI helpers for commands and config generation/parsing. These should be migrated to server/v2. server/v2 start commands and helpers #19720 has more detail.
- server/v2/stf should not manage the storage and retrieval of header info #20510
Metadata
Labels
Type
Projects
Status
🤸♂️ In Progress