Skip to content
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

Edit submissions for cryptoburo #1097

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://testnet.storyscan.app/validators/storyvaloper1yg62vetnxwhnqxz73rm27d8wrs35c30ayhc2jz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://medium.com/@cryptoburo064_35601/comprehensive-guide-to-setting-up-a-story-protocol-validator-node-step-by-step-instructions-and-2adbaa87f567
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://youtu.be/QYKNEeT2G6g?si=KP6tliUytVMJ8lu3
79 changes: 79 additions & 0 deletions wave-2/submissions/CryptoBureau01/submission-general-task-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Submission-General-Task-1

## Automatic installer for the Story node

## Tool Installation Command

To install the necessary tools for managing your Story Protocol node, run the following command in your terminal:

```bash
cd $HOME && wget https://raw.githubusercontent.com/CryptoBureau01/Story-Node/main/setup.sh && chmod +x setup.sh && ./setup.sh
```

### Sources Repository:
[Story-Node-Tool Setup Script](https://github.com/CryptoBureau01/Story-Node/blob/main/setup.sh)


# Summary for Auto Script - Node Management

This script is designed to streamline and simplify node management operations for the Story Protocol. It offers a user-friendly, menu-driven interface that enables users to perform a wide range of tasks with minimal manual intervention.

## Key Features:
- **Dependency Management**: Easily install and configure all necessary dependencies for the node.
- **Binary Setup**: Manage binaries, including installation and updates, ensuring that the node runs on the correct versions.
- **Node Operations**: Start, stop, refresh, and monitor the status of the node through simple commands.
- **Validator Key Management**: Set up and manage validator keys, including functions for key generation, backup, and recovery.
- **Staking and Balances**: Check balances, stake tokens, and interact with the network in a secure and efficient manner.
- **Backup and Recovery**: Provides options for backing up and restoring node data, ensuring that important information is always safeguarded.

The script is interactive and waits for user input to select the desired operation, making it accessible to both beginners and experienced users managing Story Protocol nodes. By automating key tasks, the script reduces the complexity of node management, allowing users to focus on higher-level tasks.



# Code Breakdown (Menu Function)

1. **node_management_menu()**:
- This is the primary function that displays a menu to the user.
- The menu has 20 different options for managing various aspects of the Story Protocol node.
- **Options List**: A list of available actions, like "Install Dependencies," "Story-Geth Binary Setup," "Node Status," etc., is presented to the user.
- The script waits for user input, validates the selection, and then calls the appropriate function corresponding to the chosen option.

2. **Menu Options**:
- Each option is mapped to a specific function that performs a task. For example:

1. **Install-Dependencies**: Installs required software packages and libraries for the node.
2. **Story-Geth Binary Setup**: Sets up the Story-Geth binary for Ethereum-like layer interaction.
3. **Story Binary Setup**: Configures the Story Protocol's main binary for node operation.
4. **Setup Moniker Name**: Assigns a unique name (moniker) for your node.
5. **Update-Peers**: Updates the node’s peer list for network synchronization.
6. **Update-Snapshot**: Syncs the node using the latest blockchain snapshot.
7. **Stop-Node**: Safely stops the node's processes.
8. **Start-Node**: Starts and activates the node on the network.
9. **Refresh-Node**: Restarts the node to apply updates without long downtime.
10. **Logs-Checker**: Displays the node's logs for monitoring and debugging.
11. **Node-Status**: Shows the current status and health of the node.
12. **Validator-Info**: Provides details about the node’s validator status.
13. **Private-Key Checker**: Verifies and shows the node’s private key.
14. **Balance-Checker**: Checks the node’s token balance.
15. **Stake-IP**: Stakes tokens for validator participation.
16. **UnStake-IP**: Unstakes tokens, removing them from the staking pool.
17. **Full-Backup**: Backs up the node’s data and configurations.
18. **Recovery-Backup**: Restores a previously created backup.
19. **Remove-Node**: Completely uninstalls the node setup.
20. **Exit**: Closes the script and exits the menu.

3. **Interactive Prompt**:
The `while true` loop keeps the script running until the user selects the "Exit" option (Option 20).
For each selection, the script displays relevant information and calls the corresponding function to perform the action.

4. **Error Handling**:
If an invalid option is chosen, the script prompts the user to enter a valid number (between 1 and 20).


# Conclusion
This Auto Script for Node Management on the Story Protocol has been created by CryptoBuroMaster. It is a comprehensive solution designed to simplify and enhance the node management experience. By providing a clear and organized interface, it allows users to efficiently manage their nodes with ease. Whether you are a newcomer or an experienced user, this script empowers you to handle node operations seamlessly, ensuring that you can focus on what truly matters in your blockchain journey.



### Sources Repository:
[Story-Node-Tool Setup Script](https://github.com/CryptoBureau01/Story-Node/blob/main/setup.sh)
66 changes: 66 additions & 0 deletions wave-2/submissions/CryptoBureau01/submission-general-task-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@


# Submission-General-Task-2

**Service for providing archive & prunned snapshots**


## Snapsots Installation Command

To install the necessary Snapsots for managing your Story Protocol node, run the following command in your terminal:

```bash
cd $HOME && wget https://raw.githubusercontent.com/CryptoBureau01/Story-Node/main/update-snapshots.sh && chmod +x update-snapshots.sh && ./update-snapshots.sh
```

### Sources Repository:
[Story-Node-Tool Setup Script](https://github.com/CryptoBureau01/Story-Node/blob/main/update-snapshots.sh)



## Summary of the Script

This script automates the process of managing snapshots for the Story and Geth blockchain nodes. It includes the following main functionalities:

### Colorful Message Functions:
- **`print_info()`**: Prints messages in green for informational purposes.
- **`print_error()`**: Prints error messages in red.

### Root Check:
- The script checks if it's being run as the root user. If not, it displays an error message and exits.

### Package Installation:
- It installs the necessary packages `lz4` and `wget` using `apt-get`, ensuring they are available for later use.

### Backup of Private Key:
- It checks for the existence of the `priv_validator_state.json` private key file. If found, it backs it up; if not, it notifies the user.

### User Confirmation for Data Deletion:
- A function **`confirm_deletion()`** prompts the user to confirm whether they want to delete existing data.

### Snapshot Management:
- Users can choose between two options: **Archive** and **Pruned** snapshots.
- Depending on the user's choice, the script downloads the selected snapshot (either for Story or Geth) and extracts it to the appropriate directory.
- It deletes any old snapshots before downloading new ones and cleans up after extraction.

### Restoration of Private Key:
- After downloading and extracting the snapshots, it checks for a backup of the `priv_validator_state.json` file to restore it if available.

### User Prompt:
- At the end, the script prompts the user to choose between **Archive**, **Pruned**, or **Exit** options to proceed accordingly.

## User Flow:
- The user is prompted to choose between two types of snapshots.
- Depending on their choice, the script performs the necessary operations to manage snapshots, ensuring data integrity by backing up and restoring the private key as needed.
- The process concludes with a success message upon completion of the snapshot synchronization.

## Sync Status Check:
- The function uses the /status API endpoint to get the node's sync information.

This script is useful for users managing blockchain nodes, ensuring that the process of handling snapshots is efficient and user-friendly.



### Sources Repository:
[Story-Node-Tool Setup Script](https://github.com/CryptoBureau01/Story-Node/blob/main/update-snapshots.sh)