Hello All,
It appears that solochance.com which I used in the past has gone offline.
Are there any websites or calculators that show statistical odds of finding a block when solo mining that allow you to enter your hashpower?
Thanks in advance.
You can do it yourself in any Linux device, just create a file called
get_prob.sh with this content:
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo 'Input the miner hashing power in GH/s as an argument' >&2
exit 1
fi
miner_hashrate=$(($1 * 10**9)) #GH/s is 10**9, TH/s is 10**12 and so on...
function jsonValue() { KEY=$1; num=$2; awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p; }
difficulty=`curl -sSL "https://mempool.space/api/blocks/" | jsonValue difficulty 1`
echo "Current difficulty: $difficulty"
total_hashes=`echo "4295032833.000015 * ${difficulty}" | bc -l`
miner_chances=`echo "${miner_hashrate} * 60 * 10 / ${total_hashes}" | bc -l`
miner_chances_percentage=`echo "${miner_chances} / 100" | bc -l`
echo "Miner chances of mining next block: ${miner_chances_percentage}%"
hours_per_block=`echo "${difficulty} * $((2**32)) / ${miner_hashrate} / 60 / 60.0" | bc -l`
days_per_block=`echo "${hours_per_block} / 24" | bc -l`
years_per_block=`echo "${days_per_block} / 365" | bc -l`
echo "Expected time to mine next block:"
if (( $(echo "${hours_per_block} < 48" |bc -l) )); then
echo "${hours_per_block} hours"
elif (( $(echo "${days_per_block} < 365" |bc -l) )); then
echo "${days_per_block} days"
else
echo "${years_per_block} years"
fi
Make it executable with:
And then just run it with the miner hashing power in GH/s as an argument. For example, for a single Compac F USB stick miner which runs at around 300 GH/s:
./get_prob.sh 300
Current difficulty: 28225928151211
Miner chances of mining next block: .00000000001484765218%
Expected time to mine next block:
12813.86757025801071742939 years
Sources:
[1]:
https://askubuntu.com/questions/1167287/parse-json-with-default-bash-only[2]:
https://en.bitcoin.it/wiki/Difficulty[3]:
https://bitcoin.stackexchange.com/questions/10398/how-is-the-probability-of-winning-a-block-calculated-from-the-difficulty[4]:
https://mempool.space/docs/api/rest#get-blocks