Skip to main content

SNS testing before launch

Advanced
Governance
Concept

Before SNS creation, it is advisable to thoroughly test the process.

Two main ways for testing an SNS decentralization

On a local machine

Developers can test on a local machine. The sns-testing repository contains scripts that help developers test the SNS creation process. They can deploy the dapp in a local canister development environment and run through the stages of decentralizing their dapp.

The main intent of sns-testing repo is for a developer to test the actual process of decentralizing their dapp.

Among other things, developers can use sns-testing repo to:

  • Initiate proposals.
  • Pass proposals.
  • Start decentralization swaps.
  • Upgrade the dapp via DAO voting.

sns-testing is just one form of testing SNS process locally. Developers should feel free to use others, fork/modify sns-testing or create their own.

On the mainnet

Once a developer has tested the process of an SNS, it is highly recommended they do an "SNS testflight" on mainnet. An SNS testflight is when a developer deploys their dapp (to mainnet) and hands control of it to a mock SNS (on mainnet).

The main intent of performing an SNS testflight is for developers to experience how a dapp works after it has been decentralized, so developers can make sure their dapp is ready for decentralization. It does not test the actual process of decentralizing it.

A testflight is not a repository or a set of tools, but an activity (deploying and dapp and handing control of it to a mock SNS), so the instructions for testing on mainnet utilize various tools, but developers can of course use any tools they wish.

Among other things, here are some examples of issues developers find when running an SNS testflight:

  • They need a better pipeline for creating proposals to update a dapp.
  • They may have decentralized prematurely and need to fix some things.
  • They may need better monitoring before decentralizing.

The mock SNS used in a SNS testflight gives developers the ability to see how post-decentralization lifecycle of a dapp looks like, but still provides a way for a developer to keep control of their dapp. Therefore, developers are encouraged to run and perform an SNS testflight on mainnet, potentially for multiple days or weeks, to ensure that all aspects have been covered.