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

createAppAndExport does not send the correct wasm home directory to wasm keeper #457

Closed
4 tasks
channa-figure opened this issue Aug 30, 2021 · 1 comment · Fixed by #458
Closed
4 tasks
Assignees
Labels
bug Something isn't working wasm
Milestone

Comments

@channa-figure
Copy link
Contributor

channa-figure commented Aug 30, 2021

Summary of Bug

When running the export command wasm contracts are not found and the process panics. The whole export process fails at this point. This is due to the home path of wasm keeper not being set correctly during the export setup.

a = app.New(logger, db, traceStore, false, map[int64]bool{}, "", cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), encCfg, appOpts)

We are setting the home directory to "" in the code above.

The correct home path should match how the wasmd keeper is being setup in the app.go

wasmDir := filepath.Join(homePath, "data", "wasm")

Proposed fix would be to setup the wasm home path from command parameter or default to ""

Version

v1.5.0

Steps to Reproduce

With a chain that has wasm contracts loaded.

1.) provenanced export -t --home <homedir>

Produces:

panic: Error calling the VM: Cache error: Error opening Wasm file for reading: No such file or directory (os error 2)


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@channa-figure channa-figure added bug Something isn't working wasm labels Aug 30, 2021
@channa-figure channa-figure added this to the backlog milestone Aug 30, 2021
@iramiller
Copy link
Member

Previously identified here: cosmos/cosmos-sdk#8150 and resolved in this PR cosmos/cosmos-sdk#8194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wasm
Projects
Development

Successfully merging a pull request may close this issue.

2 participants