Skip to content

Commit

Permalink
Upgraded CosmWasm runtime in Picasso to latest dependencies (#3677)
Browse files Browse the repository at this point in the history
- allowed to run parity and cosmos rust code in same wasm contract and
fancy staff for precompiles
- updated host with host call depth
ComposableFi/cosmwasm-vm#36
- removed reexport of cw std
- updated cw to version 1.2.+
- updated XCVM spec with interpetere != account, removed autogenerated
obsolete ToC, made more clear impl contracts vs logic , removed mosaic
died long ago
- renamed XCVM to XC as XCVM long and hard to type, and really it is
more about xc/swaps/mev rather than VM, which uses some VMs
- made features, std, no_std, right as i could
- forks will be replaced by forks into composablefi under
`<name>-no-std` later . all forks are PRs and issues on CW team repos
- unified deps into workspace deps
- started to use cw_serde fancy API to CW
- added XC to CI
- XCVM tests where failing with `cargo-package-build> thread
'tests::suite::cross_chain::test_simple_crosschain_xcvm_transfer'
panicked at 'Must be able ` which was before my commit anyway
- go over CW pallet guide - contracts work on Picasso


![image](https://github.com/ComposableFi/composable/assets/757125/3d5e1640-c5aa-4260-84c8-093c29fb82da)


- [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
- [ ] I have linked Zenhub/Github or any other reference item 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
- [ ] I waited and did best effort for `pr-workflow-check /
draft-release-check` to finish with success(green check mark) with my
changes
- [x] I have added at least one reviewer in reviewers list
- [ ] 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
  • Loading branch information
dzmitry-lahoda authored Jun 12, 2023
1 parent c2af1db commit e09e0b3
Show file tree
Hide file tree
Showing 77 changed files with 1,214 additions and 908 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,38 @@ jobs:
- id: ok
run: echo "ok=true" >> "$GITHUB_OUTPUT"

build-cosmos-cosmwasm:
outputs:
ok: ${{ steps.ok.outputs.ok }}
name: build-cosmos-cosmwasm
needs:
- privilege-check
runs-on:
- x86_64-linux-32C-128GB-2TB
concurrency:
group: ${{ inputs.github_workflow }}-build-cosmos-cosmwasm-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Set up Cachix
if: ${{ inputs.flow == 'push' || inputs.flow == 'pr_from_branch' }}
uses: cachix/cachix-action@586bf280495080c5a6d4868237ad28a860e4b309
with:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
name: composable-community
- uses: actions/checkout@v3
if: ${{ inputs.flow == 'push' || inputs.flow == 'pr_from_branch' }}
with:
lfs: true
ref: ${{ inputs.github_event_pull_request_head_sha || github.sha }}
persist-credentials: false
- name: Build all packages
if: ${{ inputs.flow == 'push' || inputs.flow == 'pr_from_branch' }}
uses: "./.github/templates/watch-exec"
with:
command: nix -- build .#xcvm-tests --keep-going
- id: ok
run: echo "ok=true" >> "$GITHUB_OUTPUT"

build-all-ci-packages:
name: build-all-ci-packages
outputs:
Expand Down Expand Up @@ -520,7 +552,6 @@ jobs:
files: |
release-artifacts/to-upload/*
# this should be split and commit docker are from here, but latest from release
push-docker-images:
name: push-docker-images
if: ${{ inputs.github_event_name == 'push' || (inputs.github_event_name == 'pull_request' && inputs.github_event_pull_request_head_repo_id == 383289760) }}
Expand Down Expand Up @@ -559,11 +590,6 @@ jobs:
lfs: true
ref: ${{ inputs.github_event_pull_request_head_sha || github.sha }}
persist-credentials: false
- name: Nix flake show
run: |
nix --version
nix show-config
nix flake show --allow-import-from-derivation --show-trace --fallback --debug --print-build-logs --keep-failed
- name: Build all packages
uses: "./.github/templates/watch-exec"
with:
Expand Down
141 changes: 119 additions & 22 deletions code/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -323,25 +323,25 @@ subxt = { git = "https://github.com/paritytech/subxt", rev = "2a913a3aa99a07f7ac
# Only needed until the configs get merged into xcm-builder: https://github.com/paritytech/polkadot/pull/7165
invarch-xcm-builder = { git = "https://github.com/InvArch/InvArch-XCM-Builder", rev = "c704c0f2d4c436f96eff10d06c197527b46b3536", default-features = false }

wasm-instrument = { version = "0.4.0", default-features = false }
wasmi = { version = "0.30.0", default-features = false }
wasmi-validation = { version = "0.5", default-features = false }

cosmwasm-vm = { git = "https://github.com/ComposableFi/cosmwasm-vm", rev = "c2a4fe2c764710c0db15c571135bc37619a289d5", default-features = false, features = [
"ibc3",
"iterator",
"stargate",
] }
cosmwasm-vm-wasmi = { git = "https://github.com/ComposableFi/cosmwasm-vm", rev = "c2a4fe2c764710c0db15c571135bc37619a289d5", default-features = false, features = [
cosmwasm-vm = { git = "https://github.com/ComposableFi/cosmwasm-vm", rev = "71520ece331c3d759f1cdb2a2f7e8d4e26bbffe9", default-features = false }
cosmwasm-vm-wasmi = { git = "https://github.com/ComposableFi/cosmwasm-vm", rev = "71520ece331c3d759f1cdb2a2f7e8d4e26bbffe9", default-features = false }
serde-json-wasm = { git = "https://github.com/dzmitry-lahoda-forks/serde-json-wasm", rev = "8a7e522c0e4de36a6dfb535766f26a9941017d81", default-features = false }

cosmwasm-std = { git = "https://github.com/dzmitry-lahoda-forks/cosmwasm", rev = "1277597cbf380a8d04dbe676d9cb344ca31634b6", default-features = false, features = [
"iterator",
"stargate",
"cosmwasm_1_2",
] }


serde = { version = '1.0.136', default-features= false, features = ["derive"] }

serde_json = { version = "1.0.82", default-features = false, features = [
"alloc",
] }

serde-json-wasm = { version = "0.5.1", default-features = false }

#######################################
# DO NOT DELETE PATCHES, BUT COMMENT OUT
Expand Down
Loading

0 comments on commit e09e0b3

Please sign in to comment.