Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

zombienet: test parachain upgrades #4599

Closed
pepyakin opened this issue Dec 24, 2021 · 7 comments · Fixed by #4660
Closed

zombienet: test parachain upgrades #4599

pepyakin opened this issue Dec 24, 2021 · 7 comments · Fixed by #4660
Assignees

Comments

@pepyakin
Copy link
Contributor

one common thing that I have to do from time to time locally is testing that upgrading a parachain works. It would be great if that was automated away.

Currently, I am using this script currently to automate the process locally: https://gist.github.com/pepyakin/2583ff3348c0188dc3b25cf3537f5f70

cc @pepoviola

@pepoviola pepoviola self-assigned this Dec 24, 2021
@pepoviola
Copy link
Contributor

Hi @pepyakin, Thanks for the gist! Let me work in the upgrade feature in zombienet and I will ping you to test.

@pepoviola
Copy link
Contributor

Hi @pepyakin, I have an initial implementation here using the simple smoke-test as base. Can you send me an upgrade file to test since I tested locally with one generated by another zombienet instance and I get this error from the api

  zombie::network-node blockNumber : 10 +2s
2021-12-24 16:27:47        RPC-CORE: subscribeRuntimeVersion(): RuntimeVersion:: -32603: Unknown error occurred: Client, Application, VersionInvalid, RuntimeConstruction, Other, \"cannot deserialize module: InvalidMagic\

Thanks!

@pepyakin
Copy link
Contributor Author

that's weird. Can you send me the file you are trying to send as an upgrade?

Do you have access to the built version of cumulus? If so, a valid wasm upgrade should be available target/release/wbuild/rococo-runtime/rococo_runtime.compact.compressed.wasm

@pepyakin
Copy link
Contributor Author

Ah perhaps that's a bad idea, we should maybe modify the binary there to avoid having the same code hash, see paritytech/cumulus#863

@ordian
Copy link
Member

ordian commented Dec 24, 2021

Having same code hash would also make it harder to test upgrade succeeded.

@pepoviola
Copy link
Contributor

pepoviola commented Dec 24, 2021

that's weird. Can you send me the file you are trying to send as an upgrade?

Do you have access to the built version of cumulus? If so, a valid wasm upgrade should be available target/release/wbuild/rococo-runtime/rococo_runtime.compact.compressed.wasm

Ah my bad, I was using the wasm generated by zombienet and not the one from cumulus. I will try with the right one and post the result here 👍.


update: Now the upgrade is ok but stop producing blocks.

environment:

    ✔ alice: chain upgrade with ./statemint_runtime.compact.compressed.wasm (10024ms)
Current status is Ready
Current status is {"broadcast":["12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp","12D3KooWCg6aHHcTEx3WSSduAgLtodSMRLMMzN9L4oQ8x3ui45Yh","12D3KooWDnSG18aSixRkNg75MYCpgDeXPo3GJKDx6ZxjyPLWGTYu"]}
  zombie::network-node blockNumber : 11 +10s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
  zombie::network-node blockNumber : 11 +2s
2021-12-24 18:08:30        API/INIT: Runtime version updated to spec=601, tx=4
2021-12-24 18:08:33        API/INIT: Runtime version updated to spec=601, tx=4
  zombie::network-node blockNumber : 11 +6s
2021-12-24 18:08:36        API/INIT: Runtime version updated to spec=9140, tx=0
2021-12-24 18:08:37        REGISTRY: Unknown signed extensions CheckNonZeroSender found, treating them as no-effect
2021-12-24 18:08:42        API/INIT: Runtime version updated to spec=9140, tx=0
2021-12-24 18:08:43        REGISTRY: Unknown signed extensions CheckNonZeroSender found, treating them as no-effect
Current status is {"retracted":"0x18967974e74cbf71a9c00e105d3ccf0de314523539000ff780c34f5c7688ba42"}

@ordian / @pepyakin did you have a different config to test?

Thanks!

@pepoviola
Copy link
Contributor

@pepyakin, upgrade test implemented in #4660.
Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants