Skip to content

Latest commit

 

History

History
184 lines (123 loc) · 9.47 KB

README.md

File metadata and controls

184 lines (123 loc) · 9.47 KB


SRI
Stratum V2 - Benchmarking Tool 📏

Overview

Stratum V2 is an essential upgrade to the current pooled mining protocol, Stratum. The existing protocol centralizes transaction selection in mining pools, making them potential attack vectors. Stratum V2 decentralizes this by allowing individual miners to create block templates, enhancing security and performance through an encrypted, binary protocol.

To promote the adoption of Stratum V2, a comprehensive benchmarking tool is needed. This tool tests and compares the performance of Stratum V1 and V2 in various mining scenarios, helping the mining industry understand and benefit from the new protocol.

🎯 Goals

  1. Enable miners and pool operators to easily test and benchmark SRI configurations
  2. Facilitate testing, bug reporting, and feedback collection
    • Provide a testing suite for each SRI configuration
    • Allow easy customization of role configurations
    • Integrate bug reporting mechanisms into the testing tool
  3. Provide a pre-built benchmarking tool for evaluating SV2 protocol performance
    • Generate benchmark data for each SRI configuration
    • Automatically generate reports containing benchmark data
    • Compare protocol performance between SV2 and SV1
    • Allow external verification of benchmark data documented in the future SV1-SV2 comparison report

✨ Features

  • Comprehensive Testing Suite: Evaluate different SRI configurations with customizable role settings.
  • Automated Benchmarking: Generate and collect performance data automatically for both Stratum V1 and Stratum V2.
  • Detailed Reporting: Create detailed reports comparing protocol performance, with easy-to-understand metrics and visualizations.
  • Integrated Bug Reporting: Facilitate bug reporting and feedback collection directly within the tool.

📚 To dig more into tool's features. or understand how it is built, please have a look at docs/ and read the requirements document or visualize the system design diagram.

🐳 Prerequisites

  1. Install Docker on your system: https://docs.docker.com/engine/install/

⛏️ Getting Started

Automatic Setup 🚀

For the easiest setup, use the provided script to automatically configure and start the benchmarking tool:

  1. Download or clone the repository if you haven't already:

    git clone https://github.com/stratum-mining/benchmarking-tool.git
    cd benchmarking-tool
  2. Run the benchmarking tool setup script:

    ./run-benchmarking-tool.sh

    The script will guide you through the process, allowing you to select configurations, networks, and other parameters interactively.

Manual Setup 🛠

If you prefer to set up the benchmarking tool manually, follow these detailed steps:

  1. Clone the repository:

    git clone https://github.com/stratum-mining/benchmarking-tool.git
    cd benchmarking-tool
  2. Configure the benchmarking parameters: To configure the benchmarking tool, you'll need to update several parameters based on your specific requirements:

  3. Start the benchmarking tool: After updating the configuration files, start the benchmarking tool using Docker Compose with the appropriate configuration file.

    To run configuration A:

    docker compose -f docker-compose-config-a.yaml up -d

    To run configuration C:

    docker compose -f docker-compose-config-c.yaml up -d
  4. Point miners to the following endpoints

    • For Stratum V1:

      stratum+tcp://<host-ip-address>:3333

      🚨 For SV1, you should use the address format [bitcoin_address].[nickname] as the username in your miner setup. E.g. to correctly run a CPU miner, you need to run it with: ./minerd -a sha256d -o stratum+tcp://127.0.0.1:3333 -q -D -P -u tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8.sv2-gitgab19

    • For Stratum V2:

      stratum+tcp://<host-ip-address>:34255

    💡If you don't have a physical miner, you can do tests with CPUMiner. Setup the correct CPUMiner for your OS:

    On the CPUMiner directory:

    ./minerd -a sha256d -o stratum+tcp://<host-ip-address>:34255 -q -D -P
  5. Access the Grafana dashboard 📊

    Open your browser and navigate to http://localhost:3000/d/64nrElFmk/sri-benchmarking-tool

grafana-dashboard


  1. Explore and export data 📄

    Navigate between your charts, and click the Report button placed in the top right corner to download a PDF containing plots and data for the desired timeframe selected

    👉 it will take some minutes to generate a complete PDF, so please be patient :)

  2. Analize report 📄

    To effectively analyze the report produced by this tool, it is recommended to review the following document that explains the tool's architecture, the methodology for metrics collection, and provides guidelines for analyzing the report: https://github.com/stratum-mining/benchmarking-tool/tree/main/docs/benchmarking-tool-overview.pdf

    This comprehensive document will help you understand the data and draw meaningful conclusions from your benchmarking results.

  3. Download Logs from the Grafana Dashboard

    We’ve added a feature that allows you to download logs of all containers directly from the Grafana dashboard. Here’s how to use it:

    • Navigate to the Grafana dashboard.
    • Look for the 'Download Logs' button and click on it.
    • The logs will be downloaded as a .tar file.

    To check logs of the containers and if facing any issues and want help, kindly share the logs in the benchmarking channel on Discord.

🛣 Roadmap

The roadmap of this project can be found here.

A GitHub project board is also used for defining specific milestones and prioritizing tasks: https://github.com/orgs/stratum-mining/projects/10

📖 License

This software is licensed under Apache 2.0 or MIT, at your option.