Skip to content

Osmosis TestTube environments do not support reference-types #544

@mindbend0x

Description

@mindbend0x

Hello folks,

I'm building CosmWasm contracts with the following version for cosmwasm-std:

cosmwasm-std = { version = "2.2.2", features = [
    "cosmwasm_2_0",
    "staking",
] }

It uses the reference-types WASM feature which is supported on CosmWasm 2.2 onwards, however, this causes failures in any tests that use osmosis-test-tube.

I've tried to use the following flags to override the use of this feature but to no avail:

export RUSTFLAGS='-C link-arg=-s -C target-cpu=mvp -C target-feature=-reference-types'
export WASM_OPT='--disable-reference-types'

It seems like some package I'm using somewhere is forcing the inclusion of this feature.

A quick check with wasm-tools confirms the feature is included:

wasm-tools validate artifacts/some_contract.wasm --features=-reference-types

As a final note, I did try to simply optimize (optimizer v17.0) and upload the contracts to an actual testnet (running the necessary CosmWasmVM version) and it works fine.

My questions here are about the recommended path forward in this library and perhaps in the ecosystem in general:

  1. Would you recommend creating a PR that updates both osmosis-test-tube and cw-osmosis-test-tube to work with newer version of cosmwasm-std? Or to simply use another way to test (daemon, clone, etc..)?
    • Would love to continue using test tube as it's such a great way to simulate features that mutli-test does not fully support (such as staking).
  2. Is CW Orchestrator as a set of libs / packages planned for continued support or is it slowly sunsetting?
  3. What's CW Orch team's opinion around making a cw-orch-test-tube package to be a bit more generic over the other test-tube packages to enable including something like injective-test-tube more easily without requiring a new package to be published? I.e. without having to do the same thing that was done for cw-orch-neutron-test-tube.

Thank you for taking the time in advance.

P.S. cw-orch has been exemplary as a smart contracts testing tool, thank you for all the work you've put into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions