Does it take longer to generate an address when I stop and restart vanitygen?

6

I want to generate a bitcoin address.

  1. I start vanitygen, but a power loss occurs.
  2. Now I restart vanitygen.
How does this affect the time to generate the address?

hmundt

Posted 2012-04-27T06:55:59.367

Reputation: 163

Answers

8

tl;dr If you stop vanitygen for 5 minutes, on average you've added 5 minutes to the time it will take to complete.

While it is running, vanitygen tells you how much longer it will take until you have a 50% chance of finding a suitable address. About half the time, that countdown will reach zero, and then the countdown starts again, but this time showing the time until you have a 75% chance. And so on.

This gives the impression that it is making "progress" towards finding a suitable address, but that is misleading. Every second that vanitygen is running is has a certain chance of finding an address. There's no progress being made, in the same way that you don't "make progress" towards winning the lottery if you play it every week. Just eventually if you play enough times, you win.

So if you stop the program running and start it again, you've lost nothing other than that you've wasted the time between stopping and restarting when it could have found a solution.

Chris Moore

Posted 2012-04-27T06:55:59.367

Reputation: 13 952

WTF why would one show a countdown for such a process...CodesInChaos 2012-04-28T19:02:45.213

1@CodeInChaos Because it gives the user a vague idea of how long the search is likely to take. If it says "12 years until 50% chance" then you're likely to immediately abort and try an easier search, whereas if it says "12 minutes until 50% chance" you'll likely leave it running, even if it hasn't succeeded after an hour.Chris Moore 2012-04-29T02:02:42.003

2Displaying "12 years until 50% chance" is perfectly fine. Counting down is not.CodesInChaos 2012-04-29T08:59:30.757

1OK, I understand, and that's a good point. Since no progress is ever made, the expected time remaining is always the same, until a solution is found.Chris Moore 2012-04-29T17:03:48.657

1You might even get an extra 2 or 3 hashes per second if it stopped bothering to count down and only showed an "expected time remaining" or "expected hashes remaining". Of course, on anything even approaching modern hardware, that doesn't mean much.Daniel H 2012-08-17T22:31:54.070

1I think CodesInChaos's point was that it's inaccurate to count down rather than being wasteful. But yeah, it's very slightly wasteful too.Chris Moore 2012-08-20T23:09:00.920

5

It shouldn't, otherwise it would indicate a weakness in the generation of the addresses. The vanitygen should initialize itself with a random private key number each run, otherwise it would be really easy to generate an exact same vanity address someone else generated.

ThePiachu

Posted 2012-04-27T06:55:59.367

Reputation: 41 594