elesto-dao / elesto

The ElestoDAO node
Apache License 2.0
4 stars 1 forks source link

Simulations warning (AGAIN!) #201

Closed noandrea closed 2 years ago

noandrea commented 2 years ago

Looks like there is a problem with simulations and interchain accounts, here the stack trace of the simulation run:

exporting app state...
--- FAIL: TestAppSimulationAfterImport (23.48s)
panic: UnmarshalJSON cannot decode empty bytes [recovered]
    panic: UnmarshalJSON cannot decode empty bytes

goroutine 44 [running]:
testing.tRunner.func1.2({0x179a580, 0xc003413930})
    /snap/go/9848/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
    /snap/go/9848/src/testing/testing.go:1392 +0x39f
panic({0x179a580, 0xc003413930})
    /snap/go/9848/src/runtime/panic.go:838 +0x207
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get({{0x236e668, 0xc000eec310}, 0xc000010140, {0x2351918, 0xc000eedf10}, {0x2351968, 0xc000eedfd0}, {0xc000249d40, 0x7, 0x14}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.4/x/params/types/subspace.go:109 +0x307
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.Keeper.IsHostEnabled(...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/params.go:13
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.Keeper.GetParams({{0x2351918, 0xc000eedfb0}, {0x236e668, 0xc000eec310}, {{0x236e668, 0xc000eec310}, 0xc000010140, {0x2351918, 0xc000eedf10}, {0x2351968, ...}, ...}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/params.go:26 +0x148
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.ExportGenesis({{0x2364f38, 0xc000138000}, {0x236fba0, 0xc001c29500}, {{0x0, 0x0}, {0x0, 0x0}, 0x32, {0x0, ...}, ...}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/genesis.go:38 +0x1b8
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts.AppModule.ExportGenesis({{}, _, _}, {{0x2364f38, 0xc000138000}, {0x236fba0, 0xc001c29500}, {{0x0, 0x0}, {0x0, ...}, ...}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/module.go:181 +0x298
github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesis(_, {{0x2364f38, 0xc000138000}, {0x236fba0, 0xc001c29500}, {{0x0, 0x0}, {0x0, 0x0}, 0x32, ...}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.4/types/module/module.go:341 +0x125
github.com/elesto-dao/elesto/v2/app.(*App).ExportAppStateAndValidators(0xc00022f500, 0x0, {0x0, 0x0, 0x0})
    /home/andrea/Documents/workspaces/tendermint/elesto/elesto/app/export.go:34 +0x20b
github.com/cosmos/cosmos-sdk/simapp.CheckExportSimulation({0x7f64d02b5ba0, 0xc00022f500}, {{0x7fff644c9d32, 0x0}, {0x0, 0x0}, {0x7fff644c9d7a, 0x2a}, 0x0, {0x7fff644c9db6, ...}, ...}, ...)
    /home/andrea/.go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.4/simapp/utils.go:82 +0xc7
github.com/elesto-dao/elesto/v2/app_test.TestAppSimulationAfterImport(0xc000683040)
    /home/andrea/Documents/workspaces/tendermint/elesto/elesto/app/simulation_test.go:262 +0x82f
testing.tRunner(0xc000683040, 0x2151ce0)
    /snap/go/9848/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
    /snap/go/9848/src/testing/testing.go:1486 +0x35f
FAIL    github.com/elesto-dao/elesto/v2/app 23.523s
FAIL
gsora commented 2 years ago

This bug has been introduced with 2eebd9240b879639d07e2a3b5182a6c533f48145.

gsora commented 2 years ago

I think I know what's going on.

app.sm is missing the Interchain Accounts simulation module, so its state is not getting generated, but it gets exported somehow.

Bad thing: the Interchain Accounts module at version 3.0.0 doesn't support simulations.

gsora commented 2 years ago

Someone had our exact issue in May: https://github.com/cosmos/ibc-go/issues/1352

gsora commented 2 years ago

Turns out, even Akash has this issue: https://github.com/ovrclk/akash/pull/1669