Juneo Supernet
  • The juneo network
    • What is Juneo Supernet ?
    • Avalanche Foundations
    • Key Features
    • Join Juneo Mainnet
  • Architecture
    • Nodes
    • Supernets
  • Build
    • Node Requirements
    • Set up and Connect a node manually
    • Set up and Connect a node using the Install Script
    • Set Up and Connect a node with Docker
    • Advanced Node Configuration
    • Create a Layer-1 Network
    • Deploy a VM
  • Maintain
    • Node Monitoring
    • Node Backup and Restore
    • Migrate from Socotra Testnet to Juneo Mainnet
    • Update a Node
    • Node Informations
  • Validate
    • Add a Node to the Validator Set
  • BRIDGE
    • Supernet Bridge
    • Bridged Tokens
    • Get Started
Powered by GitBook
On this page
  • Deploying a VM
  • Indexation of your chain on the explorer
  1. Build

Deploy a VM

Create your Layer-1 Network and deploy a Virtual Machine

PreviousCreate a Layer-1 NetworkNextNode Monitoring

Last updated 1 month ago

After you have you can deploy a VM on it.

The pre-requisite for this tutorial is that you have already , and .

We will be using the example files found in the repository to deploy an EthereumVM on our existing Layer-1 Network.

Please make sure that you have installed on your system, along with the npm package (which will be used to execute the sample code provided in JuneoJS).

Deploying a VM

Assuming you have followed the , you should have the folder available. Open directory in a code editor of your choice, create a .env file from the provided .env.example, and paste your mnemonic phrase in the MNEMONIC variable. Example:

MNEMONIC="raven whip pave toy benefit moment twin acid wasp satisfy crash april"

Next, open the file ./src/supernet/createChain.ts. Please find and update the following variables to contain the correct values. Example:

const supernetId: string = 'ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP' // your supernet id

const chainName: string = 'Chain A'

const chainId: number = 220222

const genesisMintAddress: string = '0x44542FD7C3F096aE54Cc07833b1C0Dcf68B7790C' // your wallet address here

Never use the same chainId value more than once- this can cause unexpected errors for your MCN chains in the future.

Please make sure to specify the chainId variable to a value that is not already taken by another chain. For the Socotra Testnet, please use a random number from 200,000 - 299,999.

For Mainnet, please use a number starting from 45,015.

Avoid assigning thechainId variable a number with repetative digits (such as 224455, 222444, 222222, 242424 or similar).

After this, execute this file in the command line using ts-node:

npx ts-node ./src/supernet/createChain.ts

Your command line output should resemble the following, indicating that your VM was successfully deployed:

Created chain with id: 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D

Indexation of your chain on the explorer

For your chain to be eligible for indexation on the explorer, you will need to disable pruning for your newly created chain, allowing archive node functionality. This is done by creating a config.json file on your Juneo Supernet validator node in the location .juneogo/configs/chains/chainId.

For a chain which has the id of 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D, you would execute the following commands from the home directory:

cd .juneogo

mkdir configs
cd configs

mkdir chains
cd chains

mkdir 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D
cd 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D

nano config.json

Next, paste the following inside the config.json file:

{
"pruning-enabled": false,
  "eth-apis": ["public-eth", "public-eth-filter","net","web3","internal-public-eth","internal-public-blockchain","internal-public-transaction-pool","internal-public-debug","debug-tracer"]
}

In addition to this, it is required that your node accepts API calls from remote machines. For this, we have to make updates to the config.json file our node is using.

This file should include the http-host config flag, and it's value should be set to your public IP address. Example:

"http-host":"XXX.XXX.XXX.XXX"

Following the previous steps from the documentation, this config.json file should include the following lines:

{
 "track-supernets":"ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP",
 "http-host":"XXX.XXX.XXX.XXX"
}

After updating this file, please re-start your node.

The next step is to submit your Supernet and Blockchain data to us for indexation.

Before proceeding with the next step, please perform a few transactions on your chain using MetaMask, such as sending some tokens to any address.

Please submit your Supernet and Blockchain information to us in the following format:

Supernet
- Name
- Description
- id

Blockchain
- Name 
- Description 
- Currency (in ALL-CAPS format)
- Decimals 
- Host (http://xxx.xxx.xxx.xxx:9650 or with domain name) 
- rpc (http://xxx.xxx.xxx.xxx:9650/ext/bc/id/rpc)
- Logo (min 273x273 or greater.
        In .png format. 
        The width:height ratio should be 1:1)
- id

Please use unique descriptive names for your Supernet and Blockchain. Avoid names such as "Test Supernet" or "Test Blockchain".

Example:

Supernet
- Name: Supernet ABC
- Description: This is a supernet created by
- id: ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP

Blockchain
- Name: Chain ABC
- Description: This is a Blockchain developed by
- Currency: ABC22
- Decimals: 18
- Host: http://XXX.XXX.XXX.XXX:9650 
- rpc: http://XXX.XXX.XXX.XXX:9650/ext/bc/2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D/rpc
- Logo: [your_logo_goes_here]
- id: 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D

If you are using to run your node, the http-host flag should remain unchanged.

juneogo-docker
created your Layer-1 Network
added a Juneo Supernet validator node
created a Layer-1 Network
juneogo-examples
Node.JS
ts-node
steps for creating a Layer-1 Network
juneojs-examples
juneojs-examples
added a
validator