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

Align toml properties for backward compatibility #117

Open
wirednkod opened this issue Oct 5, 2023 · 4 comments
Open

Align toml properties for backward compatibility #117

wirednkod opened this issue Oct 5, 2023 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@wirednkod
Copy link
Contributor

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 wirednkod added the bug Something isn't working label Oct 5, 2023
@wirednkod wirednkod self-assigned this Oct 6, 2023
@ordian
Copy link
Member

ordian commented Dec 22, 2023

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]

pepoviola added a commit that referenced this issue Feb 13, 2024
This PR lists some issues and suggested fixes for them (feel free to
pick them up separately and close this PR):

In addition to issues outlined in
#117 (comment),
here are some issues spotted when writing
https://github.com/paritytech/disabling-e2e-tests:
- runtime genesis patch is applied incorrectly (extra `/genesis` pointer
shouldn't be added)
- malus accepts
[subcommands](https://github.com/paritytech/polkadot-sdk/blob/4c0e0e071355c1048d75fba538c96c35ac743547/polkadot/zombienet_tests/functional/0008-dispute-old-finalized.toml#L25),
having a command with spaces not supported, so I added a subcommand
support
- some types need to be exported in order to be able to reuse
setup/helper functions across multiple tests
- test cleanup doesn't always work (zombie polkadot processes - not
fixed here)

---------

Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com>
@pepoviola
Copy link
Collaborator

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 pepoviola added the enhancement New feature or request label Mar 7, 2024
@ordian
Copy link
Member

ordian commented Mar 8, 2024

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 :)

@pepoviola
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants