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): remove RunWithCtx (backport #21739) #21826

Merged
merged 4 commits into from
Sep 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
6 changes: 4 additions & 2 deletions server/v2/cometbft/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,10 @@ func setUpConsensus(t *testing.T, gasLimit uint64, mempool mempool.Mempool[mock.
ValidateTxGasLimit: gasLimit,
QueryGasLimit: gasLimit,
SimulationGasLimit: gasLimit,
InitGenesis: func(ctx context.Context, src io.Reader, txHandler func(json.RawMessage) error) error {
return nil
InitGenesis: func(ctx context.Context, src io.Reader, txHandler func(json.RawMessage) error) (store.WriterMap, error) {
_, st, err := mockStore.StateLatest()
require.NoError(t, err)
return branch.DefaultNewWriterMap(st), nil
},
}

Expand Down
6 changes: 3 additions & 3 deletions server/v2/cometbft/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ require (
cosmossdk.io/core v1.0.0 // main
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.4.1
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc // main
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc // main
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc // main
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8 // main
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8 // main
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8 // main
cosmossdk.io/store/v2 v2.0.0-20240916221850-7856d226038c // main
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
Expand Down
12 changes: 6 additions & 6 deletions server/v2/cometbft/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
cosmossdk.io/schema v0.3.0 h1:01lcaM4trhzZ1HQTfTV8z6Ma1GziOZ/YmdzBN3F720c=
cosmossdk.io/schema v0.3.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc h1:6lX4zEWS3jApSahbytOB0YVgdV4DEPK0pt06227h9Ng=
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc/go.mod h1:OOnpz5j7kFoqr9gSJ4vdM4tq6FXXuJJm7KlikmyTYKk=
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc h1:eEAmv+489lbcPJ+xWlyRR4CPCSBEYY7jJ7ayHYJwAfM=
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc/go.mod h1:qMT4t+uQP/gnfWtA3XTHsDCicXHRyYHxnLyEpRIHVxs=
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc h1:K7VVR3N2slgDcl+QMZp9LUpsrT1huGIiWoYBndagW/A=
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc/go.mod h1:e/pdNHJIOxL1wFKGkERDxLY0chj0+ZIetIPTkRgjX2o=
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8 h1:f9ngoXKselr0qkU0YWC0p/uvCI8/CqXBhzbx6jorQ/4=
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8/go.mod h1:OOnpz5j7kFoqr9gSJ4vdM4tq6FXXuJJm7KlikmyTYKk=
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8 h1:OyZVYhHSPxSCKJvxIh5QWFyPKUj0bV6PPIiuxnYGVcU=
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8/go.mod h1:/xDfniqVtn5nraiHkNJ4e6rYU0e83YAGsSjwmUA6H8k=
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8 h1:nPZQrhpMT26r8QZ7pLuJeWTFIeOFpq24y26P0ED4iW8=
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8/go.mod h1:e/pdNHJIOxL1wFKGkERDxLY0chj0+ZIetIPTkRgjX2o=
cosmossdk.io/store v1.0.0-rc.0.0.20240913190136-3bc707a5a214 h1:UUW0+2UgbDwQ452o2aw4DrVSWmowcad7DB7Vln+N94I=
cosmossdk.io/store v1.0.0-rc.0.0.20240913190136-3bc707a5a214/go.mod h1:ct8HATr+s48YYTRXEyP3HF33v9qEVWHMxwOL8P/v4iQ=
cosmossdk.io/store/v2 v2.0.0-20240916221850-7856d226038c h1:x0NX01A+QWckckb1hi9p8mYW4OXTYEzsohQK2qBtIHg=
Expand Down
1 change: 1 addition & 0 deletions simapp/v2/app_di.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func NewSimApp[T transaction.Tx](
// merge the AppConfig and other configuration in one config
appConfig = depinject.Configs(
AppConfig(),
runtime.DefaultServiceBindings(),
depinject.Supply(
logger,
viper,
Expand Down
10 changes: 5 additions & 5 deletions simapp/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ require (
cosmossdk.io/depinject v1.0.0
cosmossdk.io/log v1.4.1
cosmossdk.io/math v1.3.0
cosmossdk.io/runtime/v2 v2.0.0-20240916221850-7856d226038c // main
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc // main
cosmossdk.io/runtime/v2 v2.0.0-20240920095614-aa90bb43d8f8 // main
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8 // main
cosmossdk.io/server/v2/cometbft v0.0.0-00010101000000-000000000000
cosmossdk.io/store/v2 v2.0.0-20240916221850-7856d226038c // main
cosmossdk.io/tools/confix v0.0.0-00010101000000-000000000000
Expand Down Expand Up @@ -56,8 +56,8 @@ require (
cosmossdk.io/errors v1.0.1 // indirect
cosmossdk.io/errors/v2 v2.0.0-20240731132947-df72853b3ca5 // indirect
cosmossdk.io/schema v0.3.0 // indirect
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc // indirect; main
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc // indirect; main
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8 // indirect; main
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8 // indirect; main
cosmossdk.io/store v1.1.1-0.20240909133312-50288938d1b6 // indirect; main
cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect
Expand Down Expand Up @@ -249,7 +249,7 @@ replace (
cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main
cosmossdk.io/client/v2 => ../../client/v2
// pseudo version lower than the latest tag
cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.3 // main
cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.3.0.20240920095614-aa90bb43d8f8 // main
cosmossdk.io/server/v2/cometbft => ../../server/v2/cometbft
// pseudo version lower than the latest tag
cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240913190136-3bc707a5a214 // main
Expand Down
20 changes: 10 additions & 10 deletions simapp/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 h1:YV9M+9pClbzPncO5XMSc3kI
cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897/go.mod h1:oqpDMZQpEgSo0Cm4F+0yxoC9UQbo/SlodZR4zeOqBsE=
cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab h1:E/IWad76v1Nc4Atswaccpt7twJ0VwHkbY94/PhmZfTo=
cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab/go.mod h1:Or+5eVAo1aiS1DnPK90eQykGc59LGBWtqwBoJcxXTmw=
cosmossdk.io/core v1.0.0-alpha.3 h1:pnxaYAas7llXgVz1lM7X6De74nWrhNKnB3yMKe4OUUA=
cosmossdk.io/core v1.0.0-alpha.3/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY=
cosmossdk.io/core v1.0.0-alpha.3.0.20240920095614-aa90bb43d8f8 h1:kBXv2cxy3M6nGQozQBAg6fmzeLT839GRuOy3CuITDbY=
cosmossdk.io/core v1.0.0-alpha.3.0.20240920095614-aa90bb43d8f8/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY=
cosmossdk.io/core/testing v0.0.0-20240913164418-aaf72f20c10b h1:uEMbr7Hdpz0fU+GXU6mSN2vgoQnr66WYUpRuiba2aEk=
cosmossdk.io/core/testing v0.0.0-20240913164418-aaf72f20c10b/go.mod h1:FllCSj/ZYskfb982HKqBSISO8DkBY4Euqq768HSFz68=
cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050=
Expand All @@ -210,16 +210,16 @@ cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM=
cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU=
cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
cosmossdk.io/runtime/v2 v2.0.0-20240916221850-7856d226038c h1:vnh9YoW/8fyrSpkyhHnUk3DymwmpE5U2ooRdJImfwEo=
cosmossdk.io/runtime/v2 v2.0.0-20240916221850-7856d226038c/go.mod h1:d0B92058w/s/Yegf0ySClPPJn+Vp7Cz+H3ORggSSGm4=
cosmossdk.io/runtime/v2 v2.0.0-20240920095614-aa90bb43d8f8 h1:Pt87wX5wD/skW7ALfiHrIBzB7HNKPNzYKwLXHs/52vA=
cosmossdk.io/runtime/v2 v2.0.0-20240920095614-aa90bb43d8f8/go.mod h1:hKm9tvxe1a82KH2KfPlAaFk31cjNIC/N8KGQzuwmfi4=
cosmossdk.io/schema v0.3.0 h1:01lcaM4trhzZ1HQTfTV8z6Ma1GziOZ/YmdzBN3F720c=
cosmossdk.io/schema v0.3.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc h1:6lX4zEWS3jApSahbytOB0YVgdV4DEPK0pt06227h9Ng=
cosmossdk.io/server/v2 v2.0.0-20240918153713-01212de2d9dc/go.mod h1:OOnpz5j7kFoqr9gSJ4vdM4tq6FXXuJJm7KlikmyTYKk=
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc h1:eEAmv+489lbcPJ+xWlyRR4CPCSBEYY7jJ7ayHYJwAfM=
cosmossdk.io/server/v2/appmanager v0.0.0-20240918153713-01212de2d9dc/go.mod h1:qMT4t+uQP/gnfWtA3XTHsDCicXHRyYHxnLyEpRIHVxs=
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc h1:K7VVR3N2slgDcl+QMZp9LUpsrT1huGIiWoYBndagW/A=
cosmossdk.io/server/v2/stf v0.0.0-20240918153713-01212de2d9dc/go.mod h1:e/pdNHJIOxL1wFKGkERDxLY0chj0+ZIetIPTkRgjX2o=
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8 h1:f9ngoXKselr0qkU0YWC0p/uvCI8/CqXBhzbx6jorQ/4=
cosmossdk.io/server/v2 v2.0.0-20240920095614-aa90bb43d8f8/go.mod h1:OOnpz5j7kFoqr9gSJ4vdM4tq6FXXuJJm7KlikmyTYKk=
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8 h1:OyZVYhHSPxSCKJvxIh5QWFyPKUj0bV6PPIiuxnYGVcU=
cosmossdk.io/server/v2/appmanager v0.0.0-20240920095614-aa90bb43d8f8/go.mod h1:/xDfniqVtn5nraiHkNJ4e6rYU0e83YAGsSjwmUA6H8k=
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8 h1:nPZQrhpMT26r8QZ7pLuJeWTFIeOFpq24y26P0ED4iW8=
cosmossdk.io/server/v2/stf v0.0.0-20240920095614-aa90bb43d8f8/go.mod h1:e/pdNHJIOxL1wFKGkERDxLY0chj0+ZIetIPTkRgjX2o=
cosmossdk.io/store v1.0.0-rc.0.0.20240913190136-3bc707a5a214 h1:UUW0+2UgbDwQ452o2aw4DrVSWmowcad7DB7Vln+N94I=
cosmossdk.io/store v1.0.0-rc.0.0.20240913190136-3bc707a5a214/go.mod h1:ct8HATr+s48YYTRXEyP3HF33v9qEVWHMxwOL8P/v4iQ=
cosmossdk.io/store/v2 v2.0.0-20240916221850-7856d226038c h1:x0NX01A+QWckckb1hi9p8mYW4OXTYEzsohQK2qBtIHg=
Expand Down
1 change: 1 addition & 0 deletions simapp/v2/simdv2/cmd/root_di.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func NewRootCmd[T transaction.Tx]() *cobra.Command {
if err := depinject.Inject(
depinject.Configs(
simapp.AppConfig(),
runtime.DefaultServiceBindings(),
depinject.Supply(log.NewNopLogger()),
depinject.Provide(
codec.ProvideInterfaceRegistry,
Expand Down
Loading