Skip to content

Liberdus/validator-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The Operator CLI is a command line tool for managing a validator instance on a Liberdus network. The Operator CLI tool also collects debug data from running Shardus app network.

Getting Started with Local Development

Before running Shardus CLI, it's essential to set up the Liberdus server. Detailed instructions for this setup can be found in the Liberdus README.

Cloning and Preparing the CLI

Clone the Shardus CLI repository and navigate into the project directory:

git clone git@github.com:liberdus/validator-cli.git
cd validator-cli

The validator CLI typically requires a symlink to the Liberdus repo at a specific path. If you're running the CLI manually, ensure the symlink is set up correctly:

ln -s /path/to/liberdus/repo ../validator
ls ../validator  # Should print the liberdus repo

Installing Dependencies

Install the necessary dependencies and link the CLI for global accessibility:

npm ci && npm link

Utilizing the Shardus CLI

You can customize network configuration in default-network-config.ts file. After configuring, make sure to compile again using npm run compile.

default-network-config.ts config for running a local network node:

export const defaultNetworkConfig = {
  server: {
    baseDir: '.',
    p2p: {
      existingArchivers: [
        {
          ip: '127.0.0.1',
          port: 4000,
          publicKey:
            '758b1c119412298802cd28dbfa394cdfeecc4074492d60844cc192d632d84de3',
        },
      ],
    },
    ip: {
      externalIp: '127.0.0.1',
      externalPort: 9050,
      internalIp: '127.0.0.1',
      internalPort: 10045,
    },
    reporting: {
      report: true,
      recipient: 'http://localhost:3000/api',
      interval: 2,
      console: false,
    },
  },
};

For running on the live Atomium network, use:

export const defaultNetworkConfig = {
  server: {
    baseDir: '.',
    p2p: {
      existingArchivers: [
        {
          ip: '198.58.110.213',
          port: 4000,
          publicKey:
            'd34b80a5a6f9638b7c75d6eb6e59d35d9a3e103f1877827eebbe973b8281f794',
        },
        {
          ip: '3.73.66.238',
          port: 4000,
          publicKey:
            '7af699dd711074eb96a8d1103e32b589e511613ebb0c6a789a9e8791b2b05f34',
        },
        {
          ip: '35.233.225.113',
          port: 4000,
          publicKey:
            '59c3794461c7f58a0a7f24d70dfd512d4364cd179d2670ac58e9ae533d50c7eb',
        },
      ],
    },
    ip: {
      externalIp: '127.0.0.1',
      externalPort: 9001,
      internalIp: '127.0.0.1',
      internalPort: 10001,
    },
    reporting: {
      report: true,
      recipient: 'http://localhost:3000/api',
      interval: 2,
      console: false,
    },
  },
};

Starting the CLI

To initiate the Shardus CLI, run:

operator-cli start

Set password for logging into the GUI

operator-cli gui set password 123456 #log into the GUI with 123456 as your password

Checking CLI Status

operator-cli status

For a complete list of node commands, check the node-commands.ts file.

For GUI-related commands, refer to the gui-commands.ts file.

Getting Started with Local Development

Before running Shardus CLI, it's essential to set up the Liberdus server, JSON RPC server and configure CLI with updated node details.

git clone git@github.com:liberdus/validator-gui.git
cd validator-gui

Install Dependencies

npm install

Set Environment Variables & Link to Operator CLI

  1. Create a .env file in the root directory and configure necessary environment variables as required. If running the RPC locally, set the NEXT_PUBLIC_RPC_URL variable.
export NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8081

Adjust the port (8081 in this example) as needed.

.env file configuration for running against a local network:

NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8080
PORT=8081
RPC_SERVER_URL=http://127.0.0.1:8080
  1. Link to the Operator CLI and set the environment to development:
npm link operator-cli
export NODE_ENV=development

Build and Start the Development Server

npm run build
npm run start

Contributing

Contributions are very welcome! Everyone interacting in our codebases, issue trackers, and any other form of communication, including chat rooms and mailing lists, is expected to follow our code of conduct so we can all enjoy the effort we put into this project.

Community

For help, discussion about code, or any other conversation that would benefit from being searchable:

Discuss Liberdus on GitHub

For chatting with others using Liberdus:

Join the Liberdus Discord Server

About

User interface for the node runners to control the Liberdus validator from browser

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 25

Languages