Treasury Proposal by Rust Syndicate: Uptest funding proposal

4 Comments

Proposal: Uptest Funding Proposal

Beneficiary: Rust Syndicate LLC 16Ziip8mK44sh7uKFkZgHbapxoKrRxriZaDdzqNAPW9Wr6x4

Date: 31.10.2022

Requested DOT: ($60000) 9254 DOT

Contact: Filip Kalebo (blockchain@firosolutions.com)

Short description:

Uptest aims to be the tool for testing Pallet functionality before and after runtime upgrades! Making it easier for developers to quickly pinpoint needed runtime migrations and test pallet functionality before and after runtime upgrades.

https://docs.google.com/document/d/1dJ43Bl3jYJ7LDA96_Hskyelqf9K2Zw4qJvdD53w6TwE/edit?usp=sharing


This is a Polkadot treasury proposal by Rust Syndicate LLC, a software company that aims to take on the responsibility to develop Uptest. A tool that enables developers to test upgrade chain functionality throughout a runtime upgrade.

All milestones will be published as releases on Github and crates.io under the MIT license.

Background:
During previous work, part of our team was tasked with upgrading a 16-month older forked substrate chain to a newer polkadot-v0.9.x release.
This was a massive upgrade and during this journey, a lot of time was spent dry-running runtime upgrades, going through migrations and testing pallet upgrades. After utilizing the majority of the available tools in the substrate space, no tool filled our use case.

Problem Statement:
Performing runtime upgrades for substrate developers is a necessary step in keeping modern chains up to date with dependencies and implementations. By previously working on massive dependency upgrades, a lot of substrate tooling was tested and evaluated. The majority of the tools that are available are either end of life / simple proof of concept code. We want to have a tool that quickly lets us test upgraded pallet functionality before and after a runtime upgrade happens. There is currently no tool available in the substrate ecosystem that lets the user simply write custom extrinsic tests, connect to a live chain, fork the chain to a local instance, launch the first tests, submit the runtime upgrade, track the changes throughout the runtime upgrade, verify that the storage migrations kicked in, run second load of tests and give us a detailed verdict.

Proposed Solution:
We propose “Uptest”. A tool that allows you to simply write tests, have Uptest submit the tests using ws/rpc, perform the runtime upgrade with the new changes, verify that the chain is running and perform after chain upgrade tests for the pallet tests. Uptest aims to be the “curl” for runtime upgrades. Making it a lot easier to perform runtime upgrades and dry-run new pallet features in local environments with real on-chain data. With Uptest we want to give the substrate community a universal tool in the form of a command line tool testing the upgraded code changes before and after the runtime upgrade has been submitted.

Testing storage migrations:
When upgrading a pallet to a newer version that changes functionality and storage types, we need to verify that the storage migrations are executed successfully and that our chain keeps
With Uptest we could write a test functionality to interact with the chain throughout the runtime
(first test)Interact with the pallet and submit data to be stored in the old format
write the storage migration for the new pallet and compile the new runtime to wasm
Uptest submits the runtime upgrade runtime upgrade
Uptest analyzes the changes made to the chain
(second test) Check that we can interact with upgraded pallet functionality and verify that the earlier submitted data was migrated in a correct way
Display a detailed changelog and give verdicts of the test results

Uptest allows you to simply let you write a test file, give Uptest the test file, point it to the live chain and have Uptest handle all the heavy lifting, giving developers a smooth experience testing new functionality throughout a runtime upgrade.

Up
Comments
No comments here