Skip to content

Commit

Permalink
add explanations of handicap and nominal hashrate multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed Oct 9, 2024
1 parent 3b8ade7 commit 1ae28db
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions roles/test-utils/mining-device/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,30 @@ Usage example:
```
cargo run --release -- --address-pool 127.0.0.1:20000 --id-device device_id::SOLO::bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
```

## handicap

CPU mining could damage the system due to excessive heat.

The `--handicap` parameter should be used as a safety mechanism to slow down the hashrate in order to preserve hardware.

## nominal hashrate multiplier

Let's imagine that:
- the upstream wants to receive shares every ~100s (on average)
- the CPU miner nominal hashrate is 1k H/s

Maybe we want to do a test where we don't want to wait ~100s before a share is submitted by the CPU miner.

In that case, we need the CPU miner to advertise a smaller hashrate, which will force the upstream to set a lower
difficulty target.

The `--nominal-hashrate-multiplier` can be used to advertise a custom nominal hashrate.

In the scenario described above, we could launch the CPU miner with `--nominal-hashrate-multiplier 0.01`.

The CPU miner would advertise 0.01k H/s, which would cause the upstream to set the difficulty target such that the CPU miner would find a share within ~1s.

This feature can also be used to advertise a bigger nominal hashrate by using values above `1.0`.

That can also be useful for testing difficulty adjustment algorithms on Sv2 upstreams.

0 comments on commit 1ae28db

Please sign in to comment.