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

feat(cw-xc): faster cosmos devnet with fix for interpreter instantiation #4041

Merged
merged 14 commits into from
Aug 10, 2023

Conversation

dzmitry-lahoda
Copy link
Contributor

@dzmitry-lahoda dzmitry-lahoda commented Aug 8, 2023

So I tuned some bash configs of XCVM, improve startup time of cosmos net for dev, and continue to run transfer.
Transfer failed because of CosmWasm/cosmwasm#1810 . So fix was to make short name for interpreter. Hash may fail too, so used counter id.

I think in next iter should use network prefixed counter. So that can have global interpreter ids, but no must.

Tested by running cosmos devnet oneliner to setup xcvm. And forced create interpreter for user.

Also I split XCVM admin key and other admin key, so these processes can do tx in parallel, as it visible in devnet init graph.

Also started doing some logging for sanity

{"level":"info","process":"centauri","replica":1,"message":"{\"force_instantiate\":{\"user_origin\":\"centauri1e0nh3davd6d3yh73sldwndww7zchetwsae8m9rz9x6hlg7w4ysrqhmaqju\"}}"}
{"level":"info","process":"centauri","replica":1,"message":"xcvm:: {\"id\":0,\"result\":{\"ok\":{\"events\":[{\"type\":\"instantiate\",\"attributes\":[{\"key\":\"_contract_address\",\"value\":\"centauri1tlcw3llaxzs3jam7yheqxhr3k0n4y5sfrnah72n6aqt0rlp4xq6qpjy5cc\"},{\"key\":\"code_id\",\"value\":\"2\"}]},{\"type\":\"wasm-xcvm.interpreter\",\"attributes\":[{\"key\":\"_contract_address\",\"value\":\"centauri1tlcw3llaxzs3jam7yheqxhr3k0n4y5sfrnah72n6aqt0rlp4xq6qpjy5cc\"},{\"key\":\"data\",\"value\":\"eyJ1c2VyX29yaWdpbiI6eyJuZXR3b3JrX2lkIjoyLCJ1c2VyX2lkIjoiNjM2NTZlNzQ2MTc1NzI2OTMxNjUzMDZlNjgzMzY0NjE3NjY0MzY2NDMzNzk2ODM3MzM3MzZjNjQ3NzZlNjQ3Nzc3Mzc3YTYzNjg2NTc0Nzc3MzYxNjUzODZkMzk3MjdhMzk3ODM2Njg2YzY3Mzc3NzM0Nzk3MzcyNzE2ODZkNjE3MTZhNzUifSwic2FsdCI6IjY0NjU2NjYxNzU2Yzc0In0=\"}]}],\"data\":\"CkNjZW50YXVyaTF0bGN3M2xsYXh6czNqYW03eWhlcXhocjNrMG40eTVzZnJuYWg3Mm42YXF0MHJscDR4cTZxcGp5NWNj\"}}}"}
{"level":"info","process":"centauri","replica":1,"message":"xcvm:: saved interpreter"}

Required for merge:

  • pr-workflow-check / draft-release-check is ✅ success
  • Other rules GitHub shows you, or can be read in configuration

Makes review faster:

  • PR title is my best effort to provide summary of changes and has clear text to be part of release notes
  • I marked PR by misc label if it should not be in release notes
  • Linked Zenhub/Github/Slack/etc reference if one exists
  • 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
  • Added reviewer into Reviewers
  • I tagged(@) or used other form of notification of one person who I think can handle best review of this PR
  • I have proved that PR has no general regressions of relevant features and processes required to release into production
  • 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)

@dzmitry-lahoda dzmitry-lahoda changed the title feat(cw-xc): centauri osmosis transfer feat(cw-xc): centauri osmosis transfer #wip #draft Aug 8, 2023
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Pull reviewers stats

Stats of the last 30 days for composable:

User Total reviews Time to review Total comments
dzmitry-lahoda 22 10h 54m 20
RustNinja 19 1h 31m 2
blasrodri 16 1h 23m 12
mina86 10 23h 14m 69
kkast 10 10h 43m 4
vmarkushin 2 1h 8m 0
0xBrainjar2 1 3d 17h 35m 6
josietyleung 1 1d 20h 28m 3
JafarAz 1 9h 25m 0

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

# run Composable node
nix run "github:ComposableFi/composable/refs/pull/4041/merge" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed
# run local Picasso DevNet (for CosmWasm development)
nix run "github:ComposableFi/composable/refs/pull/4041/merge#devnet-picasso" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# CosmWasm on Substrate CLI tool
nix run "github:ComposableFi/composable/refs/pull/4041/merge#ccw" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# run cross chain devnet with Dotsama and Cosmos nodes 
nix run "github:ComposableFi/composable/refs/pull/4041/merge#devnet-xc-fresh" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# or same with docker
nix build "github:ComposableFi/composable/refs/pull/4041/merge#devnet-xc-image" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed \
&& docker load --input result && docker run -it --entrypoint bash devnet-xc:latest -c /bin/devnet-xc-fresh 

About nix

@dzmitry-lahoda dzmitry-lahoda changed the title feat(cw-xc): centauri osmosis transfer #wip #draft feat(cw-xc): faster cosmos devnet with fix for interpreter instantiation Aug 9, 2023
@dzmitry-lahoda dzmitry-lahoda added the Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform label Aug 9, 2023
@dzmitry-lahoda dzmitry-lahoda marked this pull request as ready for review August 9, 2023 20:24
@dzmitry-lahoda dzmitry-lahoda added this pull request to the merge queue Aug 10, 2023
Merged via the queue into main with commit 4f5277f Aug 10, 2023
33 checks passed
@dzmitry-lahoda dzmitry-lahoda deleted the dz/311 branch August 10, 2023 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants