paritytech / zombienet

A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them.
https://paritytech.github.io/zombienet/
GNU General Public License v3.0
159 stars 91 forks source link

Starting multiple networks in tests #788

Open serban300 opened 1 year ago

serban300 commented 1 year ago

We would like to write zombienet tests for the bridges project. Since a bridge connects 2 networks we would need the ability to start multiple networks as part of zndsl test.

If I understand correctly, right now a zndsl test definition supports only one network. I was wondering if it would be possible to add support for multiple networks.

If the proposal makes sense and if it's ok for you, I would be happy to implement this feature myself. I was thinking of the following very high-level approach:

  1. Allowing multiple Network: network_def.json lines in the .zndsl file and building a vector of networks when parsing it instead of a single network.
  2. I think we should assume that each network uses different node names. This would help preserve the current syntax and keep the code changes minimal.
  3. In the orchestrator iterating through the vector of networks and starting each one.
  4. I see that for the moment there is only one Client per zndsl run. We would probably need one per network. I'm not completely sure about this, but I guess there must be a solution.
pepoviola commented 1 year ago

Hi @serban300, thanks for the feedback, open this issue and the draft PR :) 🙌 .

We will open this new feature as discussion with the team and get back to you asap. I like the idea of running multiple-networks what I wonder what is the best api/config for users take advantage of this.

Thanks!!

cc @wirednkod