Kabocha, imminent launch
Wen Kabocha? Imminently. This post highlights the progress status of Kabocha’s parachain journey from sudo phase to Live.
Kabocha has made its first runtime upgrade, kab-release-v0.1.8, which upgrades the runtime to the latest polkadot release, v0.9.27, on our main net on the Kusama relay chain. There are still 2 more key upgrades to go, kab-release-v0.1.9, which contains more pallets including the ability to mint new coins based on proposals (pallet_mint); then kab-release-v0.2.0, which updates the runtime with `pallet_democracy` so that the community can commandeer the chain.
The first runtime upgrade was completed today, then uploading of balances, then the next upgrades with all the minimal viable pallets, then the final distribution audit, and then the final upgrade to add the democracy pallet, where the community can then start to take over.
We’ve been working on making sure the distribution is correct:
- Make sure EDG snapshot is correct
- KSM Crowdloan balances are correctly added with EDG snapshot
No issues here, we just made sure people who contributed KSM from an address where they also held EDG for the snapshot, was correctly accounted for.
The distribution will be audited by the community before it is formally recognised as being production ready. This will be somewhere after the kab-release-v0.1.9 upgrade.
Accurate unvesting of balances
What we don’t want is when it is time to unvest balances (70% at the end of lease) that the unvest doesn’t happen in time. This can easily occur using the vesting pallet, because you need to select a future parachain block number to unlock. However, parachain blocks are less consistent than relay chain blocks, therefore it is hard to predict a future blocknumber accurately with date and time. Kusama has a consistent block time of 6 seconds, whereas parachain block times can waver, from 12 seconds to up to 1 minute. This is due to various factors, but one general one across all parachains is that the validation of a parachain block requires a series of steps, which requires the relay chain validators who were selected to validate the parachain blocks, to themselves be validated by the entire relay validator set. This requires something called erasure coding. It is a very complex process, but it is the magic that allows for parachains to run within a shared consensus environment.
The unvesting pallet also doesn’t allow for changes in case of issues, and it is a challenge to find the relaychain blocknumber.
Pallet Relay Schedule
So we had to create a custom pallet using pallet-scheduler to be able to select accurately. When creating a new pallet, testing is essential to make sure you have accounted for all behaviour. Over many test nets we have been working on this.
We use a hook to unvest the balances at the relay blocknumber. But we want to make sure it doesnt take too much of a single block else it could crash the chain, therefore we distribute unvesting over a series of blocks, and make sure that there is ample margin space within each block to process each little piece.
Runtime upgrades in August
The was Kabocha mainnet’s first runtime upgrade. It was a “woo hoo!” moment. A lot has been happening on the testnet, but we wanted to make sure that the mainnet is not affected by a faulty runtime upgrade. — We do not wish to be the team to have to request Kusama council reset our chain.
Our first upgrade required:
- Relay Scheduler — a custom scheduler pallet which allows balances to be unvested very accurately at a relay block number instead of the parachain block number, which is typically less consistent than the relay.
- Upgrade to polkadot-v0.9.27 latest release for parachains.
This release updates the mainnet with:
- pallet_mint — the ability to mint new KAB from succesfully voted proposals.
- pallet_supersig — like supersig but with superpowers, added to the runtime.
- pallet_proxy — improvements to the proxy.
- Improvement of Relay Scheduler. A big that was spitting out inherent events of the blocknumber every block. It has since been removed.
- This upgrade will enable the community to take over the chain with pallet_democracy;
- and kill the sudo account and remove the filter that is blocking balances transfers.
Keep on the look out for the next post, which will talk about the plan ahead of the community handover.
All the best,
Kabocha technical founding steward