Bitcoin Forum
May 17, 2024, 05:42:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: solomining probability calculator  (Read 341 times)
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 28, 2023, 12:24:23 AM
Last edit: January 28, 2023, 11:01:50 AM by citb0in
Merited by Welsh (6), mikeywith (4), ABCbits (2), Daltonik (2), Pmalek (1), DdmrDdmr (1), paid2 (1), akaki (1)
 #1

Hello all,

The following post grew out of a discussion of another post. There the user akaki had criticized that in solomining one cannot simply multiply the calculated probability of a block hit per block average time of 10min with any desired time frame that would result in the probability e.g. for 1h, or a day, or a year. The user mikeywith has thankfully countered with very informative posts and explained the opposite. Since I wanted to dedicate myself to this topic intensively and learn more, I made a learning project out of it and wrote a Python program in parallel, which I constantly extended. This way I could try out different approaches and implement my learning into a working program right away.

At this point again a BIG THANKS to @mikeywith, who has really animated me to do this and has helped with his valuable explanations on.

I had already recommended the moderators to move the corresponding posts #46 - #56 to a new thread here in the technical forum, since this has become off-topic after all, but the mods probably haven't seen or wanted to implement that yet. I think it is appropriate to move the discussion here on technica part of the forum so that it is clear to everyone what it was actually about and on this way more information and a good discussion could follow.

All this resulted in the following python tool which I have uploaded to my repository [1] and would like to share with interested parties. I would like to add that I'm a complete Python beginner and still taking the first steps, so bear with me and correct me if you find any gross errors. I am also open to recommendations or constructive advice and will try to implement them in my free time. The goal is to learn and continue to have fun.

The "Solomining Probability Calculator" is a tool designed to assist solo miners in understanding their chances of successfully mining a block on the Bitcoin network. The program takes the user's hash rate as input, supporting various formats for ease of use. It also retrieves the current Bitcoin network difficulty which is then used to calculate a range of important mining metrics. These include the ratio of all hashes over the valid hashes, the probability of each single hash attempt, expected time to mine a block and the probability of successfully mining a block for various time frames. Additionally, the program offers helpful analogy and phrases to provide a better human-understanding of the probabilities, making it easier for users to interpret the results. With this tool, solo miners can gain valuable insights into their mining operations and make more informed decisions. Overall, the solomining probability calculator is a valuable tool for any solo miner looking to increase their chances of success in the competitive world of cryptocurrency mining.

If you like it and are interested, I could imagine to move the function to a website. This is because I have found that the solochance.com website that I am familiar with does not include current Difficulty values, and thus the calculations are not accurate when I compare them to others and my own calculations. I may be wrong, but I suspect that the relevant values like "difficulty" or "nbits" are not kept up to date there or may be manually entered by the operator from time to time. That would explain the deviation. For this reason, I was thinking about using my existing Python program as a basic framework to create a website with that functionality and output. I think I would have to rewrite that in JavaScript, which would be again (almost) new territory for me but if there is great interest then I would tackle that. Just let me know.

Have fun and a nice weekend.
citb0in

[1] https://github.com/citb0in/solomining_probability_calc

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 28, 2023, 12:30:40 AM
 #2

Hello,

For me there is a huge mistake in the calculation of the winning chances :

Quote
Chance calculation to hit a block in solo mining using different hashrate examples:

at   1 PH/s --> 1 in 267.342 per block or 1 in 1.857 per 24h
at 2.5 PH/s --> 1 in 106,937 per block or 1 in   743 per 24h
at   5 PH/s --> 1 in  53,468 per block or 1 in   371 per 24h
at  10 PH/s --> 1 in  26,734 per block or 1 in   186 per 24h
at  25 PH/s --> 1 in  10,694 per block or 1 in    74 per 24h
at  50 PH/s --> 1 in   5,347 per block or 1 in    37 per 24h

You can't say for example that there are 144 blocks mined each 24h (=1 each 10 min) and thus if we run the miner 24h non-stop we multiply our chances by 144.
Yet this is the reasonning applied as for example : with a hash rate of 50 PH/s --> chance per block = 1/5347 --> chance per 24h = 144/5347 = 1/37 which is false.

Since the draws are independent for mining each new block, the chances are constant as long as the hash rate is constant and no matter how many times you repeat the mining attempts.

There is a topic in wikipedia that gives a better explanation : https://en.wikipedia.org/wiki/Gambler%27s_fallacy

If the project of @Willi9974 is also based on the assumption that we increase the chances by mining for longer periods of time, then a lot of people might be loosing their money.




Since the draws are independent for mining each new block, the chances are constant as long as the hash rate is constant and no matter how many times you repeat the mining attempts.
Correct.

For me there is a huge mistake in the calculation of the winning chances
[...]
If the project of @Willi9974 is also based on the assumption that we increase the chances by mining for longer periods of time, then a lot of people might be loosing their money.

You seem to have something mixed up. Willi9974 meant the following: if you would for example mine with an existing total amount "x" with 25 PH/s hashrate for 6h duration, then the chances of a block hit are exactly the same as if you would mine with the same amount "x" with 50 PH/s for 3h duration, which with 5 PH/s hashrate for 30h duration. And this is a correct statement.

Solo mining as it is done here and also by Willi9984 is clear to everyone and should be considered gambling. You should only bet as much as you are willing to lose.
The values are derived from solochance.com. For further questions about the calculation and the background, you are welcome to contact the developer in this thread.




Since the draws are independent for mining each new block, the chances are constant as long as the hash rate is constant and no matter how many times you repeat the mining attempts.
Correct.

For me there is a huge mistake in the calculation of the winning chances
[...]
If the project of @Willi9974 is also based on the assumption that we increase the chances by mining for longer periods of time, then a lot of people might be loosing their money.

You seem to have something mixed up. Willi9974 meant the following: if you would for example mine with an existing total amount "x" with 25 PH/s hashrate for 6h duration, then the chances of a block hit are exactly the same as if you would mine with the same amount "x" with 50 PH/s for 3h duration, which with 5 PH/s hashrate for 30h duration. And this is a correct statement.

Solo mining as it is done here and also by Willi9984 is clear to everyone and should be considered gambling. You should only bet as much as you are willing to lose.
The values are derived from solochance.com. For further questions about the calculation and the background, you are welcome to contact the developer in this thread.


Sorry, I insist because people might be fooled (and loose money) by the chances of mining a block that were announced.

You say that I'm correct about the Gambler's Fallacy but you are still talking about time. Hashrate and only hashrate matters for the probability of mining a block.

[chance with 50 PH/s for 3h] > [chance with 25 PH/s for 6h] > [chance with 5 PH/s for 30h] that is simply because you can remove "for xh".

The post should be edited to :

Chances to mine a block are :

at   1 PH/s --> 1 in 267.342 per block
at 2.5 PH/s --> 1 in 106,937 per block
at   5 PH/s --> 1 in  53,468 per block
at  10 PH/s --> 1 in  26,734 per block
at  25 PH/s --> 1 in  10,694 per block
at  50 PH/s --> 1 in   5,347 per block

and yet I didn't check the latter, it could be worse.

The calculation in "solochance.com" is also wrong. I don't know if it's intentionally to just encourage people to use a solo-mining service.




Hashrate and only hashrate matters for the probability of mining a block.
[...]
[chance with 50 PH/s for 3h] > [chance with 25 PH/s for 6h] > [chance with 5 PH/s for 30h] that is simply because you can remove "for xh".

The more I have dealt with it, the more clearly I agree with you. You are absolutely right. There's no guarantee you'll hit a block with any amount of hashrate, simply better odds the more hash rate you use. Time is useless in that calculation. I have adjusted the original post in this section. Thank you for your attention and advice.



If the project of @Willi9974 is also based on the assumption that we increase the chances by mining for longer periods of time, then a lot of people might be loosing their money.

They do not increase the chances by mining for a longer period with a lower hashrate, but also, no one is losing money, I am not sure why are you taking the time factor out of the equation when you are hashing against x for x period.

To put this in a simpler form, when you pay 100$ you get 100 shares, in other words, 100 shots to solve a block, whether you take those chances in 1 minute or over the course of 10 days it makes exactly no difference, the chances of those 100 shares hitting a block remain the same.

What really matters here is the TOTAL NUMBER of shares you submit, not how FAST you submit them, every share is an independent event that has the ability to be a block solver, if what you think is true then mining pools would operate in a different manner.

Binance and Viabtc will join forces to increase their hashrate, say each has 10EH worth of hashrate, they would mine for Binance wallet with 20EH for 12 hours, and then 20EH for Viabtc wallet for the remaining 12 hours, and then at the end of the day, they would end up with more coins than having mined individually for 24 hours with 10EH each, that is not true by any means.

The fact is, that 20EH produced 20EH per second for 12 hours which is the same number of shares that 2*10EH*24 hours, you are missing a major point here which is the power you rent is sold as in Hashes per SECONDS.

And as for the Gambler's fallacy, it has nothing to do with why OP's initial numbers are correct,  not sure why he agreed to your claim and changed the post. Cheesy


If anyone still thinks that 50PH for 3 hours doesn't have the exact same chances of hitting a block with 25PH for 6 hours, go ahead and email all the large 10 pools that make up 90% of the hashrate and tell them you found a cheat code for mining, let them join their 300EH together and mine to one wallet every 24/10 hours so they can increase their chances of hitting blocks and end up with more BTC by the end of the month.



And a second point is: when you rent the hashrate, the more hashrate you rent at the same time, the higher the price, you get less shares for the same budget. So rather rent less speed but longer time.
At the end the same price, but you get more shares. Cost per share is lower at lower speed. Supply and demand on a hash rental place.

Best regards,
Willi



In my opinion, two different statements are considered, both of which are correct and are unintentionally mixed, which is why they lead to different opinions.

A)
What akaki meant is that the odds calculation related to the block is correct. To illustrate it in another example: you have a dice and the goal is to roll a six. You are only allowed to roll once every 10min. To the question "What is the chance to roll a six?" the correct answer is always the same, it is "1/6", so the probability is 0.16667 % to roll a six. Just because you are allowed to roll again the dice 10min later, it does not mean that the probability to roll a six increases. It always and steadily remains 1/6.

B)
What mikeywith and willi9974 mean refers to the comparison between using 50 PH/s for 3h or renting 10 PH/s for 30h with the same money available for the hashrate rent. Here, the factor of the amount of use comes into consideration, since you have to rent the hashrate on the marketplace at the prices available. And inevitably coupled to the hash rate and the price is also the factor time. Therefore, this consideration should only be compared within this group (B), but not mixed with (A).

What the creator of the solochance.com website and many others do is: they multiply/divide the probability of a block hit (related to the block) by the number of 10min periods and thus mix the result with time. However, the time factor has no consideration in the probability calculation. The result of the thus faked probability is thereby glossed over.  At least that's how I understood it, which is why I think that both statements are correct.



In my opinion, two different statements are considered, both of which are correct and are unintentionally mixed, which is why they lead to different opinions.

I have to disagree, akaki put and end to all speculation by saying

Quote
[chance with 50 PH/s for 3h] > [chance with 25 PH/s for 6h] > [chance with 5 PH/s for 30h]

The quoted statement is just wrong, the correct statement would be

Quote
[chance with 50 PH/s for 3h] = [chance with 25 PH/s for 6h] = [chance with 5 PH/s for 30h]

or

Quote
[chance with 50 PH/s ] > [chance with 25 PH/s ] > [chance with 5 PH/s ]



Quote
What akaki meant is that the odds calculation related to the block is correct. To illustrate it in another example: you have a dice and the goal is to roll a six. You are only allowed to roll once every 10min. To the question "What is the chance to roll a six?" the correct answer is always the same, it is "1/6", so the probability is 0.16667 % to roll a six. Just because you are allowed to roll again the dice 10min later, it does not mean that the probability to roll a six increases. It always and steadily remains 1/6.

I don't think this is what he meant, but anyways, this illustration is wrong, there is no such thing as "roll once every 10 min" you roll as often as you can, it's just that difficulty that "ensures" you only get 2016 six in 2 weeks assuming you don't increase the rolls.


Quote
What the creator of the solochance.com website and many others do is: they multiply/divide the probability of a block hit (related to the block) by the number of 10min periods and thus mix the result with time. However, the time factor has no consideration in the probability calculation. The result of the thus faked probability is thereby glossed over.
 

The numbers on solochance.com are perfectly correct, looking at akaki post history, I am surprised to why he is confusing himself, he seems to be pretty good at math, maybe missing the logic.


Let's clear up some confusion:

The difficulty adjusts based on the time it took to solve the previous 2016 blocks (more like 2015 blocks due to some bug in the code but can be ignored for now)

So, if the difficulty of the previous epoch was 10 units, and the time it took to solve 2016 blocks was 2 weeks, the difficulty will stay at 10 units, this brings the question, how did the pace of finding blocks get to exactly 2 weeks or 10 minutes average block time? it's because the NUMBER of hahses produced by miners remained the same.


So epoch A had a diff of 10 units and the number of hashes was 1000, based on the difficulty of 10 those 10000 shares can only possibly find 2016 blocks in a period of 2 weeks/avg block time was 10 mins.

see that 10 units of difficulty couldn't care less how the 1000 hahses were generated, if all the miners shutdown their gears for 13 days and do manage to hash 1000 hashes on the 14th day, the block average will still be 10 mins and thus no diff change will accur.

using the dice analogy, you are required to roll 6 at the first epoch, the protocol wants you to hit just one 6 every 10 mins, if you manage to hit more 6s in under 10 mins, the requirement will change, and you are now forced to roll two 6s in a row, now that will need 10 mins to happen, if you do more rolls and manage to hit two 6s in less than 10 mins you will be required to roll three 6s and so on.

while rolling a die every time is an independent event, you will still hit a 6 on average every 6 rolls, you can test it yourself, roll a dice 60000 times and you will likely get 10000 six Cheesy,

Still at the dice analogy, the bitcoin dice is actually 2^256, the number of dice sides that can solve a block is determined by the difficulty/target, simply put, with the current difficulty of 37.89T every hash has 1 in 37,885,054,421,573 chance of hitting a block.

let's do more math for fun, the time it takes you to find a block is

time in seconds = difficulty * 2^32 / hashrate in seconds

with 50PH the equation is

((37885054421573 * 2^32 / 50000000000000000) / (3600))  = 903 hours
 on average to hit a block, let this 903 hours sink in for a while because we will use it later, and by the way, the division by 3600 is just to convert seconds to hours.

so the above equation suggests that IF you hash 50,000,000,000,000,000 (50PH) every second for 903 hours, you are likely to hit a block, that is 50000000000000000*60*60*903 hashes in a total of 162,540,000,000,000,000,000,000 hashes submit over the period of 903 hours gets you a block on average.

*(60*60 to convert seconds to minutes > minutes to hours )


Now let's say I want to produce the same hashes in just 9.03 hours instead of 903 hours, 9.03 hours has 32,508 seconds, so 162,540,000,000,000,000,000,000/32,508 = 5,000,000,000,000,000,000 hashes/second ( 5000PH)

using the same equation above we now have

((37885054421573 * 2^32 / 5000000000000000000) / (3600)) = 9.03 hours.

now just for fun, I want to produce the same number of hashes over the course of 9,030 hours, without doing any more equations, I know I can just hash at 5 peta hash/second for 9,030 and still get the same result as 50PH over 903 hours, but while the calculator is still open, why not?

5 petahash = 5000000000000000

((37885054421573 * 2^32 / 5000000000000000) / (3600)) = 9039 hours.


Notice how everything here revolves around the total number of hashes (162,540,000,000,000,000,000,000), if I hash them at a rate of 50PH/S i need 903 hours, if I hash them at 5000PH/second all I need is 9.03 hours, if I hash them at 5PH/second I'll need 9039 hours.

By now, it should be clear that it's all about the TOTAL NUMBER of hashes you submit, so back to Nicehack or any rental services, you actually pay per HASH, when you go buy those 162,540,000,000,000,000,000,000 hashes on nice hash you will pay x BTC and it's up to you how fast you want to "consume" them.

for economical reasons and supply/demand, it's sometimes wiser not to put massive orders in the order book as that could trigger a price increase.


Also, it's perfectly fine and correct to say

Quote
for example that there are 144 blocks mined each 24h (=1 each 10 min) and thus if we run the miner 24h non-stop we multiply our chances by 144.

akaki insisted that you can't say so, not sure what's the reasoning behind it, the difficulty does keep block inteverals at 10 minutes average, so using 144/day to get a daily chance for x hashrate/second is perfectly correct.



@mod: Since this topic is very off-topic and for reasons of clarity and sense would be better in the technical part of our forum, I hereby ask a moderator to move the last 9 posts starting from post #46 into the subforum Development & Technical Discussion. You could the thread title "probability / chance of hitting a block" or anything else you might find useful for it. Thanks a bunch in advance.


Hi @mikeywith and sorry for late reply. I took time today to look at this question and better understand the connections. Thank you for your detailed explanation, which helped me a lot to understand. For a better understanding I wrote a Python program in parallel to be able to implement and compare what I learned right away. Please correct me if I made any incorrect statements or thoughts about this below.

First things first.

Wikipedia says:
Probability is the branch of mathematics concerning numerical descriptions of how likely an event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and 1, where, roughly speaking, 0 indicates impossibility of the event and 1 indicates certainty. The higher the probability of an event, the more likely it is that the event will occur. A simple example is the tossing of a fair (unbiased) coin. Since the coin is fair, the two outcomes ("heads" and "tails") are both equally probable; the probability of "heads" equals the probability of "tails"; and since no other outcomes are possible, the probability of either "heads" or "tails" is 1/2 (which could also be written as 0.5 or 50%).

For the sake of simplicity lets not considering the competition from other miners. In that case, if only you participate in the Bitcoin mining network as a solo miner and the difficulty remains static, then the probability of finding a block is equal to 1 since you provide the entire hashrate of the network. It's certain that we will hit the block. The only thing we need to know is the expected average time to hit the block. To calculate the expected time until we find a block, we can calculate the average number of hashes needed to find a block. The average number of hashes needed to find a block can be calculated by multiplying the difficulty of the network by 2^32.

So the average number of hashes needed to find a block is:
<current difficulty> * 2^32 = 37,590,453,655,497.09 * 2^32 = 161,449,769,092,163,668,279,296

To calculate the expected time until you hit the block we divide the average number of hashes/sec needed to find a block by the hashrate of the solo miner. Let's take for example the Bitmain Antminer S19 XP @ 140 TH/sec or 140,000,000,000,000 hashes/sec. Thus:
average number of hashes per second / hash rate of the miner = time in seconds needed to find a block.
161,449,769,092,163,668,279,296 / 140,000,000,000,000 =  seconds

Code:
hashrate_value = 140,000,000,000,000
diff = 37590453655497.09
expected_blockhit_time_in_hours = (diff * 2**32) / hashrate_value / 3600

= 36.57 years

Note, however, that this is an average time and it may take longer or shorter to find the block. The scenario explained so far can be compared to VanitySearch for a better understanding, where you try to search for a matching hit with your GPU. You are the only searcher and it is certain that you will land the hit in the future even if it would take light years in the case of very complex calculations. But also here, like VanitySearch, you can give an expected time at which you will find what you are looking for. The probability to find a match is 1.

I want to know the probability of a given hash rate to hit a block within the time frame of 10 minutes. Following formula only takes into account the miner's hash rate and the current network difficulty. It assumes that the miner is the only one mining on the network and that the network difficulty remains constant.

P = (hash rate of solo miner) * 600 / (difficulty * 2^32)

- 2^32 is used because Bitcoin uses double SHA-256 and thus there are 2^32 possible solutions per each block. A better explanation can be found HERE

Two examples:
hash rate: 140 TH/s will result in probability of 0.0000005203 (decimal value) or expressed as a percentage value = 0.00005203 %
hash rate:   50 PH/s will result in probability of 0.0001858163 (decimal value) or expressed as a percentage value = 0.01858163 %

- this probability so far only applies to a single block for the given time frame of 10 min and not a continuous mining period
- the total network hash rate is not used directly in the calculation, but it is used indirectly through the current network difficulty we retrieved

I fully agree to:
Quote
[chance with 50 PH/s for 3h] = [chance with 25 PH/s for 6h] = [chance with 5 PH/s for 30h]

Now let's take all the other miners into consideration, so we are competing against them. I guess that @akaki meant that after a block discovery the cards are reshuffled and it has no meaning what had taken place in the past. From the time of each new block the point of view starts again from zero.

I still fully agree to akaki's statement which sounds correct to me. An essential characteristic of that is memoryless, the intervals between any two events are independent of, and statistically identical to, each other.

However, you say that you can calculate the probability of finding a block within 1 day (=24 hours) by multiplying the result we got before (probability per 10-min = 0.0000005203) by the number of 10-minute intervals in a day (=144). So you say 0.0000005203 * 144 = 0.0000749232 (decimal value) which represents the probability of hitting a block with 140 TH/s within one day. The probability is 144 times higher and if you extend this to a whole week or month the probability raises accordingly. If I understood correctly from what you said, the reason for this is that if the network difficulty remains constant the probability of finding a block within a certain time frame is directly proportional to the number of 10-minute intervals in that time frame. This is because the probability of finding a block is determined by the miner's hash rate, the current network difficulty, and the number of possible solutions for each block (2^32) which remains constant. But this approach does not take into account the fact that once a block is found, everything is reset and you start from scratch. This is exactly what akaki says and wanted to point out and in my opinion is also correct. Other important points that should not be ignored are: the Difficulty changes every 2016 blocks and is therefore variable. You cannot simply use the previously calculated probability per block as a basis and multiply it by a time span x, that would not be correct in this context.

Another point worth considering in this context would be the difference between probability and chance. There is a lot of information about this on the Internet, e.g. HERE. These two terms are often used mixed.

Finally, since you are competing against other miners in the real case, you can determine the probability of a block hit within a block period for the solo miner quite simply as follows. When mining Bitcoin, the miner performs a double SHA-256 hash of the block header, and the miner's goal is to find a value that is less than the target. The target is a 256-bit number that is dynamically adjusted by the protocol every 2016 blocks (about two weeks) to ensure that the average time to find a block is 10 minutes. The target is inversely proportional to the difficulty, so the lower the difficulty, the higher the target, and vice versa. The difficulty is a measure of how difficult it is to find a block relative to the easiest it can ever be. The hashrate is measured in hashes per second. The probability of adding a block as a solo miner are determined by the number of hashes the miner's rig is computing per second in relation to the total number of hashes that all of the machines on the network are computing each second. The probability of finding a block for a solo miner is determined by the miner's hashrate relative to the total network hashrate and the difficulty of the network so a miner with a higher hashrate can perform more hashes per second and thus have a higher probability of finding a block.

Here is some output from the Python program I wrote during this excursion. The part with brown color is not correct in my opinion but I have included it in the output for comparison reasons.

Quote
Current Bitcoin network difficulty is: 37,590,453,655,497.09
Current overall hashrate of the Bitcoin network is: 288,814,703,183,075,200,000 hashes/sec
==============================================================================================================
Enter the hashrate/sec of your solo miner: 140TH

Entered hash rate of 140.0 TH/sec equals to: 140,000,000,000,000 hashes/sec
The ratio of your solo mining hash rate to the total network hash rate is: 0.000048 %
and expresses the probability of hitting the next block.

==============================================================================================================
Probability per 10min: 0.000000520 (0.000052029 %) or 1 in 1,922,021
==============================================================================================================
Probability per hour: 0.000003122 (0.00 %) or 1 in 320,337
Probability per day: 0.000074921 (0.01 %) or 1 in 13,347
Probability per week: 0.000524448 (0.05 %) or 1 in 1,907
Probability per month: 0.002247634 (0.22 %) or 1 in 445
Probability per half-year: 0.013673107 (1.37 %) or 1 in 73
Probability per year: 0.027346214 (2.73 %) or 1 in 37

==============================================================================================================
Expected average time to hit a block: 320,336.8 h = 13,347.4 days = 1,906.8 weeks = 439.3 months = 36.6 years
==============================================================================================================
In words: The chance of mining a block with the given hashrate within a 10min period is similar to
the probability of picking a red winning ball from a jar containing 1,922,021 white balls.

The chance of mining a block with the given hashrate is similar to trying to find a needle in a haystack.

Quote
Current Bitcoin network difficulty is: 37,590,453,655,497.09
Current overall hashrate of the Bitcoin network is: 288,814,703,183,075,200,000 hashes/sec
==============================================================================================================
Enter the hashrate/sec of your solo miner: 5p

Entered hash rate of 5.0 PH/sec equals to: 5,000,000,000,000,000 hashes/sec
The ratio of your solo mining hash rate to the total network hash rate is: 0.0017 %
and expresses the probability of hitting the next block.

==============================================================================================================
Probability per 10min: 0.0000186 (0.0018582 %) or 1 in 53,817
==============================================================================================================
Probability per hour: 0.0001115 (0.01 %) or 1 in 8,969
Probability per day: 0.0026758 (0.27 %) or 1 in 374
Probability per week: 0.0187303 (1.87 %) or 1 in 53
Probability per month: 0.0802726 (8.03 %) or 1 in 12
Probability per half-year: 0.4883253 (48.83 %) or 1 in 2
Probability per year: 0.9766505 (97.67 %) or 1 in 1

==============================================================================================================
Expected average time to hit a block: 8,969.4 h = 373.7 days = 53.4 weeks = 12.3 months = 1.0 years
==============================================================================================================
In words: The chance of mining a block with the given hashrate within a 10min period is similar to
the probability of picking a red winning ball from a jar containing 53,817 white balls.

The chance of mining a block with the given hashrate is similar to trying to find a needle in a haystack.

Quote
Current Bitcoin network difficulty is: 37,590,453,655,497.09
Current overall hashrate of the Bitcoin network is: 288,814,703,183,075,200,000 hashes/sec
==============================================================================================================
Enter the hashrate/sec of your solo miner: 50phs

Entered hash rate of 50.0 PH/sec equals to: 50,000,000,000,000,000 hashes/sec
The ratio of your solo mining hash rate to the total network hash rate is: 0.017 %
and expresses the probability of hitting the next block.

==============================================================================================================
Probability per 10min: 0.000 (0.019 %) or 1 in 5,382
==============================================================================================================
Probability per hour: 0.001 (0.11 %) or 1 in 897
Probability per day: 0.027 (2.68 %) or 1 in 37
Probability per week: 0.187 (18.73 %) or 1 in 5
Probability per month: 0.803 (80.27 %) or 1 in 1
Probability per half-year: 4.883 (488.33 %) or 1 in 0
Probability per year: 9.767 (976.65 %) or 1 in 0

==============================================================================================================
Expected average time to hit a block: 896.9 h = 37.4 days = 5.3 weeks = 1.2 months = 0.1 years
==============================================================================================================
In words: The chance of mining a block with the given hashrate within a 10min period is similar to
the probability of picking a red winning ball from a jar containing 5,382 white balls.

The chance of mining a block with the given hashrate is similar to winning a lottery with a few
hundred participants.

Quote
Current Bitcoin network difficulty is: 37,590,453,655,497.09
Current overall hashrate of the Bitcoin network is: 288,814,703,183,075,200,000 hashes/sec
==============================================================================================================
Enter the hashrate/sec of your solo miner: 150EH/s

Entered hash rate of 150.0 EH/sec equals to: 150,000,000,000,000,000,000 hashes/sec
The ratio of your solo mining hash rate to the total network hash rate is: 52 %
and expresses the probability of hitting the next block.


Probability of mining a block:
==============================================================================================================
Probability per 10min: 0.557 (55.745 %) or 1 in 2
==============================================================================================================
Probability per hour: 3.345 (334.47 %) or 1 in 0
Probability per day: 80.273 (8,027.26 %) or 1 in 0
Probability per week: 561.909 (56,190.85 %) or 1 in 0
Probability per month: 2,408.179 (240,817.94 %) or 1 in 0
Probability per half-year: 14,649.758 (1,464,975.77 %) or 1 in 0
Probability per year: 29,299.515 (2,929,951.54 %) or 1 in 0
==============================================================================================================
Expected average time to hit a block: 0.3 h = 0.0 days = 0.0 weeks = 0.0 months = 0.0 years
==============================================================================================================
In words: The chance of mining a block with the given hashrate within a 10min period is similar to
the probability of picking a red winning ball from a jar containing 2 white balls.

The chance of mining a block with the given hashrate is ... damn good!



Now let's take all the other miners into consideration, so we are competing against them. I guess that @akaki meant that after a block discovery the cards are reshuffled and it has no meaning what had taken place in the past. From the time of each new block the point of view starts again from zero.

But this approach does not take into account the fact that once a block is found, everything is reset and you start from scratch. This is exactly what akaki says and wanted to point out and in my opinion is also correct.

Alas, this is where you both are getting confused, there is no such thing as "reset", you are not competing against any other miners, you are competing against the difficulty and your only weapon is the number of hashes, your luck doesn't reset with every block, it resets with every hash, every hash has the same exact chance of hitting a block regardless of the status of the network, other miners when was the last block found, who found it, or anything else.

Saying that you are competing against other miners suggests that if other miners pull out and stop hashing, your chances of hitting a block will increase, which is false, even if everyone else stops mining and you are left alone, your chances will change by 0%, if your initial chances were to hit a block in 10 days, it will still be the same.

In the first half of your post, it seems like you cleared the confusion, at least got the correct logic for the most part, but the quoted part is where things got messed up, it's a popular belief for many people to fall into, this is the inverse way of thinking that just because 9 minutes have passed since the last block, the chances to hit a block in the following 1 minute is higher, no, it doesn't work this way, every single share submitted to the network has exactly the same chance of hitting a block.

You need to ditch the idea that tells you that miners are mining the same exact same block, and you can only start mining a block when one is done, you need to understand that every hash is trying to mine its own block if it manages to do so, it simply tells the other miners "hey guys, I am going to name my block 1011, so please if any of you manages to find a block, use a different name "1012", don't let this give you the illusion that everyone is now mining block "1012" , NO! NO!, everyone is mining their own random block, and IF they hit one, they will name it "1012".

So long story short, there is no "RESET" here, every share CAN find a block at any given time, and the chances of your hashes hitting a block are 100% independent from every other hash anyone else has.


Now as to why using 144 blocks a day is perfectly valid, it's because the difficulty was set to ENSURE that IF the hashrate was stay constant (i.e the number of hashes for the period of 2 weeks) remains the same, the total shares combined will only find 144 blocks every 24 hours or 2016 in 2 weeks, or 1 every 10 mins, all valid representation of the code which simply calculate the total timespan between the last 2016 blocks against the target timespan which is 2 weeks in seconds.

To understand the last part more, you need to think of all miners as one miner (but please don't let this confuse you with the previous part), all miners combined have x amount of hashes to try, in theory, those x hashes combined will find a block every 10 mins.

If things are not crystal clear by now, I am sorry, I don't think I can make this any clearer, hopefully, someone else who knows how to explain things better can chime in.



Now let's take all the other miners into consideration, so we are competing against them. I guess that @akaki meant that after a block discovery the cards are reshuffled and it has no meaning what had taken place in the past. From the time of each new block the point of view starts again from zero.

But this approach does not take into account the fact that once a block is found, everything is reset and you start from scratch. This is exactly what akaki says and wanted to point out and in my opinion is also correct.

Alas, this is where you both are getting confused, there is no such thing as "reset", you are not competing against any other miners, you are competing against the difficulty and your only weapon is the number of hashes, your luck doesn't reset with every block, it resets with every hash, every hash has the same exact chance of hitting a block regardless of the status of the network, other miners when was the last block found, who found it, or anything else.

Saying that you are competing against other miners suggests that if other miners pull out and stop hashing, your chances of hitting a block will increase, which is false, even if everyone else stops mining and you are left alone, your chances will change by 0%, if your initial chances were to hit a block in 10 days, it will still be the same.

In the first half of your post, it seems like you cleared the confusion, at least got the correct logic for the most part, but the quoted part is where things got messed up, it's a popular belief for many people to fall into, this is the inverse way of thinking that just because 9 minutes have passed since the last block, the chances to hit a block in the following 1 minute is higher, no, it doesn't work this way, every single share submitted to the network has exactly the same chance of hitting a block.

You need to ditch the idea that tells you that miners are mining the same exact same block, and you can only start mining a block when one is done, you need to understand that every hash is trying to mine its own block if it manages to do so, it simply tells the other miners "hey guys, I am going to name my block 1011, so please if any of you manages to find a block, use a different name "1012", don't let this give you the illusion that everyone is now mining block "1012" , NO! NO!, everyone is mining their own random block, and IF they hit one, they will name it "1012".

So long story short, there is no "RESET" here, every share CAN find a block at any given time, and the chances of your hashes hitting a block are 100% independent from every other hash anyone else has.


Now as to why using 144 blocks a day is perfectly valid, it's because the difficulty was set to ENSURE that IF the hashrate was stay constant (i.e the number of hashes for the period of 2 weeks) remains the same, the total shares combined will only find 144 blocks every 24 hours or 2016 in 2 weeks, or 1 every 10 mins, all valid representation of the code which simply calculate the total timespan between the last 2016 blocks against the target timespan which is 2 weeks in seconds.

To understand the last part more, you need to think of all miners as one miner (but please don't let this confuse you with the previous part), all miners combined have x amount of hashes to try, in theory, those x hashes combined will find a block every 10 mins.

If things are not crystal clear by now, I am sorry, I don't think I can make this any clearer, hopefully, someone else who knows how to explain things better can chime in.



@mikeywith: thank you so much for the effort you put in to explain this in such detail. You have really helped me with this. It helped a lot in understanding after reading through this several times and reading and delving into various sites around bitcoin. I am quoting the key points you mentioned.

there is no such thing as "reset", you are not competing against any other miners, you are competing against the difficulty and your only weapon is the number of hashes, your luck doesn't reset with every block, it resets with every hash, every hash has the same exact chance of hitting a block regardless of the status of the network, other miners when was the last block found, who found it, or anything else
[...]
Saying that you are competing against other miners suggests that if other miners pull out and stop hashing, your chances of hitting a block will increase, which is false, even if everyone else stops mining and you are left alone, your chances will change by 0%, if your initial chances were to hit a block in 10 days, it will still be the same.
[...]
every single share submitted to the network has exactly the same chance of hitting a block.
[...]
every share CAN find a block at any given time, and the chances of your hashes hitting a block are 100% independent from every other hash anyone else has

Very important and accurate points. I have now understood that only the current Difficulty plays a role in the probability calculation for a block find and is used as the basis of the calculation. The Bitcoin Wiki page has further assisted in understanding this.
Quote
Any one grinding of the hash stands the same chance of "winning" as any other. The numbers game is how many attempts your hardware can make per second

You need to ditch the idea that tells you that miners are mining the same exact same block, and you can only start mining a block when one is done, you need to understand that every hash is trying to mine its own block if it manages to do so, it simply tells the other miners "hey guys, I am going to name my block 1011, so please if any of you manages to find a block, use a different name "1012", don't let this give you the illusion that everyone is now mining block "1012" , NO! NO!, everyone is mining their own random block, and IF they hit one, they will name it "1012".
this was also a very helpful information, thanks!

I think this topic belongs in the "technical section" of the forum. I had already asked the moderators to do this, but unfortunately it hasn't been implemented yet. I have meanwhile manually opened a new thread and the relevant posts here #46 to #56 from this topic were moved (quoted) in the new thread as takeover. Let's discuss this matter further there, so that this thread here of the project "Block Solvers" remains clear and does not run further into off-topic.

For your information: I have undone the change in the info page #1 and reset it to the original state.

For all other questions or comments about "probability calculation" please have a look at the linked thread.

Thanks for the attention and support.
citb0in

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mikeywith
Legendary
*
Offline Offline

Activity: 2226
Merit: 6404


be constructive or S.T.F.U


View Profile
January 28, 2023, 08:36:27 PM
 #3

It's good that you started a new topic for what seemed to be a bit off-topic in the other thread,  I don't think it was important to quote everything from that thread, it will be difficult for other members to follow the logic of the discussion.

I think it's better to sum up the whole thing in a single question.

When mining bitcoin within the same difficulty epoch, which one of the following is correct and why?

Quote
1- [chance with 50 PH/s for 3h] = [chance with 25 PH/s for 6h] = [chance with 5 PH/s for 30h]


Quote
2- [chance with 50 PH/s for 3h] > [chance with 25 PH/s for 6h] > [chance with 5 PH/s for 30h]


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 28, 2023, 08:43:15 PM
 #4

the correct answer in my opinion is

1- [chance with 50 PH/s for 3h] = [chance with 25 PH/s for 6h] = [chance with 5 PH/s for 30h]

because it takes into account the shares submitted.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BlackHatCoiner
Legendary
*
Online Online

Activity: 1526
Merit: 7377


Farewell, Leo


View Profile
January 28, 2023, 09:53:32 PM
 #5

For a software that has to accurately return the probability of hitting a block yourself, I have to be pedantic. In #L93, I see a netrate divided with hashrate times 600, which I believe is the expected time the network will hit a block. I presume that the 600 determines the seconds, hence the 10 minutes. The seconds aren't exactly 600 though, but 600.3 because of a long standing bug.

As for probabilities, are you sure that's true, because I doubt:
Code:
elif prob < 0.00000005:
        return "infinitesimally small - it's similar to the probability of finding a specific atom among all the atoms in the universe."

Seems more like practically not going to happen to me.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 28, 2023, 10:11:01 PM
Last edit: January 28, 2023, 10:23:03 PM by citb0in
 #6

Line #93 which you're referring to simply calculates the prob related to the overall network hash rate and was an additional metric that I added as a comparison out of curiosity. The key calculation and which is being used as a base is done Line #92 and this depends solely to the current target (which results in the human-readable difficulty value).

In the output you get both results so you can compare.

However, I don't understand why and in what way a potential difference of 0.3 seconds affects you or makes you doubt the result? The 600 seconds are not fixed. It also doesn't really matter if we refer to 600 seconds, 597, 612 seconds or whatever. Therefore also the different time relations, in order to show different examples to the reader. I see the 0.3 seconds therefore as irrelevant in this way of looking at it, but I like to be taught better.

Regarding the analogy phrases... I have taken the example with the atoms for all probabilities < 0.00000005. These are approx. 10^82 and the tiny number has accordingly many zeros. Surely other analogies would fit better in the category nearer to 0.00000005 like "It's more likely to flip a coin and getting heads 23 times in a row" or similar. The analogy phrases can certainly be reworked, that's why it's written as to-do in the roadmap of this project. If you have suggestions, I will gladly accept them and incorporate them.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
paid2
Hero Member
*****
Offline Offline

Activity: 700
Merit: 2151


Crypto Swap Exchange


View Profile WWW
January 28, 2023, 10:57:15 PM
 #7

Thank you for this very useful tool !

The idea is top.

But I don't have any output
I enter the hashrate (example "300t") and have 0 response in my terminal

Even after 10 minutes - same issue.
I use python3

Out of topic : I will do the translations to French in the following days, as I saw on your Github page that it is on your roadmap

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 28, 2023, 11:00:10 PM
 #8

But I don't have any output
That's odd. What steps did you do? Basically it's as simple as
Code:
git clone https://github.com/citb0in/solomining_probability_calc.git
Code:
cd solomining_probability_calc
Code:
python3 solomining_probability_calc.py

I enter the hashrate (example "300t") and have 0 response in my terminal
so you get the user input line where you have to enter your hash rate, right?

Out of topic : I will do the translations to French in the following days, as I saw on your Github page that it is on your roadmap

Great! thank you in advance.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
paid2
Hero Member
*****
Offline Offline

Activity: 700
Merit: 2151


Crypto Swap Exchange


View Profile WWW
January 28, 2023, 11:11:06 PM
 #9

Code:
git clone https://github.com/citb0in/solomining_probability_calc.git
Code:
cd solomining_probability_calc
Code:
python3 solomining_probability_calc.py

Yeah I followed these steps

Quote
so you get the user input line where you have to enter your hash rate, right?

Yeap, I did a screenshot (cannot post here because of low rank) :https://imgur.com/z21uO7g

No more sign of life, when I do CTRL+C I have this : https://imgur.com/uonGnPh

Sorry, I am a total noob with python

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Online Online

Activity: 1526
Merit: 7377


Farewell, Leo


View Profile
January 28, 2023, 11:29:58 PM
 #10

However, I don't understand why and in what way a potential difference of 0.3 seconds affects you or makes you doubt the result? The 600 seconds are not fixed.
Indeed, it's irrelevant. Difficulty and your hash rate is what determines the odds to solve a block. I just saw the 600 seconds and misunderstood. So what does "3600" in expected_blockhit_time mean? Also, while practically zero, day doesn't have exactly 24 hours, so the time unit might be slightly inaccurate.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 29, 2023, 09:50:44 AM
 #11

No more sign of life, when I do CTRL+C I have this : https://imgur.com/uonGnPh
Sorry, I am a total noob with python

Well, I am pretty sure I know the reason therefore. The tool by default tries to get the current difficulty and network hashrate by https://mempool.space site. In case you're computer is restricted (by firewall or similar) it cannot get the information. If it fails in accessing the URL it should return an error though so I'm puzzled you didn't get an error. However you can quickly find out if this is the reason. Just edit the code and uncomment the two lines:

from:
Quote
# Uncomment following line(s) for manually seting the difficulty/netrate to a value of your choice
#diff = 37590453655497.094
#netrate = 77889900112233.555


to:
Quote
# Uncomment following line(s) for manually seting the difficulty/netrate to a value of your choice
diff = 39,350,942,467,772.633
netrate = 304032480668241625088

and try again.

Indeed, it's irrelevant. Difficulty and your hash rate is what determines the odds to solve a block. I just saw the 600 seconds and misunderstood. So what does "3600" in expected_blockhit_time mean?

If you omit the 3600 you calculated the expected time related to one second because the hashrate is in "per second" unit. So you have to divide by 3600 to get to the 10min average.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
paid2
Hero Member
*****
Offline Offline

Activity: 700
Merit: 2151


Crypto Swap Exchange


View Profile WWW
January 29, 2023, 10:05:22 AM
 #12

No more sign of life, when I do CTRL+C I have this : https://imgur.com/uonGnPh
Sorry, I am a total noob with python

Well, I am pretty sure I know the reason therefore. The tool by default tries to get the current difficulty and network hashrate by https://mempool.space site. In case you're computer is restricted (by firewall or similar) it cannot get the information. If it fails in accessing the URL it should return an error though so I'm puzzled you didn't get an error. However you can quickly find out if this is the reason. Just edit the code and uncomment the two lines:

from:
Quote
# Uncomment following line(s) for manually seting the difficulty/netrate to a value of your choice
#diff = 37590453655497.094
#netrate = 77889900112233.555


Thank you it works very nice with the manual diff and netrate.
Strange, because I go on mempool.space on a daily basis, and have all the necessary libs installed

Thank you for your help



█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 29, 2023, 03:14:50 PM
 #13

Did you satisfy the requirements

Quote
Prerequisites

Note: Python2 is not supported.

    Python3 libs requests, re


you need python library "requests" to have this work. Just run
Code:
pip3 install requests

or

Code:
pip install requests

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
paid2
Hero Member
*****
Offline Offline

Activity: 700
Merit: 2151


Crypto Swap Exchange


View Profile WWW
January 29, 2023, 03:29:56 PM
 #14

Did you satisfy the requirements

Quote
Prerequisites

Note: Python2 is not supported.

    Python3 libs requests, re


you need python library "requests" to have this work. Just run
Code:
pip3 install requests

or

Code:
pip install requests


Yes I confirm that requirements are ok
I will continue to search for the reason of failure, but in waiting for that, the tool is working fine with manually settings

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 29, 2023, 03:39:23 PM
 #15

weird but understood. When the python tool is not able to connect to the mempool.space URL it would throw an error like:
Quote
ConnectionRefusedError: [Errno 111] Connection refused
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='mempool.space', port=443): Max retries exceeded with url: /api/v1/mining/hashrate/3d (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused'))
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mempool.space', port=443): Max retries exceeded with url: /api/v1/mining/hashrate/3d (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused'))

in your case it seems to have another root causing that but without any debug message or helpful information I'm not able to provide further assistance, I'm sorried. I only can suggest to wipe your current working directory of the solomining probability calculator and redownload and begin from scratch just to ensure the download/gitclone went ok.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Daltonik
Legendary
*
Offline Offline

Activity: 2520
Merit: 1490


View Profile
January 30, 2023, 08:07:46 AM
 #16

The mention of the difficulty of the network is confusing because in the final case, the probability of finding a block in solo is calculated based on the speed of the miner and the total hashrate of the bitcoin network or is the difficulty of the network still used in the calculation?
For example NiceHash does not take into account the current difficulty of the bitcoin network https://www.nicehash.com/blog/post/how-is-solo-mining-probability-calculated?lang=en
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 30, 2023, 09:39:09 AM
 #17

The mention of the difficulty of the network is confusing because in the final case, the probability of finding a block in solo is calculated based on the speed of the miner and the total hashrate of the bitcoin network or is the difficulty of the network still used in the calculation?
For example NiceHash does not take into account the current difficulty of the bitcoin network https://www.nicehash.com/blog/post/how-is-solo-mining-probability-calculated?lang=en

this is something you need to distinguish between.

If you take the overall network hash power and divide by solo miners hashrate you get a ratio which represents your contribution proportion to the network. This ratio (= you have n-th xH/s of the overall network rate) gives you on average how many blocks will occur before you hit one. Your hash rate is put in relation to the total network. I know many sites out there use this way but it's not the key one. I added this information additionally to my tool to simply have a comparison to ...

The most important calculation though is based solely on the difficulty of the Bitcoin network to calulcate the probability of finding the right hash solving a block. What does that mean? There is a certain amount of valid hashes and the target. To win / solving a block you need to find a hash that is below or equal to the current network target. As we know both values we can calculate the ratio. For this calculation you only need the difficulty and solominers hash rate and it represents the probabaility of finding the winning hash which will solve the block. There is no relation to the total network, you do not compete against other miners because each single hash attempt has a winning chance.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Daltonik
Legendary
*
Offline Offline

Activity: 2520
Merit: 1490


View Profile
January 31, 2023, 12:50:46 PM
 #18

The mention of the difficulty of the network is confusing because in the final case, the probability of finding a block in solo is calculated based on the speed of the miner and the total hashrate of the bitcoin network or is the difficulty of the network still used in the calculation?
For example NiceHash does not take into account the current difficulty of the bitcoin network https://www.nicehash.com/blog/post/how-is-solo-mining-probability-calculated?lang=en

this is something you need to distinguish between.

If you take the overall network hash power and divide by solo miners hashrate you get a ratio which represents your contribution proportion to the network. This ratio (= you have n-th xH/s of the overall network rate) gives you on average how many blocks will occur before you hit one. Your hash rate is put in relation to the total network. I know many sites out there use this way but it's not the key one. I added this information additionally to my tool to simply have a comparison to ...

The most important calculation though is based solely on the difficulty of the Bitcoin network to calulcate the probability of finding the right hash solving a block. What does that mean? There is a certain amount of valid hashes and the target. To win / solving a block you need to find a hash that is below or equal to the current network target. As we know both values we can calculate the ratio. For this calculation you only need the difficulty and solominers hash rate and it represents the probabaility of finding the winning hash which will solve the block. There is no relation to the total network, you do not compete against other miners because each single hash attempt has a winning chance.

Thanks for the explanation, but the main thing here is still the ratio of your miner's speeds to the total hashrate of the network, and the difficulty of the network has about the same value in finding a block in solo mining as luck.
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6746


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 31, 2023, 01:22:53 PM
 #19

weird but understood. When the python tool is not able to connect to the mempool.space URL it would throw an error like:
Quote
ConnectionRefusedError: [Errno 111] Connection refused
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='mempool.space', port=443): Max retries exceeded with url: /api/v1/mining/hashrate/3d (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused'))
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mempool.space', port=443): Max retries exceeded with url: /api/v1/mining/hashrate/3d (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f36c8962da0>: Failed to establish a new connection: [Errno 111] Connection refused'))

in your case it seems to have another root causing that but without any debug message or helpful information I'm not able to provide further assistance, I'm sorried. I only can suggest to wipe your current working directory of the solomining probability calculator and redownload and begin from scratch just to ensure the download/gitclone went ok.

It's a rate limiting error, as you can see with "Max retries exceeded with url". It means that your programming loop is calling the API too many times and you should probably introduce a sleep timer if you haven't already, or make it longer.

Or you could use another proxy/VPN to bypass the IP ban, but I do not recommend it because calls that are being made too frequently will get the IP address banned again.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
citb0in (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 657


Bitcoin g33k


View Profile
January 31, 2023, 01:44:46 PM
Last edit: January 31, 2023, 02:33:54 PM by citb0in
 #20

@NotATether:
You seem to have something mixed up. I intensionally created the quoted error message to show that in case of unreachability Python would produce an error like the one shown. I did this by just blocking my computer from being able to access the mempool.space domain. Since this is apparently not the case with iwantmyhomepaidwithbtc2, the problem is buried somewhere else. The Python tool has already been constructed with error checking in mind, so it would generate an error. Also, maxretries refers to Pythons' functionality of requesting a URL on invocation. This is not an error message or restriction on mempool.space's part because my computer wasn't able to connect to the domain mempool.space at all during this intentional test.

However, I have updated the error handler so you will receive an error when something's going wrong.


.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!