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

refactor(simapp/v2): wire telemetry in testnet command (partial backport #23022) #23033

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions server/v2/cometbft/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ require (
cosmossdk.io/errors/v2 v2.0.0
cosmossdk.io/log v1.5.0
cosmossdk.io/schema v1.0.0 //main
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666 // main
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666 // main
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666 // main
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a // main
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259 // main
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1 // main
cosmossdk.io/server/v2/stf v1.0.0-beta.1 // main
cosmossdk.io/store/v2 v2.0.0-beta.1 // main
cosmossdk.io/x/consensus v0.2.0-rc.1
github.com/cometbft/cometbft v1.0.0
github.com/cometbft/cometbft/api v1.0.0
Expand Down
16 changes: 8 additions & 8 deletions server/v2/cometbft/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ=
cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk=
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ=
cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666 h1:0MyUvSupaaAvlrA0+oLNlGrvLWZhBSU5PQfZmP9VpKg=
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666/go.mod h1:X2x+lbW6HCtRHZ5FEZAs+KmrIrMu6sM8gsZtSLAz/ko=
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666 h1:9JqIsgUlqRf4/PyV9MBUGAqiAv9Zwi0GCJ/M+qYTEAQ=
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666/go.mod h1:RVYxIaEdIT10nWSRqbwKDLFWfvCVx+cwAorCyPAQg9A=
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666 h1:AwgAI0SSC0mBmPKelUq8tD4iROSc3UDp3yONGeWWfNA=
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8=
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259 h1:JJdL59NWGbozmItKaptEZpvkiPJdogiXF9i53TW/a8g=
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259/go.mod h1:X2x+lbW6HCtRHZ5FEZAs+KmrIrMu6sM8gsZtSLAz/ko=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1 h1:EISWki+z9SDAt3OJnUl2y5Ow4qjOb+epYjLb1C7CN/E=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1/go.mod h1:RVYxIaEdIT10nWSRqbwKDLFWfvCVx+cwAorCyPAQg9A=
cosmossdk.io/server/v2/stf v1.0.0-beta.1 h1:s+nRgjhKVC08/qpr51eFVodLhyyQ9ASvJBanLBfQVNI=
cosmossdk.io/server/v2/stf v1.0.0-beta.1/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8=
cosmossdk.io/store v1.10.0-rc.1.0.20241218084712-ca559989da43 h1:glZ6MpmD+5AhwJYV4jzx+rn7cgUB2owHgk9o+93luz0=
cosmossdk.io/store v1.10.0-rc.1.0.20241218084712-ca559989da43/go.mod h1:XCWpgfueHSBY+B7Cf2Aq/CcsU+6XoFH+EmseCKglFrU=
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a h1:pZbBjdj1fWKEtArkITrHyeTFucyz11IktJvw3OC03Uc=
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a/go.mod h1:pqUtZ68WrKkdHF2FdvFlPmmUA1mwZwABo+enSZItluY=
cosmossdk.io/store/v2 v2.0.0-beta.1 h1:p1fdZ9uNijhpXZXdqs0QS6NmXNDVPNyT4DHV4yQnF64=
cosmossdk.io/store/v2 v2.0.0-beta.1/go.mod h1:qHQmf/9mnsXwo/Ypp2u2Zs6BmkYcx1R/Jrpyn9Ro13A=
cosmossdk.io/x/bank v0.2.0-rc.1 h1:tLYxL2N0U19tU50euZZKdsixsQcU6V+eMfudn/Y7YyY=
cosmossdk.io/x/bank v0.2.0-rc.1/go.mod h1:y1HipKOoiieb2gEZOQJPGwbwUBSYbIY+vG7XZAUstAE=
cosmossdk.io/x/consensus v0.2.0-rc.1 h1:6Df5E4lR7ggmOxZsm953ZR+gA6PwZzU0vpG9dmZtwuw=
Expand Down
8 changes: 4 additions & 4 deletions simapp/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ require (
cosmossdk.io/log v1.5.0
cosmossdk.io/math v1.4.0
cosmossdk.io/runtime/v2 v2.0.0-20241219154748-69025c556666 // main
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666 // main
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259 // main
cosmossdk.io/server/v2/cometbft v0.0.0-00010101000000-000000000000
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a // main
cosmossdk.io/store/v2 v2.0.0-beta.1 // main
cosmossdk.io/tools/benchmark v0.2.0-rc.1
cosmossdk.io/tools/confix v0.2.0-rc.1
cosmossdk.io/x/accounts v0.2.0-rc.1
Expand Down Expand Up @@ -61,8 +61,8 @@ require (
cosmossdk.io/errors v1.0.1 // indirect
cosmossdk.io/errors/v2 v2.0.0 // indirect
cosmossdk.io/schema v1.0.0 // indirect
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666 // indirect; main
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666 // indirect; main
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1 // indirect; main
cosmossdk.io/server/v2/stf v1.0.0-beta.1 // indirect; main
cosmossdk.io/store v1.10.0-rc.1.0.20241218084712-ca559989da43 // indirect; main
cosmossdk.io/x/tx v1.0.0-alpha.3 // indirect; main
filippo.io/edwards25519 v1.1.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions simapp/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,16 @@ cosmossdk.io/runtime/v2 v2.0.0-20241219154748-69025c556666 h1:zFMi1URvs3NiJdSf2z
cosmossdk.io/runtime/v2 v2.0.0-20241219154748-69025c556666/go.mod h1:C0MTcmQlZFPQvYoXzYiWP+h9lFOgezzafEFiQBa6xYo=
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ=
cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666 h1:0MyUvSupaaAvlrA0+oLNlGrvLWZhBSU5PQfZmP9VpKg=
cosmossdk.io/server/v2 v2.0.0-20241219154748-69025c556666/go.mod h1:X2x+lbW6HCtRHZ5FEZAs+KmrIrMu6sM8gsZtSLAz/ko=
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666 h1:9JqIsgUlqRf4/PyV9MBUGAqiAv9Zwi0GCJ/M+qYTEAQ=
cosmossdk.io/server/v2/appmanager v0.0.0-20241219154748-69025c556666/go.mod h1:RVYxIaEdIT10nWSRqbwKDLFWfvCVx+cwAorCyPAQg9A=
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666 h1:AwgAI0SSC0mBmPKelUq8tD4iROSc3UDp3yONGeWWfNA=
cosmossdk.io/server/v2/stf v0.0.0-20241219154748-69025c556666/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8=
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259 h1:JJdL59NWGbozmItKaptEZpvkiPJdogiXF9i53TW/a8g=
cosmossdk.io/server/v2 v2.0.0-20241220083032-422be7044259/go.mod h1:X2x+lbW6HCtRHZ5FEZAs+KmrIrMu6sM8gsZtSLAz/ko=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1 h1:EISWki+z9SDAt3OJnUl2y5Ow4qjOb+epYjLb1C7CN/E=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1/go.mod h1:RVYxIaEdIT10nWSRqbwKDLFWfvCVx+cwAorCyPAQg9A=
cosmossdk.io/server/v2/stf v1.0.0-beta.1 h1:s+nRgjhKVC08/qpr51eFVodLhyyQ9ASvJBanLBfQVNI=
cosmossdk.io/server/v2/stf v1.0.0-beta.1/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8=
cosmossdk.io/store v1.10.0-rc.1.0.20241218084712-ca559989da43 h1:glZ6MpmD+5AhwJYV4jzx+rn7cgUB2owHgk9o+93luz0=
cosmossdk.io/store v1.10.0-rc.1.0.20241218084712-ca559989da43/go.mod h1:XCWpgfueHSBY+B7Cf2Aq/CcsU+6XoFH+EmseCKglFrU=
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a h1:pZbBjdj1fWKEtArkITrHyeTFucyz11IktJvw3OC03Uc=
cosmossdk.io/store/v2 v2.0.0-20241216193553-ee5da1a70d7a/go.mod h1:pqUtZ68WrKkdHF2FdvFlPmmUA1mwZwABo+enSZItluY=
cosmossdk.io/store/v2 v2.0.0-beta.1 h1:p1fdZ9uNijhpXZXdqs0QS6NmXNDVPNyT4DHV4yQnF64=
cosmossdk.io/store/v2 v2.0.0-beta.1/go.mod h1:qHQmf/9mnsXwo/Ypp2u2Zs6BmkYcx1R/Jrpyn9Ro13A=
cosmossdk.io/tools/benchmark v0.2.0-rc.1 h1:Jgk0FLvnMQJrivrSMhKQBwaTiJz6MGq5ZbaHag7Sqq0=
cosmossdk.io/tools/benchmark v0.2.0-rc.1/go.mod h1:tnGa8L7xHFMp26FbLvU5MRlS89BFrCxSOKR8jCi7kVU=
cosmossdk.io/tools/confix v0.2.0-rc.1 h1:sVYXR89OKW19oCnr232m9/pE3+oJllNTZlTypWhXHNI=
Expand Down
19 changes: 14 additions & 5 deletions simapp/v2/simdv2/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"cosmossdk.io/server/v2/api/grpc"
"cosmossdk.io/server/v2/api/grpcgateway"
"cosmossdk.io/server/v2/api/rest"
"cosmossdk.io/server/v2/api/telemetry"
"cosmossdk.io/server/v2/cometbft"
"cosmossdk.io/server/v2/store"
banktypes "cosmossdk.io/x/bank/types"
Expand Down Expand Up @@ -182,10 +183,11 @@ func initTestnetFiles[T transaction.Tx](
genFiles []string
)
const (
rpcPort = 26657
apiPort = 1317
grpcPort = 9090
restPort = 8080
rpcPort = 26657
apiPort = 1317
grpcPort = 9090
restPort = 8080
telemetryPort = 7180
)
p2pPortStart := 26656

Expand All @@ -196,6 +198,7 @@ func initTestnetFiles[T transaction.Tx](
grpcConfig := grpc.DefaultConfig()
grpcgatewayConfig := grpcgateway.DefaultConfig()
restConfig := rest.DefaultConfig()
telemetryConfig := telemetry.DefaultConfig()

if args.singleMachine {
portOffset = i
Expand All @@ -220,6 +223,11 @@ func initTestnetFiles[T transaction.Tx](
Enable: true,
Address: fmt.Sprintf("127.0.0.1:%d", restPort+portOffset),
}

telemetryConfig = &telemetry.Config{
Enable: true,
Address: fmt.Sprintf("127.0.0.1:%d", telemetryPort+portOffset),
}
}

nodeDirName := fmt.Sprintf("%s%d", args.nodeDirPrefix, i)
Expand Down Expand Up @@ -355,7 +363,8 @@ func initTestnetFiles[T transaction.Tx](
grpcServer := grpc.NewWithConfigOptions[T](grpc.OverwriteDefaultConfig(grpcConfig))
grpcgatewayServer := grpcgateway.NewWithConfigOptions[T](grpcgateway.OverwriteDefaultConfig(grpcgatewayConfig))
restServer := rest.NewWithConfigOptions[T](rest.OverwriteDefaultConfig(restConfig))
server := serverv2.NewServer[T](serverCfg, cometServer, storeServer, grpcServer, grpcgatewayServer, restServer)
telemetryServer := telemetry.NewWithConfigOptions[T](telemetry.OverwriteDefaultConfig(telemetryConfig))
server := serverv2.NewServer[T](serverCfg, cometServer, storeServer, grpcServer, grpcgatewayServer, restServer, telemetryServer)
err = server.WriteConfig(filepath.Join(nodeDir, "config"))
if err != nil {
return err
Expand Down
Loading