zombienet-sdk icon indicating copy to clipboard operation
zombienet-sdk copied to clipboard

Align toml properties for backward compatibility

Open wirednkod opened this issue 2 years ago • 4 comments

While testing some existing tomls from Polkadot-sdk it came to our attention that there are properties on the toml that should be (?) optional in order to allow SDK to backwards work with existing toml files and tests;

An example is one of the simpliest tomls;

In order to try to spawn this network the following properties had to be (erroneously) added:

  • node_spawn_timeout (in [settings])
  • default_command (in [relaychain])
  • is_bootnode (in [[relaychain.nodes]])
  • balance = 200000000, cumulus_based = true, chain="some" (in [[parachains]])

We need to test that our code supports backward tests

wirednkod avatar Oct 05 '23 09:10 wirednkod

A few things I noticed are not backwards compatible:

# doesn't work:
[[relaychain.node_groups]] 
count = 2
# workaround:
[[relaychain.nodes]]
name = "node-0"
[[relaychain.nodes]]
name = "node-1"

# doesn't work
[parachains.collator]
# workaround:
[[parachains.collators]]

# doesn't work
[relaychain.genesis.runtimeGenesis.patch.configuration.config]

ordian avatar Dec 22 '23 17:12 ordian

A few things I noticed are not backwards compatible:

# doesn't work:
[[relaychain.node_groups]] 
count = 2
# workaround:
[[relaychain.nodes]]
name = "node-0"
[[relaychain.nodes]]
name = "node-1"

# doesn't work
[parachains.collator]
# workaround:
[[parachains.collators]]

# doesn't work
[relaychain.genesis.runtimeGenesis.patch.configuration.config]

Thanks for your feedback @ordian :) We decide to not port the groups logic to v2 (at least at the moment). Did you think could be still needed? I think we can provide a conversion from toml to sdk (rust).

Thx!

pepoviola avatar Mar 07 '24 19:03 pepoviola

Did you think could be still needed?

I think node groups is a cleaner syntax than manually specifying nodes when you need > 3 nodes and avoid typical copy-paste mistakes. But it's more of nice-to-have than a needed feature :)

ordian avatar Mar 08 '24 10:03 ordian

Great, thanks for your feedback. I will tracking as nice to have. Thx!

pepoviola avatar Mar 08 '24 11:03 pepoviola