AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Replace Zombienet with Chopsticks #657

Open NachoPal opened 8 months ago

NachoPal commented 8 months ago

I am trying to replace Zombient with Chopsticks as a local testnet, but unfortunately I am facing some issues/limitations that make it not possible yet.

There are two different ways of using Chopsticks to deploy a network:

1. Running chains from genesis files

xlc commented 8 months ago

you could try use https://github.com/open-web3-stack/parachain-launch to generate genesis with hrmp channel opened

the block production shouldn’t be too slow with runtime upgrade. one reason could make it slow is migration modifying a lot of data

ermalkaleci commented 8 months ago

https://github.com/AcalaNetwork/chopsticks/pull/641 this will make migration run faster if you have specified a cache db

NachoPal commented 8 months ago

Sorry, I posted the issue by mistake before completion. Please check it again.

NachoPal commented 8 months ago

one reason could make it slow is migration modifying a lot of data

Yes, exactly, that is the problem. I am trying to automate the testing process, but I can not really continue the testing flow after a runtime upgrade.

Add some kind of event I can subscribe to know when the migration has ended to resume running my tests This might do the trick for a simple solution

The problem is that the block is produced, even the runtime spec_version updated, but Chopsticks is unresponsive because it is still doing the runtime migration. The block shouldn't be produced until the migration is done. That would also solve the issue, because I can await in my tests.

NachoPal commented 8 months ago
  • Block should not be produced until migration is done.
  • While it doesn't resolve the problem of slow migrations, at least I can automate the process of running the tests.

I think this is probably the easiest and optimal solution.

ermalkaleci commented 8 months ago

not sure what you mean. block is not produced before migration