Giter VIP home page Giter VIP logo

benchmarking-tool's Introduction


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.

benchmarking-tool's People

Contributors

gitgab19 avatar shourya742 avatar marathon-gary avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.