zombienet icon indicating copy to clipboard operation
zombienet copied to clipboard

[Improvement] Support downloading binary for native provider

Open crystalin opened this issue 2 years ago • 6 comments

I was looking at replacing our polkadot-launch based process by zombienet but one important feature that is missing is the possibility to retrieve the binaries to run it in native:

We offer 2 solutions for this, which I think could be supported by zombienet:

  • User can specify a "official" binary version that is retrieved from github automatically
  • User can specify a docker image/path (like it is the case in the toml file at the moment) and zombienet will extract the binary locally

What is your opinion on those ?

crystalin avatar Jun 28 '22 13:06 crystalin

Hi @crystalin, I think the more clean approach is to wrap zombienet using another script that downloads the needed binaries. For example, you can check this bash script used to download polkadot and run zombienet.

https://github.com/paritytech/polkadot-stps/blob/main/zombienet.sh

Thanks!

pepoviola avatar Jun 29 '22 12:06 pepoviola

@pepoviola Thank you. It is the approach we are using for our current process, however it makes zombienet dependant. If we were to imagine that each parachain is offering their yml config, as a kind of big repository for users to tests parachains (or for devs to test cross chains), each chain would have to come with a script instead of having a support directly in zombienet.

(PS: the link you shared is private and inaccessible)

crystalin avatar Jun 29 '22 12:06 crystalin

@crystalin, sorry about the link. But back to the original question you are thinking on something like

[[parachains]]
id = 100

  [parachains.collator]
  name = "collator01"
  command = "http://github.com/some-project/releases/adder-collator"

So, zombienet can detect the url in the command and download the binary to run the collator?

Thanks!

pepoviola avatar Jun 29 '22 12:06 pepoviola

@pepoviola Yes, I think either using the command with url or a different property like image = "{{ZOMBIENET_COL_IMAGE}}" it would be binary = "http://github.com/some-project/releases/adder-collator"

crystalin avatar Jun 29 '22 12:06 crystalin

The other option we provide in our launch, is that the binary is extracted from the docker image that is provided

crystalin avatar Jun 29 '22 12:06 crystalin

Hi @crystalin, #312 is a first step in this direction to improve the DX. We will explore the idea of create a registry in the upcoming weeks.

Thanks!

cc @wirednkod

pepoviola avatar Aug 25 '22 22:08 pepoviola