2

I want to run two parachains (parachain A and parachain B) and a relay chain with two validators Alice and Bob.

I need to implement the use-case below:

For parachain A the chain spec is newSpec.json and for parachain B the chain spec is newSpec1.json(updated) and for relay chain I am using newSpec1.json.

Will the parachain and relay chain produce new blocks? If yes, how to test it?

Thank you in advance......

2 Answers 2

1

First setup your Relay chain:

In the above guide it states:

If you wanted to connect two parachains with a single collator each, you would need to run three or more relay chain validator nodes. In general, you would need to modify the chain specification and hard-code additional validators to set up a local test network for two or more parachains.

So in your case you will need a custom Relay chain chain spec with three validators minimum. More info on creating custom chain specs can be found here:

Once you have a your Relay chain running with three validators minimum and its own custom chain spec you can then proceed to setting up your parachains.

Each parachain will have its own custom chain spec. One parachain can have one or more collators that can share the same parachain chain spec. Information on setting up a parachain, creating its chain spec, and connecting to the Relay chain can be found here:

And of course if you would like to bypass this manual process and spin up a Relay chain with two parachains quickly you can use Zombienet!

0

You assume that both para B and relay chain use the same chain specs newSpec1, this can't work. Each chain needs its own chainspecs.

2 validators will not be enough for a standard relay chain but this should work if your relay is a fork of Rococo (still that is very small, I would recommend 5 validators at least).

For a proper setup:

  1. Deploy the relay chain with its validators
  2. Register the 2 parachains (you will need a RPC endpoint to do this from pjs portal)
  3. Deploy the 2 parachains

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.