LOGOSNODOS
  • LOGOSNODOS
  • 🖥️Mainnet Node
    • Avail Network
      • ▶️Installation
      • ▶️Staking / Bonding
    • BlockX
      • ▶️Installation
      • ▶️Cheat Sheet
    • Muon Network
      • ▶️Installation
      • ▶️Troubleshooting
    • RaiblocksOne
      • ▶️Installation
      • ▶️Cheat Sheet
    • SGE Network
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
  • 🛠️TESTNET NODE
    • 0gchain
      • ▶️Installation
      • ▶️Cheat Sheet
    • Airchains
      • ▶️Installation
      • ▶️Cheat Sheet
    • Avail Network
      • ▶️Installation
      • ▶️Challenge Set Identity
      • ▶️Challenge Add Pool
    • Cortensor
      • ▶️Staking and Funding
      • ▶️Installation
      • ▶️Node Management
      • ▶️Monitoring
    • CrossFi
      • ▶️Installation
      • ▶️Cheat Sheet
    • Juneo Network
      • ▶️Installation
      • ▶️Create Supernet
      • ▶️Deploy a VM
    • Namada
      • ▶️Installation
      • ▶️Cheat Sheet
    • Pryzm
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
    • Swisstronik
      • ▶️Installation
      • ▶️Cheat Sheet
    • Symphony
      • ▶️Installation
      • ▶️Cheat Sheet
  • ⛑️Solidity Compiler
    • Hardhat
      • ▶️Installation
      • ▶️Setup Hardhat on Swisstronik Network
      • ▶️Write and compile the smart contract
      • ▶️Deploy the smart contract
      • ▶️Interact with the contract-Transaction
      • ▶️Interact with the contract-Call
      • ▶️Crafts and Mint Token ERC20
      • ▶️PERC20 (Private ERC20) Deploy, Mint and Transfer.
      • ▶️JSON RPC Call using ETH getStorage
Powered by GitBook
On this page

Was this helpful?

  1. TESTNET NODE
  2. Juneo Network

Create Supernet

Last updated 1 year ago

Was this helpful?

Please download the repository on your local machine. If you have installed on your system, please execute the following in your command line:

git clone https://github.com/Juneo-io/juneojs-examples

The required files will be found in the directory juneojs-examples.

Next, please open juneojs-examples in a command line and execute the following command:

npm install

After this, open juneojs-examples 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"

To perform the transactions required to deploy a Supernet, you will need to have funds on the P-chain. In this tutorial, we will first be crossing assets from the JUNE-chain to the JVM-chain, and then from the JVM-chain to the P-chain.

In a command line window open in the root of the JuneoJS library, execute the following:

npx ts-node ./src/docs/crossJUNEtoJVM.ts

This will cross 1.1 JUNE from the JUNE-chain to the JVM-chain. After this, we will cross 1 JUNE from the JVM-chain to the P-chain by executing the following command:

npx ts-node ./src/docs/crossJVMtoP.ts

The next step is the Supernet creation. Please execute the following in the comand line:

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

This will produce an output to the terminal containing your supernetID. Example: ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwh.

This is the id of the transaction that has created your Supernet, and is the id of the Supernet as well. Please save it as we will needed in the following steps.

Add a validator to the Supernet

The next step is to perform the addSupernetValidator transaction.

If your Supernet has no validators, all blockchains in that Supernet will be inactive and will not be able to process transactions.

Please open the file ./src/supernet/addSupernetValidator.ts in your code editor, and update the following variables to contain the correct values. Example:

const nodeId: string = 'NodeID-B2GHMQ8GF6FyrvmPUX6miaGeuVLH9UwHr'
const supernetId: string = 'ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP'
const durationInDays: number = 4 // number of days you will validate your Supernet

We will keep the durationInDays variable the same. However, you may update it to a diffent value.

The variable durationInDays must be less than the amount of remaining days your node will be validating the Primary network.

If your node has 5 days (or a little over 4 days) left of Primary Network validation, you must set durationInDays to 4 or less.

Then, execute this file:

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

This will add our node as a validator for our supernet. However, we need to perform an additional step before our node can begin validating our Supernet. First, please stop your node.

For users following the manual guide for setting up juneogo: please create a file titled config.json in the home directory.

For users following the install script guide for setting up juneogo: your config.json can already be found in the home directory.

In your config.json file, please include the configuration flag track-supernets, specifying the Supernets you want your node to track (in this case, the Supernet you have just created).

Example:

{
 "track-supernets":"ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP"
}

After saving the file, you may run your node again.

For users following the manual juneogo setup guide, please execute the following :

./juneogo --config-file="./config.json"

For users following the install script juneogo setup guide, please restart the juneogo service:

systemctl --user restart juneogo.service

Your node is now tracking the Supernet you have just created.

If your node is the only node validating your Supernet - once your node stops validating it, all chains within it will not be able to process transactions. You would have to re-perform the Add Supernet Validator transaction for your Supernet's chains to process transactions again.

You may now proceed to the next step: Deploy a VM.

For users who are running juneogo using : your config file can be found in the juneogo-docker/juneogo/.juneogo/config.json directory.

For users running juneogo using , please re-start your node using docker compose.

🛠️
▶️
juneojs-examples
git
juneogo-docker
juneogo-docker