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

Add integration test for auth failure between mining_device and a pool #1164

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Sep 16, 2024

  1. Remove unused fn

    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    14a44aa View commit details
    Browse the repository at this point in the history
  2. Add error handling to PoolSv2::start

    Handle errors in `start` function for better user experience and to be
    able to catch errors in test environment, for example without
    introducing error handling, we do not get a proper response if the
    provided `coinbase_output` in the config is valid.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    261e818 View commit details
    Browse the repository at this point in the history
  3. Add PoolSv2::state

    Adds a new property `state` to the pool struct. The main goal is
    providing abilities to mutate the state internally, i.e. only by the
    role itself, and abilities to view the state by the role runner.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ac99a06 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a4033af View commit details
    Browse the repository at this point in the history
  5. Add TestPoolSv2 test module

    A utility struct that wraps the original `PoolSv2` and provide some
    utility to start the pool role in testing env.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    02c4dc3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3a80407 View commit details
    Browse the repository at this point in the history
  7. Separate lib code from bin in mining-device

    Isolating the library code into a `lib/mod.rs` and consume it in
    `main.rs`.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e23fbe6 View commit details
    Browse the repository at this point in the history
  8. Handle mining_device open channel error case

    .. just return the error to the user to give an indication that an
    error occurd.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b49416c View commit details
    Browse the repository at this point in the history
  9. Save dropped PoolSv2 downstreams

    This commit adds a new property to the `Running` state called
    `DroppedDownstreams` that saves a vector of `Vec<u32>`, u32 referring to
    the `downstream_id`.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    08afc09 View commit details
    Browse the repository at this point in the history
  10. Add integration test for mining device auth..

    failure with a pool.
    
    This test run a `TemplateProvider`, `PoolSv2` and a `mining_device`
    with the auth-failure flag enable which will result in the `PoolSv2` to
    reject the `mining_device`.
    jbesraa committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    4ae9608 View commit details
    Browse the repository at this point in the history