terra-money / LocalTerra

One-click local Terra testnet and ecosystem for rapid prototyping

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terrad export genesis error

PabloInnocenti opened this issue · comments

commented

Hi Team!
We are trying to test the migration from col-4 to col-5 using Localterra.

On branch customize-exported-genesis after running docker-compose up, when inside terra_d container, if we run terrad migrate /root/.terra/config/genesis.json --chain-id=localterra --initial-height=1

it fail with Error

panic: JSON encoding of interfaces require non-empty type field.

stacktrace

panic: JSON encoding of interfaces require non-empty type field.

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/codec.(*LegacyAmino).MustUnmarshalJSON(...)
	github.com/cosmos/cosmos-sdk@v0.44.0/codec/amino.go:171
github.com/terra-money/core/app/legacy/v05.Migrate(0xc0000c6090, 0x0, 0x0, 0x0, 0x2cc34d8, 0xc00114b620, 0x7ffd3f682f2e, 0xa, 0x2ca87f0, 0xc00102dde0, ...)
	github.com/terra-money/core/app/legacy/v05/migrate.go:76 +0x2cb3
github.com/terra-money/core/app/legacy.MigrateGenesisCmd.func1(0xc000d95900, 0xc00114acf0, 0x1, 0x3, 0x0, 0x0)
	github.com/terra-money/core/app/legacy/migrate.go:80 +0x1f8
github.com/spf13/cobra.(*Command).execute(0xc000d95900, 0xc00114ac90, 0x3, 0x3, 0xc000d95900, 0xc00114ac90)
	github.com/spf13/cobra@v1.1.3/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000d95180, 0x0, 0x0, 0xc000ff9080)
	github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.1.3/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/cobra@v1.1.3/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc000d95180, 0xc000ff9080, 0xc, 0x2cbbbb8, 0xc00102dde0)
	github.com/cosmos/cosmos-sdk@v0.44.0/server/cmd/execute.go:36 +0x285
main.main()
	github.com/terra-money/core/cmd/terrad/main.go:15 +0x45

Where github.com/terra-money/core/app/legacy/migrate.go -> newGenState := legacy05.Migrate(initialState, clientCtx) -> v04Codec.MustUnmarshalJSON(appState[v039auth.ModuleName], &authGenState)

Is the genesis.json file correct? Is our command correct?
Thank you!

closing since we're past the migration, but let us know if you still need this figured out!