Learn how to create a Subnet with a multisig authorization.
Subnet creators can control critical Subnet operations with a N of M multisig. This multisig must be setup at deployment time and can't be edited afterward. Multisigs can are available on both the Fuji Testnet and Mainnet.
To setup your multisig, you need to know the P-Chain address of each key holder and what you want your signing threshold to be.
Note
Avalanche-CLI requires Ledgers for Mainnet deployments. This how-to guide assumes the use of Ledgers for setting up your multisig.
Next the CLI asks the user to specify the control keys. This is where you setup your multisig.
Select Custom list and add every address that you'd like to be a key holder on the multisig.
Use the given menu to add each key, and select Done when finished.
The output at this point should look something like:
Note
When deploying a Subnet with Ledger, you must include the Ledger's default address determined in Specify Network for the deployment to succeed. You may see an error like
If the currently connected Ledger address isn't included in your TX signing group, the operation fails with:
This can happen either because the original specified control keys -previous step- don't contain the Ledger address, or because the Ledger address control key wasn't selected in the current step.
If the user has the correct address but doesn't have sufficient balance to pay for the TX, the operation fails with:
This activates a Please review window on the Ledger. Navigate to the Ledger's APPROVE window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons.
After successful Subnet creation, the CLI asks the user to sign the blockchain creation TX.
This activates a Please review window on the Ledger. Navigate to the Ledger's APPROVE window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons.
On success, the CLI provides Subnet deploy details. As only one address signed the chain creation TX, the CLI writes a file to disk to save the TX to continue the signing process with another command.
Enter the name of file to write to disk, such as partiallySigned.txt. This file shouldn't exist already.
So far, one address has signed the Subnet deployment TX, but you need N signatures. Your Subnet has not been fully deployed yet. To get the remaining signatures, you may connect a different Ledger to the same computer you've been working on. Alternatively, you may send the partiallySigned.txt file to other users to sign themselves.
The remainder of this section assumes that you are working on a machine with access to both the remaining keys and the partiallySigned.txt file.
Avalanche-CLI can detect the deployment network automatically. For Mainnet TXs, it uses your Ledger automatically. For Fuji Testnet, the CLI prompts the user to choose the signing mechanism.
You can start the signing process with the transaction sign command:
Next, the CLI starts a new signing process for the Subnet deployment TX. If the Ledger isn't the correct one, the following error should appear instead:
This activates a Please review window on the Ledger. Navigate to the Ledger's APPROVE window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons.
Repeat this processes until all required parties have signed the TX. You should see a message like this:
Now, partiallySigned.txt contains a fully signed TX.
Take a look at Add a Validator for additional help issuing this transaction.
Note
If setting up a multisig, don't select your validator start time to be in one minute. Finishing the signing process takes significantly longer when using a multisig.
After that, the command shows the connected Ledger's address, and asks the user to sign the TX with the Ledger.
Because you've setup a multisig, TX isn't fully signed, and the commands asks a file to write into. Use something like partialAddValidatorTx.txt.
The process is very similar to signing of Subnet Deployment TX. So far, one address has signed the TX, but you need N signatures. To get the remaining signatures, you may connect a different Ledger to the same computer you've been working on. Alternatively, you may send the partialAddValidatorTx.txt file to other users to sign themselves.
The remainder of this section assumes that you are working on a machine with access to both the remaining keys and the partialAddValidatorTx.txt file.
Avalanche-CLI can detect the deployment network automatically. For Mainnet TXs, it uses your Ledger automatically. For Fuji Testnet, the CLI prompts the user to choose the signing mechanism.
Next, the command is going to start a new signing process for the Add Validator TX.
This activates a Please review window on the Ledger. Navigate to the Ledger's APPROVE window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons.
Repeat this processes until all required parties have signed the TX. You should see a message like this:
Now, partialAddValidatorTx.txt contains a fully signed TX.