💃🏽 Kylin is on Chachacha! (and partnered with Centrifuge)

Thanks to our talented Dev Team (especially Sam Elamin) and the talented Dev Team at Centrifuge (especially Miguel Hervas), our parachain is producing blocks now (without the impediment of grabbing time ad-hoc via Parity), via Chachacha!

What will we do together?

  1. Hence, any project that needs to deploy a parachain, Sam and Miguel will personally help. As an infrastructural common good for the entire ecosystem, we hope as many people take part in this as possible.
  2. Beyond this initiative, we are also working through core aspects of XCMP in an effort to extend the initial work done by Robert Habermier et al.
  3. Lastly, we are also planning to run an Incentivized Testnet to get our community to run collators and increase the amount of validators on Chachacha (more details on that later, or revised in this medium ann).

For more information on Chachacha, please feel free to look at the informative post by Centrifuge here

Why we’re excited

At Kylin Network, we aim to power the data economy and we are building it on Polkadot because we feel it is the very best place to achieve this vision. The next step is allowing other chains access to the analytics data and Cross Chain Message Passing(XCMP) is going to be a core functionality of this — we hope Chachacha will be the very first place where multiple chains can test out their XCMP functionality between themselves.

Technical Guide

Sam: @samelamin:matrix.org
Miguel: @mikiquantum:matrix.org

# How to join Chachacha

## Validator Setup

The only requirement we have is that you run 2 validators to support the network,below you will find detailed instructions on getting your parachain up and running.

The Chachacha network uses a custom built polkadot binary. For simplicity’s sake you can find a docker-compose that will automatically start two validators for you and start syncing the chachacha network.However, you can also build from source if you fancy it

### To build from source just run

```git clone https://github.com/centrifuge/polkadot/cd polkadotgit checkout chachacha./target/release/polkadot — validator — chain rococo — name <your_chachacha_validator_name>```

### Using Docker

git clone https://github.com/centrifuge/polkadot/
cd polkadotgit checkout chachachadocker-compose -f docker/docker-compose-chachacha.yml up -d```

Once your validators are all synced up you will need to generate session keys for each of your Rococo validator nodes. We recommend creating two different accounts for each authority, so please create two accounts on the Chachacha network. Please reach out to either Sam@Kylin or Miguel@Centrifuge a message on the Element room to send you some CHA.

Next, you need to generate keys for your validators. Please use the author.rotateKeys RPC call. One way to invoke this RPC method is by using curl:

curl http://<validator IP address>:<WebSocket port> \
-H “Content-Type:application/json;charset=utf-8” \-d ‘{ “jsonrpc”:”2.0", “id”:1, “method”:”author_rotateKeys” }```

You can also use the Polkadot JS Apps UI RPC app to invoke the RPC method, just make sure you are connected to the correct node. Below is an example successful result after run from the instance the validators are running on.

curl \-H "Content-Type:application/json;charset=utf-8" \-d '{ "jsonrpc":"2.0", "id":1, "method":"author_rotateKeys" }';
{“jsonrpc”: “2.0”,“result”: “0xdc5fd6e8d2b………”,“id”: 1}

*The value of `result` is what you will use to set the keys to your authority*

Regardless of how you generate these keys, take note of them and treat them with care.

You then need to create an account on the Chachacha network, and use the `session->set_keys`

For the keys, put in the encoded value of result that your original RPC call made and run the extrinsics for both accounts

*Please remember to use two different accounts, one for each validator*

Once your validator is synced up, you should be seeing your validators producing blocks.

## Register your parachain

Registration on Chachacha follows the same route as Rococo/Westend and all other chains, you register a Parathread then get in touch on Element to upgrade your chain

Just remember to generate the correct wasm and genesis blob, below is an example of how to generate these files but your setup might be different, you need to ensure you generate the files using ChainType::Live. For example, if you built your collator of the Substrate template then by default your chain type will be local which will not work

cd <root_cumulus_based_parachain_code>
cargo build -—release./target/release/<parachain_collator_name> --version./target/release/<parachain_collator_name> export-genesis-state --parachain-id <your_registered_parachain_id> --chain <your_chain_spec> > genesis-state./target/release/<parachain_collator_name> --chain <your_chain_spec> export-genesis-wasm > genesis-wasmwget -O rococo-chachacha.json https://raw.githubusercontent.com/centrifuge/polkadot/chachacha/node/service/res/rococo-chachacha.json./target/release/<parachain_collator_name> —-collator -—parachain-id <your_registered_parachain_id> -—force-authoring --chain <your_chain_spec> -— -—execution wasm -—chain rococo-chachacha.json```

Finally reach out in the Element room to upgrade your chain, that's pretty much it!

Welcome to Chachacha and happy testing!

About Kylin Network

Contact Kylin Network

About Centrifuge

Contact Centrifuge

Building a Cross-chain Platform Powering the Data Economy on Polkadot