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
155 stars 88 forks source link

Issue with transfers using js script #1773

Closed pepoviola closed 2 months ago

pepoviola commented 2 months ago

check https://substrate.stackexchange.com/questions/11328/zombienet-js-script-weird-behaviour

pepoviola commented 2 months ago

Hi @Szegoo, I try to reproduce this issue but works as expected on my end. Can you check the version of zombienet with

 ./zombienet-macos version
1.3.100

And also the polkadot version, I used the v1.10.0 image

POLKADOT_IMAGE=parity/polkadot:v1.10.0 ./zombienet-macos test support-files/1773.zndsl
image

Thanks!!

Szegoo commented 2 months ago

Thanks for checking this. I am getting the polkadot binaries with: zombienet setup polkadot. The SE question was a bit missleading in this regard. I thought that zombienet was pulling an image from docker and getting the binary from there.

After setting my path I run:

zombienet-linux -p native test zombienet_tests/0001-network-test.zndsl

I double checked my version, and it is indeed 1.3.100

pepoviola commented 2 months ago

Hi @Szegoo, thanks for the info. I try from the scratch:

(1773.zndsl is the same file you paste in se)

This works as expected,

image

Can you check if the polkadot version you are using is the one downloaded from the setup? ensure that you are exporting the new PATH with the directory as the output of setup mention.

Thanks!!

Szegoo commented 2 months ago

I did it from scratch as well, and it worked. It is possible (but unlikely) that I had the wrong Polkadot binaries. If I figure out what was causing the issue, I will post it here. Thanks!

pepoviola commented 2 months ago

I did it from scratch as well, and it worked. It is possible (but unlikely) that I had the wrong Polkadot binaries. If I figure out what was causing the issue, I will post it here. Thanks!

Great, thanks! I think could be the case that the downloaded binaries were not the first option in the PATH and that why pick a wrong ones, but let me know if you see another issue.

Thanks!!

Szegoo commented 2 months ago

Ok, I think I discovered when the issue is occuring. Whenever I add the header types to the zombienet toml file I am getting the error. For example:

[settings]
timeout = 1000

[relaychain]
chain = "rococo-local"
command = "polkadot"

  [[relaychain.nodes]]
  name = "alice"
  validator = true

  [[relaychain.nodes]]
  name = "bob"
  validator = true

[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
pepoviola commented 2 months ago

Hi @Szegoo, that make sense since if you supply a Header type polkadot.js will use that (overriding the default one) and that Header in particular works for adder/undying collators. I think we should add a brief explanation on how this works in our docs.

Thanks for checking this and figure out!

pepoviola commented 2 months ago

Closing here @Szegoo, I will update the docs. Thanks for reporting!