-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #38
Open
kenny-io
wants to merge
2
commits into
dev
Choose a base branch
from
kenny-io-patch-1
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update README.md #38
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,196 +1,109 @@ | ||
# Overview | ||
# Shardeum Validator GUI | ||
|
||
The Operator CLI is a command line tool for managing a validator instance on a Shardeum network. The Operator CLI tool also collects debug data from running Shardus app network. | ||
## Overview | ||
|
||
## Getting Started with Local Development | ||
The Shardeum Validator GUI provides a user-friendly graphical interface for managing nodes on the Shardeum network. This tool simplifies the process of monitoring and controlling your nodes, making it easy and accessible to all users of varying experiences. | ||
|
||
Before running Shardus CLI, it's essential to set up the Shardeum server. Detailed instructions for this setup can be found in the [Shardeum README](https://github.com/shardeum/shardeum). | ||
## Prerequisites | ||
|
||
### Cloning and Preparing the CLI | ||
Before setting up the Validator GUI, ensure you have the following components installed and configured: | ||
|
||
Clone the Shardus CLI repository and navigate into the project directory: | ||
1. [Shardeum server](https://github.com/shardeum/shardeum) | ||
2. [JSON RPC server](https://github.com/shardeum/json-rpc-server) | ||
3. [Shardeum Validator CLI](https://github.com/shardeum/validator-cli) (configured) | ||
|
||
```bash | ||
git clone [email protected]:shardeum/validator-cli.git | ||
cd validator-cli | ||
``` | ||
## Installation and Setup | ||
|
||
The validator CLI typically requires a symlink to the Shardeum repo at a specific path. If you're running the CLI manually, ensure the symlink is set up correctly: | ||
### 1. Clone the Repository | ||
|
||
```bash | ||
ln -s /path/to/shardeum/repo ../validator | ||
ls ../validator # Should print the shardeum repo | ||
git clone [email protected]:shardeum/validator-gui.git gui | ||
cd gui | ||
``` | ||
|
||
### Installing Dependencies | ||
|
||
Install the necessary dependencies and link the CLI for global accessibility: | ||
### 2. Install Dependencies | ||
|
||
```bash | ||
npm ci && npm link | ||
``` | ||
|
||
### Utilizing the Shardus CLI | ||
|
||
You can customize network configuration in [default-network-config.ts](./src/config/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: | ||
|
||
```ts | ||
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: | ||
|
||
```json | ||
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, | ||
}, | ||
}, | ||
}; | ||
npm install | ||
``` | ||
|
||
#### Starting the CLI | ||
### 3. Configure Environment | ||
|
||
To initiate the Shardus CLI, run: | ||
Create a `.env` file in the root directory with the necessary environment variables. For a local network setup, use: | ||
|
||
```bash | ||
operator-cli start | ||
``` | ||
|
||
### Set password for logging into the GUI | ||
|
||
```bash | ||
operator-cli gui set password 123456 #log into the GUI with 123456 as your password | ||
``` | ||
|
||
#### Checking CLI Status | ||
|
||
```bash | ||
operator-cli status | ||
NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8080 | ||
PORT=8081 | ||
RPC_SERVER_URL=http://127.0.0.1:8080 | ||
``` | ||
|
||
For a complete list of node commands, check the [node-commands.ts](./src/node-commands.ts) file. | ||
|
||
For GUI-related commands, refer to the [gui-commands.ts](./src/gui-commands.ts) file. | ||
|
||
## Getting Started with Local Development | ||
Note: Adjust these values according to your specific network configuration. | ||
|
||
Before running Shardus CLI, it's essential to set up the [Shardeum server](https://github.com/shardeum/shardeum), [JSON RPC server](https://github.com/shardeum/json-rpc-server) and configure [CLI](https://github.com/shardeum/validator-cli) with updated node details. | ||
### 4. Link Operator CLI and Set Environment | ||
|
||
```bash | ||
git clone [email protected]:shardeum/validator-gui.git | ||
cd validator-gui | ||
npm link operator-cli | ||
export NODE_ENV=development | ||
``` | ||
|
||
### Install Dependencies | ||
### 5. Build and Launch | ||
|
||
```bash | ||
npm install | ||
npm run build | ||
npm run start | ||
``` | ||
|
||
### Set Environment Variables & Link to Operator CLI | ||
### 6. Access the Dashboard | ||
|
||
Open your web browser and navigate to `http://localhost:8081` (or the port you specified in the `.env` file). | ||
|
||
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. | ||
Log in using the password set in the Validator CLI. If you haven't set a password yet, you can do so by running the following command in the CLI directory: | ||
|
||
```bash | ||
export NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8081 | ||
operator-cli gui set password <your-chosen-password> | ||
``` | ||
|
||
Adjust the port (8081 in this example) as needed. | ||
## Usage | ||
|
||
`.env` file configuration for running against a local network: | ||
The Validator GUI dashboard provides various features for managing your Shardeum nodes: | ||
|
||
```bash | ||
NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8080 | ||
PORT=8081 | ||
RPC_SERVER_URL=http://127.0.0.1:8080 | ||
``` | ||
1. **Node Status**: Monitor the current status of your node. | ||
2. **Performance Metrics**: View key performance indicators and network statistics. | ||
3. **Configuration Settings**: Adjust node settings through the GUI. | ||
4. **Reward Tracking**: Monitor your earned rewards and payout history. | ||
5. **Network Information**: Access real-time data about the Shardeum network. | ||
|
||
2. Link to the Operator CLI and set the environment to development: | ||
Explore the intuitive interface to familiarize yourself with all available features. | ||
|
||
```bash | ||
npm link operator-cli | ||
export NODE_ENV=development | ||
``` | ||
## Troubleshooting | ||
|
||
### Build and Start the Development Server | ||
If you encounter issues: | ||
|
||
```bash | ||
npm run build | ||
npm run start | ||
``` | ||
1. Ensure all prerequisites are correctly installed and configured. | ||
2. Verify that the Shardeum network and JSON RPC server are running. | ||
3. Check the console for any error messages. | ||
4. Ensure the environment variables in the `.env` file are correct. | ||
5. Restart the GUI application after making any configuration changes. | ||
|
||
## 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](./CODE_OF_CONDUCT.md) so we can all enjoy the effort we put into this project. | ||
We welcome contributions to improve the Shardeum Validator GUI! Please follow these steps: | ||
|
||
1. Fork the repository | ||
2. Create a feature branch | ||
3. Commit your changes | ||
4. Push to the branch | ||
5. Open a Pull Request | ||
|
||
Ensure that you adhere to our [code of conduct](./CODE_OF_CONDUCT.md) in all interactions within the project ecosystem. | ||
|
||
## Community | ||
## Community and Support | ||
|
||
For help, discussion about code, or any other conversation that would benefit from being searchable: | ||
Join our vibrant community for support, discussions, and updates: | ||
|
||
[Discuss Shardeum on GitHub](https://github.com/shardeum/shardeum/discussions) | ||
- [GitHub Discussions](https://github.com/shardeum/shardeum/discussions): For technical discussions and searchable conversations. | ||
- [Discord Server](https://discord.com/invite/shardeum): For real-time chat and community interaction. | ||
|
||
For chatting with others using Shardeum: | ||
## License | ||
|
||
[Join the Shardeum Discord Server](https://discord.com/invite/shardeum) | ||
[LICENSE](./LICENSE.md) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment about the "cli" folder applies to "gui" as well :)