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

CosmWasm-VM cw xc interpreter contracts fails to upload because of cw-vm issue #picasso #cosmwasm #3952

Closed
dzmitry-lahoda opened this issue Jul 25, 2023 · 2 comments · Fixed by #4003

Comments

@dzmitry-lahoda
Copy link
Contributor

dzmitry-lahoda commented Jul 25, 2023

Description

Error:           Error: Command failed with exit code 1: bash -c /nix/store/zmg0pdcwqqmdlpa2h5q7zh7kwsszrn74-composable/bin/composable build-spec --chain /tmp/zombie-85c126a71a3702bb9c4f5b7bf88042db_-597335-T8xssAor9VJt/picasso-dev-2087-rococo-local-plain.json --disable-default-bootnode  --raw > /tmp/zombie-85c126a71a3702bb9c4f5b7bf88042db_-597335-T8xssAor9VJt/picasso-dev-2087-rococo-local-raw.json
2023-07-25 10:13:36 Building chain spec    
2023-07-25 10:13:36 assembling new collators for new session 0 at #0    
2023-07-25 10:13:36 assembling new collators for new session 1 at #0    

====================

Version: 8.10032.0-0000000000000000000000000000000000000000

   0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <pallet_cosmwasm::pallet::GenesisConfig<T> as frame_support::traits::hooks::GenesisBuild<T>>::build
   8: std::thread::local::LocalKey<T>::with
   9: sp_state_machine::basic::BasicExternalities::execute_with_storage
  10: <picasso_runtime::GenesisConfig as sp_runtime::BuildStorage>::assimilate_storage
  11: sp_runtime::BuildStorage::build_storage
  12: <sc_chain_spec::chain_spec::ChainSpec<G,E> as sc_chain_spec::ChainSpec>::as_json
  13: sc_service::chain_ops::import_blocks::build_spec
  14: sc_cli::commands::build_spec_cmd::BuildSpecCmd::run
  15: sc_cli::runner::Runner<C>::sync_run
  16: composable_node::command::run
  17: composable::main
  18: std::sys_common::backtrace::__rust_begin_short_backtrace
  19: std::rt::lang_start::{{closure}}
  20: std::rt::lang_start_internal
  21: main
  22: __libc_start_call_main
  23: __libc_start_main@@GLIBC_2.34
  24: _start


Thread 'main' panicked at 'contracts in genesis are valid: Module(ModuleError { index: 180, error: [4, 0, 0, 0], message: Some("CodeValidation") })', /build/source/parachain/frame/cosmwasm/src/lib.rs:410

This is a bug. Please report it at:

Steps to Reproduce

Try to deploy cw-xc-interpreter contract (is part of repo)

Expected vs. Actual Behavior

Upload not fails, like it not fails on Centauri

Environment

CosmWasm on Picasso.

May be needs fix/changed to CosmWasm VM repo https://github.com/ComposableFi/cosmwasm-vm

@dzmitry-lahoda dzmitry-lahoda changed the title cw xc interpreter contracts fails to upload because of cw-vm issue CosmWasm-VM cw xc interpreter contracts fails to upload because of cw-vm issue Jul 25, 2023
@dzmitry-lahoda
Copy link
Contributor Author

This is first blocker issue for Picasso XCVM. I will tackle it right after demo of ICS20 swap on Centauri and Osmosis

@dzmitry-lahoda dzmitry-lahoda changed the title CosmWasm-VM cw xc interpreter contracts fails to upload because of cw-vm issue CosmWasm-VM cw xc interpreter contracts fails to upload because of cw-vm issue #picasso #cosmwasm Jul 28, 2023
@dzmitry-lahoda
Copy link
Contributor Author

fixed

github-merge-queue bot pushed a commit that referenced this issue Aug 1, 2023
Some explanation is here cosmos/ibc-rs#803

So wasmd validation in cosmos will not find reference to code (which
never executes) it fails like floats anymore and will success upload.
Any attempt to strip float code failed (likely it anticipates input
which may contain floats in some case, which is not case to handle at
all).

Also had hard times with std because of centauri repo, added CI checks
to ensure we always good.

May be fixes #3952 too.

Required for merge:
- [x] `pr-workflow-check / draft-release-check` is ✅ success
- Other rules GitHub shows you, or can be read in
[configuration](../terraform/github.com/branches.tf)

Makes review faster:
- [x] PR title is my best effort to provide summary of changes and has
clear text to be part of release notes
- [x] I marked PR by `misc` label if it should not be in release notes
- [x] Linked Zenhub/Github/Slack/etc reference if one exists
- [x] I was clear on what type of deployment required to release my
changes (node, runtime, contract, indexer, on chain operation, frontend,
infrastructure) if any in PR title or description
- [x] Added reviewer into `Reviewers`
- [x] I tagged(`@`) or used other form of notification of one person who
I think can handle best review of this PR
- [x] I have proved that PR has no general regressions of relevant
features and processes required to release into production
- [x] Any dependency updates made, was done according guides from
relevant dependency
- Clicking all checkboxes 
- Adding detailed description of changes when it feels appropriate (for
example when PR is big)
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

Successfully merging a pull request may close this issue.

1 participant