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

v0.10.5 gives error with "max_wasm_code_size" on genesis file, doesn't sync from scratch #285

Open
3 tasks done
AronVanAmmers opened this issue Sep 30, 2022 · 3 comments
Open
3 tasks done

Comments

@AronVanAmmers
Copy link
Contributor

Prerequisites

Expected Behavior

Using the latest genesis file: https://github.com/fetchai/genesis-fetchhub/blob/main/fetchhub-4/data/genesis_migrated_5300200.json

Renamed to genesis.json, and placed in the config/ path of the node, the output of fetchd validate-genesis genesis.json should not list any errors. A new, fresh node should be able to start syncing from this genesis file.

Current Behavior

The output of `fetchd validate-genesis is:

Error: error validating genesis file genesis.json: unknown field "max_wasm_code_size" in types.Params
Usage:
  fetchd validate-genesis [file] [flags]

Flags:
  -h, --help   help for validate-genesis

Global Flags:
      --home string         directory for config and data (default "/home/fetchd/.fetchd")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors

When starting the node, this check is also done, and the node crashes with panic message.

Partial log showing the error:

5:12PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=v0.10.5
5:12PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
5:12PM INF asserting crisis invariants inv=1/11 module=x/crisis name=distribution/nonnegative-outstanding
5:12PM INF asserting crisis invariants inv=2/11 module=x/crisis name=distribution/can-withdraw
5:13PM INF asserting crisis invariants inv=3/11 module=x/crisis name=distribution/reference-count
5:13PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/module-account
5:13PM INF asserting crisis invariants inv=5/11 module=x/crisis name=staking/module-accounts
5:13PM INF asserting crisis invariants inv=6/11 module=x/crisis name=staking/nonnegative-power
5:13PM INF asserting crisis invariants inv=7/11 module=x/crisis name=staking/positive-delegation
5:13PM INF asserting crisis invariants inv=8/11 module=x/crisis name=staking/delegator-shares
5:13PM INF asserting crisis invariants inv=9/11 module=x/crisis name=bank/nonnegative-outstanding
5:13PM INF asserting crisis invariants inv=10/11 module=x/crisis name=bank/total-supply
5:13PM INF asserting crisis invariants inv=11/11 module=x/crisis name=gov/module-account
5:13PM INF asserted all invariants duration=45141.050308 height=5300201 module=x/crisis
panic: unknown field "max_wasm_code_size" in types.Params
goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/codec.(*ProtoCodec).MustUnmarshalJSON(0x0?, {0xc002fac000?, 0x0?, 0x0?}, {0x2507550?, 0xc022b85800?})
        github.com/cosmos/[email protected]/codec/proto_codec.go:176 +0x45
github.com/CosmWasm/wasmd/x/wasm.AppModule.InitGenesis({{}, {_, _}, _, {_, _}, {_, _}, {_, _}}, ...)
        github.com/CosmWasm/[email protected]/x/wasm/module.go:161 +0xc2

The panic does not occur on a node that already has chain data. The output of fetchd validate-genesis genesis.json does show the error there however.

To Reproduce

See above.

Context

Fetchd 0.10.5. In the above case the synced node is Ubuntu 20.04 and the fresh node is Ubuntu 22.04. I think it's unlikely that the OS version difference would cause this. I will manually get chain data to the fresh node and test whether the panic then still occurs and update this issue to confirm.

Failure Logs

No response

@erNail
Copy link

erNail commented Jun 30, 2023

I have exactly the same problem with the docker image fetchai/fetchd:0.10.7 with Testnet Dorado

EDIT: As a workaround, i am currently using this genesis file
EDIT 2: Experiencing the same issue on Mainnet

@penghian
Copy link

hi, i am currently facing the same issue, was wondering if you guys manage to solve it.

i took the snapshot from fetch.ai's official docs and still no luck

Screenshot 2023-12-15 at 7 12 23 PM

its able to read the database as you can see there is block height, but same error occurred

@penghian
Copy link

small update to anyone in the future, if syncing from 0 it does not work as cosmos sdk now has a new paramenter
use snapshot from fetch.ai docs

after doing initialisation from the node remove the wasm folder
unpack snapshot to ur .fetchd folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants