Skip to main content

5. Subnet Creation

caution

The Ash Console is currently in beta and not production-ready. It is under active development and subject to breaking changes.

In this section, we will create a Subnet resource on our local network.

Control key creation

Before creating a Subnet, we need to create a wallet secret. This wallet will be use to sign the Subnet transactions (creation, validator management, etc.) and the P-Chain address will be used as the control key of the Subnet.

To make things easier, we will use the ewoq address which is pre-funded on the local network.

From the Ash Console project overview page, navigate to the Secrets tab:

  • Click on the Create Secret button.
  • Select the Wallet secret type.
  • Set ewoq-key a name for your secret.
  • Copy-paste the ewoq key in the Private Key field:
    PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN
  • Copy-paste the ewoq address in the P-Chain Address field:
    P-fuji18jma8ppw3nhx5r4ap8clazz0dps7rv5u6wmu4t
  • Choose cb58 in the Private Key Format field.
  • Click on the Create button to add secret to the project.

Ash Console NodeID secret create

danger

Do not use this wallet as control key in production!

Subnet creation

From the Ash Console project overview page, navigate to the Ressources tab:

  • Click on the Subnets tab.
  • Click on the Create Subnet button.
  • Pick a name for your Subnet, e.g., ash-subnet.
  • Select the cloud region you added in the previous step.
  • Select the ewoq-key secret you created in the previous step.
  • (Optional) Configure the Subnet with custom configurations if needed. See the ash.avalanche.subnet reference doc for a list of all supported configuration keys.
  • Click on the Create button.
tip

Make sure that all local-node-0x nodes are checked as Subnet validators.

Ash Console subnet create

Subnet information

After a few minutes, we can get the Subnet ID and attached nodes:

Ash Console subnet attached nodes

Notice that upon Subnet creation, the nodes' *uptime is 0%. This is because the Avalanche nodes' configuration has been updated to track the Subnet but they have not been restarted so it has not been taken into account yet.

We can confirm this by navigating to the Ressources tab and see that the Restart required field is set to Yes for each node:

Ash Console nodes restart required

After restarting every node by clicking on ... and then Restart button, the nodes will join the Subnet.

After a few minutes, we can see that the nodes' uptime is updated:

Ash Console subnet attached nodes bis

Blockchain RPC endpoint

Navigate to the Subnet page to display the RPC endpoint that can be used to query the Subnet EVM blockchain (e.g. to connect a Web3 wallet):

Ash Console subnet RPC endpoint

tip

Checkout Contract Deployment to learn how to deploy a smart contract on your Subnet EVM L1.