Skip to content
Snippets Groups Projects
  1. Aug 13, 2024
    • Frank Bell's avatar
      fix(chain-spec): adjust hrmp channels json structure (#244) · b1aac0ea
      Frank Bell authored
      When testing `zombienet-sdk` with cross-chain calls with Asset Hub, we
      found that the hrmp channels passed to the chainspec caused the
      following issue:
      
      `Error: "Invalid JSON blob: invalid type: map, expected a tuple of size
      4 at line 1 column 2794"`
      
      This is because the values of `HrmpChannelConfig` serialise to a map
      instead of a tuple, as expected by
      https://github.com/paritytech/polkadot-sdk/blob/fc906d5d0fb7796ef54ba670101cf37b0aad6794/polkadot/runtime/parachains/src/hrmp.rs#L492.
      Tests were updated accordingly to facilitate this fix.
      
      Additional commits were also added to enable some of Asset Hub on
      Polkadot functionality observed in the classic Zombienet repo, so that
      we are able to launch a local Polkadot network with Asset Hub should
      anyone require. Example configuration files can be found at the bottom
      of https://github.com/r0gue-io/pop-cli/pull/278/files for anyone
      interested, although that PR is still a work in progress and dependent
      on this one being accepted.
      
      PS - I added tests where I could, but additional tests might require
      some minor refactoring to make it easier to test only the logic that is
      changed by this PR, which I am not sure what the appetite is? An example
      would be refactoring the file name generation in `keystore.rs` into its
      own function to more easily test the outputs without the `scoped_fs`.
      b1aac0ea
  2. Jul 20, 2024
  3. Jul 16, 2024
  4. Jun 22, 2024
  5. Jun 21, 2024
  6. Jun 14, 2024
  7. Jun 10, 2024
  8. Jun 08, 2024
  9. Jun 05, 2024
  10. Jun 04, 2024
  11. Jun 03, 2024
  12. 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
      2ad235c0
  13. May 16, 2024
  14. May 14, 2024
    • Frank Bell's avatar
      feat: enhance public api (#209) · 11ea1254
      Frank Bell authored
      Firstly, thank you for an amazing library! The original zombienet is a
      Polkadot staple and now being able to use it completely from Rust is a
      game changer for us: as you may be aware, we have integrated
      zombienet-sdk with
      [pop-cli](https://github.com/paritytech/zombienet-sdk).
      
      In doing so, we needed to add a few getters to the public api to be able
      to present certain information to the user, as well we expose a little
      more of the inner errors. This PR simply upstreams these changes.
      
      It also includes two additional fixes, which may be better implemented
      based on your guidance:
      - collator args werent working for us when specified in a config file,
      which seemed to be due to missing `--` in the args list provided by
      calling functions.
      - artifact path wasnt set when trying to build a chain spec. This may no
      longer be required based on the changes in
      https://github.com/paritytech/zombienet-sdk/commit/c7ce50c0
      
      I am happy to add tests if you are open to these changes. :slight_smile:
      11ea1254
  15. May 08, 2024
  16. May 04, 2024
  17. Apr 30, 2024
  18. Apr 26, 2024
  19. Apr 19, 2024
  20. Apr 15, 2024
  21. Mar 29, 2024
  22. Mar 26, 2024
  23. Mar 21, 2024
  24. Mar 16, 2024
  25. Mar 13, 2024
    • Loris Moulin's avatar
      Feat/available args (#184) · 1b124e59
      Loris Moulin authored
      Fix https://github.com/paritytech/zombienet-sdk/issues/169
      
      - Add logic to retrieve available args from node before spawning the
      full network using the output of the command with --help
      1b124e59
  26. Mar 08, 2024
    • s0me0ne-unkn0wn's avatar
      Fix argument passing (#186) · 68cf9c1e
      s0me0ne-unkn0wn authored
      
      Concatenating the command line option and its value doesn't really work.
      The shell treats `--opt val` as a single argument `--opt val` instead of
      `--opt` `val` and fails to execute. This PR fixes that by separating
      options from their values.
      
      Error example:
      ```
      error: unexpected argument '--workers-path ~/.cargo/bin/workers-1.6' found
      
        tip: a similar argument exists: '--workers-path'
      ```
      
      Co-authored-by: default avatarJavier Viola <363911+pepoviola@users.noreply.github.com>
      68cf9c1e
  27. Mar 07, 2024
  28. Mar 05, 2024
  29. Mar 03, 2024
  30. Feb 26, 2024
  31. Feb 23, 2024
  32. Feb 22, 2024
  33. Feb 20, 2024
  34. Feb 15, 2024
  35. 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>
      465a12f4
    • Frank Bell's avatar
      fix: enable arbitrary_precision for serde_json (#161) · cfb6ac32
      Frank Bell authored
      Testing with moonbeam and found that the resulting chainspec produced
      using the `moonbase-local` chain develops the following issue after the
      generated plain chainspec is updated with the relevant para id:
      
      ```
      Error: Zombienet(SpawnerError(Provider error
      Caused by:
          File generation failed: Error: Service(Other("Error parsing spec file: trailing characters at line 25 column 14"))
      ```
      
      The initial chainspec built from the binary is fine, but once
      https://github.com/paritytech/zombienet-sdk/blob/e60deb25/crates/orchestrator/src/generators/chain_spec.rs#L345-L349
      runs the issue occurs, as seen in the the following diff:
      
      ```
      --- moonbase-local-plain copy.json	2024-02-11 02:51:15
      +++ moonbase-local-plain.json	2024-02-11 02:52:24
      @@ -11,7 +11,7 @@
           "tokenSymbol": "UNIT"
         },
         "relayChain": "westend-local",
      -  "paraId": 1000,
      +  "paraId": 2000,
         "codeSubstitutes": {},
         "genesis": {
           "runtime": {
      \ No newline at end of file
      @@ -22,19 +22,19 @@
               "balances": [
                 [
                   "0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac",
      -            1208925819614629174706176
      +            1.2089258196146292e24
                 ],
                 [
                   "0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0",
      -            1208925819614629174706176
      +            1.2089258196146292e24
                 ],
                 [
                   "0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc",
      -            1208925819614629174706176
      +            1.2089258196146292e24
                 ],
                 [
                   "0x773539d4ac0e786233d90a233654ccee26a613d9",
      -            1208925819614629174706176
      +            1.2089258196146292e24
                 ]
               ]
             },
      \ No newline at end of file
      @@ -45,7 +45,7 @@
               "multiplier": "8000000000000000000"
             },
             "parachainInfo": {
      -        "parachainId": 1000
      +        "parachainId": 2000
             },
             "ethereumChainId": {
               "chainId": 1280
      \ No newline at end of file
      @@ -503,19 +503,19 @@
               "candidates": [
                 [
                   "0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac",
      -            1000000000000000000000
      +            1e21
                 ],
                 [
                   "0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0",
      -            1000000000000000000000
      +            1e21
                 ]
               ],
               "delegations": [],
               "inflationConfig": {
                 "expect": {
      -            "min": 100000000000000000000000,
      -            "ideal": 200000000000000000000000,
      -            "max": 500000000000000000000000
      +            "min": 1e23,
      +            "ideal": 2e23,
      +            "max": 5e23
                 },
                 "annual": {
                   "min": 40000000,
      \ No newline at end of file
      @@ -552,7 +552,7 @@
               "eligibleCount": 50
             },
             "crowdloanRewards": {
      -        "fundedAmount": 3000000000000000000000000
      +        "fundedAmount": 3e24
             },
             "authorMapping": {
               "mappings": [
      \ No newline at end of file
      @@ -611,6 +611,11 @@
                 "0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac",
                 "0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0"
               ]
      +      },
      +      "aura": {
      +        "authorities": [
      +          "5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX"
      +        ]
             }
           }
         }
      ```
      
      The fix appears to be to enable the
      [`arbitrary_precision`](https://github.com/serde-rs/json/blob/master/Cargo.toml#L75)
      feature on `serde_json`, which can be seen at
      https://github.com/paritytech/polkadot-sdk/pull/2987/files. Manually
      tested and solves the issue for me.
      cfb6ac32