Muon’s Random Rotating Subnets

Making Muon More Cost-effective & Scalable Through Periodic Random Subnet Selection

Robert Wallace
Muon
4 min readApr 17, 2023

--

The year 2023 has teemed with new developments for the Muon protocol. One of the major technical developments that has recently been finalized is a reliable plan to scale the Threshold network without reducing its security: Random Rotating Subnets.

In the article Threshold Signature Scheme, our readers learned that TSS is an upgraded and cost-effective version of Multisig because it reduces the on-chain transaction costs. However, requiring all the nodes to sign each request in a large network raises operation time, which is not feasible.

A rotating subnet is a randomly selected group of nodes that are assigned to a Muon app for a limited period of time and renewed after the period. For instance, if a network has 100 nodes, 20 of them are randomly selected and assigned to an app for 24 hours. The Threshold signature is generated with, for example, 15 of them approving the data. Read on for the details.

Scaling the Threshold Network

Although generating Threshold signatures reduces the on-chain costs significantly, it requires heavy off-chain computations. The complexity of the computations to generate a single Threshold signature is O(N2), that is, the square of the number of nodes involved. For instance, the amount of computation and the time needed to generate a Threshold signature in a network of 100 nodes is 25 times more than a network of 20 nodes, although the nodes are just 5 times more.

Instead of engaging all nodes in the Threshold network, a randomly selected subnet solves the problems of cost and time. This enhances scalability as the network can process many more requests in a specific time period.

On the other hand, owing to the randomness of the selection process, nodes are distributed in subnets in the same manner as the whole Threshold network. Thus the subnet retains the same security level as the Threshold network itself.

Technical Aspects: Assigning Subnets to Apps

Muon random subnets have been live and running on ALICE, but its rotating feature is not yet implemented; that is, subnets are currently assigned randomly to apps but are not rotating on a regular basis. It is planned to be developed and launched during the first major upgrade after the launch of the Pioneer network. So the following technical description covers the current implementation of random subnets.

As an app is being deployed on the network, subnets are assigned to it. There is a deployment app on the network whose job is to deploy other Muon apps. The deployment app is run by a PoA network of nodes managed by Muon partners.

The deployment app randomly selects nodes for each subnet for a certain period

The deployment process includes the following steps:

  1. Generating a verifiable random number
  2. Selecting a random set of nodes based on the random number and assigning them as a subnet to the app
  3. Notifying the randomly selected nodes to generate a Threshold key

When an app is being deployed, the deployer inputs the appId to the random-generating method of the deployment app as a deterministic message. It signs the appId and the returned Threshold signature will be used as the verifiable random source for the selection of subnets.

The generated signature is random in that it cannot be predicted prior to its generation. That is, to be able to generate the random number from the appId, one needs the private key that is distributed among the nodes of the PoA network.

It is also verifiable because it can be verified that all parties in the PoA network were involved in generating it by verifying the generated Threshold signature.

The returned signature from the random-generating method is then fed as a random input into the other method that selects the nodes for the app’s subnet. Having verified the signature, the method obtains the list of all live nodes from the node manager, randomly selects a predefined number of them and assigns them to the app.

At this stage, the key-generating method is called to notify all the selected nodes to generate a TSS key. This key is distributed among all selected nodes and a threshold number of them can collaborate together to sign the responses.

The following sequence diagram illustrates the procedure in detail.

At Muon, we are trying to create a secure, cost-effective and scalable oracle network and implementing rotating random subnets on Muon was a key step toward scaling Muon’s Threshold network.

Pion is the Muon ecosystem’s Canary and first mainnet. It is a chain-independent and stateless DON (Decentralized Oracle Network) that enables dApps to make their off-chain components decentralized. By incorporating Pion (by Muon), the manner in which decentralized applications store, process, and access data will be fundamentally transformed.

Run a Pion node.

Twitter | Telegram | Discord | Website | Medium | GitBook | Developer’s Guide

--

--