5

We are using rococo-local in our CI/CD but we would like to move to kusama-local because we need to test some xTokens pallet ( upwards / downards transfers ) functionalities with Kusama.

We are using paraSudoWrapper from the rococo-relay chain to speed up the onboarding of our parachain in our Docker setups but looks like this is not that available for Kusama-based rely chain. Am I missing something? Is there another workaround?

Here an example on how we are registering the chain: https://github.com/mangata-finance/mangata-node/blob/develop/devops/dockerfiles/parachain-registrator/src/index.js#L61

Thanks!!

2 Answers 2

5

Here is another useful feature that no one knows it exists (until now I hope): fast-runtime

So that you can build a Kusama local runtime with reduced session time without waiting hours for onboarding.

KSM_EPOCH_DURATION=40 KSM_LAUNCH_PERIOD=3 cargo build --release --features=fast-runtime
6
  • O_o will try! Thanks @Bryan! Commented Mar 22, 2022 at 7:07
  • Hi @Bryan, I have an issue at block #40 when building with those params: ``` 2022-03-25 08:34:48 Error with block built on 0xfb0b51206dc4473d1bb7ad71283cc7783885ed1ea0415c7ca82d6c2cc369049a: ClientImport("Expected epoch change to happen at 0xbdda8544c7bbe6b3e506cb3c2443d5fd4d49ed6bc2ca5efec968104d9c39384d, s274698948") ``` Thanks! Commented Mar 25, 2022 at 7:36
  • Running it with: ./target/release/polkadot --alice --validator --rpc-cors=all --tmp --chain=/home/goncer/projects/chainspec_raw_ksm.json --port 30333 --ws-port 9944 > ../alice.txt 2>&1 & in polkadot v0.16 released version. With spec: target/release/polkadot build-spec --chain=kusama-local --disable-default-bootnode --raw > ../chainspec_raw_ksm.json Commented Mar 25, 2022 at 7:38
  • would the issue be that im generating the spec and fast-runtime is not fully compatible with it? I think that the spec is almost mandatory to me, otherwise ( if using --chain=kusama-local ) my parachain is not imporing blocks from the relay because of genesis mismatch. ` Reason: Genesis mismatch, Disconnecting` Commented Mar 25, 2022 at 8:09
  • 1
    Hi Bryan! I made it work without the KSM_ related variables. I created this, github.com/mangata-finance/mangata-node/blob/develop/devops/… By building a node with the feature = fast-runtime and using this script to onboard the chain, github.com/mangata-finance/mangata-node/blob/develop/devops/… Many many thanks for the help! Commented Apr 6, 2022 at 12:26
2

There is no simple work around, Kusama (as you might know) is a production network where sudo is not used. Rococo is intended to be the place to test all things before you move to Kusama or Polkadot, thus we should be sure that features you need are included in Rococo. Please open an issue to ask for the things you want to test be included with reasoning why. 🙏

For testing things out you may find that try runtime or the Polkadot emulator (or now up-streamed simulator) would be a good place to test things as well.

3
  • Would be technically possible to adapt the onboarding time for kusama-local spec? If so I 'll create an issue in Github. I think is important to make rely-chain testable enough for parachains to be able to deliver quality in the integrations. And thanks for the answer @dan! Commented Mar 21, 2022 at 16:26
  • Thanks for the thanks! An upvote would be nice too to signal this 🙏
    – Nuke
    Commented Mar 21, 2022 at 17:28
  • I think this has been suggested before... someone was maintaining a fork for the emulator that "hacked" the block/session times to allow for various changes in reconfiguration to accelerate things, but then it's not a proper test of the runtime that is on Kusama properly.... but I agree opening an issue/PR that suggests local only chainspecs with a different onboarding time may be useful. Let's see what the maintainers think?
    – Nuke
    Commented Mar 21, 2022 at 17:31

Your Answer

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

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