As a team of validators, Stone Keyboard undertook the task of integrating, testing, and participating in the PoRA mining algorithm of the 0G Storage Node. Here is a detailed account of our approach:
Step 1: Cloning the Repository
git clone https://github.com/0glabs/0g-storage-node.git
cd 0g-storage-node
Step 2: Installing Dependencies
Follow the documentation to install the necessary dependencies, which typically include Rust and Python.
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Python dependencies
pip install -r requirements.txt
Step 3: Running Tests
This step ensures that the project is functioning correctly on your system.
cargo test
To integrate the SDK with our existing systems:
Step 1: Installing the SDK
pip install 0g-sdk
Step 2: Example Usage of the SDK
from og_sdk import StorageNodeClient
client = StorageNodeClient('http://localhost:8000')
# Example of creating and reading data
client.put('key', 'value')
value = client.get('key')
print(value)
This code demonstrates basic SDK integration for interacting with the storage node.
To participate in PoRA mining:
Step 1: Setting Up the Mining Node
Follow the documentation to set up and run the mining node.
Step 2: Running the Mining Node
cargo run --bin mining-node
Step 3: Monitoring and Optimization
Monitor your node's performance and optimize it to maximize rewards.