Skip to content
Snippets Groups Projects
  1. Aug 28, 2024
    • Javier Viola's avatar
      support single collator config in `toml` (#253) · 9f8845dc
      Javier Viola authored
      `v1` version support define a parachain with a single collator using
      `[parachain.collator]` (note this is a map and not a sequence). But in
      the `sdk` we drop support in favor of always use a vec<NodeConfig>. This
      pr allow to use the old toml definition __only__ with the load_from_toml
      method.
      
      cc:  @AlexD10S
  2. Jul 20, 2024
  3. May 23, 2024
    • Javier Viola's avatar
      Feat: Allow to set `base_dir` (#219) · 2ad235c0
      Javier Viola authored
      This pr introduce the ability to set the `base_dir` used by the
      `namespace`. This allow users to reuse the same node's directories
      (config and database) and re-start the network from the latest state in
      sequential runs.
      
      Thx!
      
      fix #218
  4. May 08, 2024
  5. May 04, 2024
  6. Apr 30, 2024
  7. Mar 18, 2024
  8. Mar 16, 2024
  9. Mar 08, 2024
  10. Mar 03, 2024
  11. Feb 26, 2024
  12. Feb 25, 2024
  13. Feb 23, 2024
  14. Feb 13, 2024
    • ordian's avatar
      Some issues spotted (#145) · 465a12f4
      ordian authored
      
      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
      https://github.com/paritytech/zombienet-sdk/issues/117#issuecomment-1867941395,
      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: default avatarJavier Viola <363911+pepoviola@users.noreply.github.com>
  15. Nov 29, 2023
    • Javier Viola's avatar
      feat: add parachains to a running network (#142) · 9ba4b139
      Javier Viola authored
      This pr make possible to add a new parachain to a running network (see
      `add_para.rs` example), for that we allow to create a new parachain
      config (using the same builder but in a different context) like this:
      
      ```rs
      let para_config = network.para_config_builder()
              .with_id(100)
              .with_default_command("polkadot-parachain")
              .with_collator(|c| {
                  c.with_name("col-100-1")
              })
              .build()?;
      ```
      And then deploy that parachain by calling `add_parachain` (the second
      parameter of the fn allow to use a custom chain-spec for the
      relaychain).
      
      ```rs
      network.add_parachain(&para_config, None).await?;
      ```
      
      // TODO:
      - [x] docs
      - [ ] test (integration)
  16. Nov 26, 2023
  17. Nov 12, 2023
  18. Oct 24, 2023
  19. Oct 06, 2023
  20. Oct 05, 2023
  21. Oct 03, 2023
  22. Sep 29, 2023
    • Javier Viola's avatar
      Wire between Orchestrator - Provider (#101) · 8f8b03fd
      Javier Viola authored
      
      * wip, refactor provider trait
      
      * fmt
      
      * wip
      
      * wip, add from_config to NetworkSpec
      
      * config reorgs
      
      * add logic for create NetworkSpec
      
      * feat: refactored FileSystem trait and errors
      
      * chore: removed unused local_file, stdout will be hardcoded in provider at the moment
      
      * feat: moved MockFileSystem to InMemoryFileSystem, files too, and added mirror implementation of tokio::fs with tests
      
      * feat: added new method append to FileSystem trait
      
      * feat: implemented new append method on InMemoryFileSystem
      
      * feat: added anyhow dependencies to support crate
      
      * feat: refactored FileSystem trait to expose only a single wrapped error
      
      * feat: refacto InMemoryFileSystem following FileSystem trait refacto
      
      * feat: added conversion between io::Error and FileSystemError
      
      * feat: added implementation of LocalFileSystem using tokio::fs
      
      * feat: added nix crate dependency to workspace and provider crate
      
      * feat: added uuid with v4 as dev-dependencies for testing in support crate
      
      * feat: added unit tests for LocalFileSystem
      
      * feat: updated Provider, ProviderNamespace and ProviderNode traits and related DTO
      
      * feat: added anyhow as dependency to provider crate
      
      * feat: updated ProviderError
      
      * feat: work on NativeProvider with individual Node, Namespace and Provider struct threadsafe using RwLock and Arc, added implementation logic of resume/restart/pause, destroy and helpers for logs
      
      * feat: rename some provider constants
      
      * wip
      
      * feat: added uuid with v4 features as normal dependency
      
      * feat: added new set_mode method on FileSystem trait to modify permissions bits, added implementations and tests
      
      * feat: added builder for options types used in provider traits methods, moved error next to provider traits
      
      * feat: added modified implementation of run_script/run_command/copy_from_node in NativeProvider, removed unused comments
      
      * feat: moved filesystem, capabilities and tmp_dir out of NativeProviderInner
      
      * wip on network spec creation
      
      * move chain_spec to generators
      
      * change defaults for validator/invulnerable settings
      
      * Add test and clean-ups
      
      * nits and clean
      
      * fmt
      
      * fmt
      
      * fix docs/clippy
      
      * fixes from clippy
      
      * add TODO and allow dead_code for now
      
      * fmt
      
      * more nits
      
      * fmt
      
      * feat: make constructors and fields public for testing on InMemoryFileSystem
      
      * feat: removed unused types atm and added TransferedFile
      
      * feat: updated types for Provider methods output, updated non needed async methods
      
      * feat: added generate_files implementation on namespace using temporary nodes, moved some non mutable fields out of inners
      
      * feat: removed comment
      
      * feat: refactored provider types and added builders
      
      * feat(orchestrator) add generators
      
      * feat(orchestrator) add logic to compute the network spec
      
      * small changes in provider trait and native impl
      
      * wip, example to drive exec
      
      * make paras working, first design draft of network public api
      
      * cleanups
      
      * add spawner
      
      * add logic to add new nodes to running network and methods on nodes
      
      * modify example
      
      * fmt
      
      * allow to add collators to a running network
      
      * modify example
      
      * move Network related structs
      
      * reorg code
      
      * fmt
      
      * fixes and clean-up
      
      * removed commented code
      
      * clippy
      
      * fmt
      
      * clippy
      
      * fmt
      
      * clippy in example
      
      * fix validator/invulnerable true as default
      
      * fmt
      
      * fix base_dir for mac/linux compat
      
      * fix, allow generate files with fullpaths (encapsualate as part of the ns)
      
      * Add todos
      
      * fix p2p port for full_node in collator
      
      * fix p2p port for full_node in collator
      
      * clippy
      
      * fmt
      
      * Update crates/orchestrator/src/network_spec/node.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/network_spec/relaychain.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/generators/chain_spec.rs
      
      Co-authored-by: default avatarNikos Kontakis <wirednkod@gmail.com>
      
      * Update crates/examples/examples/small_network_with_default.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/generators/bootnode_addr.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/network_spec/node.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/network_spec/node.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * Update crates/orchestrator/src/network_spec/relaychain.rs
      
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      
      * changes from feedback
      
      * reorg deps
      
      * clippy/fmt
      
      * reorg generators and add some unittest
      
      * more unittest and cleans
      
      * fmt/clippy
      
      * fmt/clippy
      
      * add TODOs from feedback
      
      ---------
      
      Co-authored-by: default avatarl0r1s <contact@lorismoulin.com>
      Co-authored-by: default avatarLoris Moulin <45130584+l0r1s@users.noreply.github.com>
      Co-authored-by: default avatarNikos Kontakis <wirednkod@gmail.com>
  23. Sep 26, 2023
  24. Sep 20, 2023