Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Stephen Gornick on November 21, 2010, 06:31:21 AM



Title: Address used for receiving the generated Bitcoin?
Post by: Stephen Gornick on November 21, 2010, 06:31:21 AM
I plan to run the Bitcoin client on an underutilized server at an off-site location.  I cannot remote into it and won't be back to that location for at least a couple of months from now. Thus I won't know if it generated any Bitcoin, nor would I be able to transfer it before my next visit.

Should any Bitcoin be generated for it, will the address that the Bitcoin is sent to be the address that was initially generated for the client?

If so, then as long as I record that address, I can then periodically check the status here:
  http://theymos.ath.cx:64150/bbe/address/xxxxxxx  [xxxx = address]

Additionally, if I created a backup of the wallet and have it with me, I should be able to fire up another client here, restore the wallet and be able to transfer the Bitcoin away, correct?


Title: Re: Address used for receiving the generated Bitcoin?
Post by: theymos on November 21, 2010, 06:35:35 AM
Should any Bitcoin be generated for it, will the address that the Bitcoin is sent to be the address that was initially generated for the client?

No. Each generation has a unique address created for it. This address is not shown in any Bitcoin interface.

You could make a script that sends all generated coins to some address, such as this one:
http://bitcointalk.org/index.php?topic=1431.0


Title: Re: Address used for receiving the generated Bitcoin?
Post by: nanotube on November 21, 2010, 06:37:39 AM
I plan to run the Bitcoin client on an underutilized server at an off-site location.  I cannot remote into it and won't be back to that location for at least a couple of months from now. Thus I won't know if it generated any Bitcoin, nor would I be able to transfer it before my next visit.

Should any Bitcoin be generated for it, will the address that the Bitcoin is sent to be the address that was initially generated for the client?

If so, then as long as I record that address, I can then periodically check the status here:
  http://theymos.ath.cx:64150/bbe/address/xxxxxxx  [xxxx = address]

Additionally, if I created a backup of the wallet and have it with me, I should be able to fire up another client here, restore the wallet and be able to transfer the Bitcoin away, correct?


no, each block generation bounty gets credited to a new address, so monitoring the 'first address' will not be of use.

the bitcoin client now pre-generates a 'pool' of keys, sized 100 by default. i /think/ (but am not sure) that the addresses used for generation are also taken from this pool. if that is the case, then if you make a backup of the wallet and look at it on your local machine periodically, you'll be able to see the generation credits in your wallet backup (at least until you run out of the 100 pool addresses - depending on how fast your remote machine is generating, it may happen very fast or quite slowly).

but since i'm not sure if the pool addresses are used for generation, you should get confirmation on that from someone who knows what's up. :)


Title: Re: Address used for receiving the generated Bitcoin?
Post by: nanotube on November 21, 2010, 06:38:23 AM
Should any Bitcoin be generated for it, will the address that the Bitcoin is sent to be the address that was initially generated for the client?

No. Each generation has a unique address created for it. This address is not shown in any Bitcoin interface.

You could make a script that sends all generated coins to some address, such as this one:
http://bitcointalk.org/index.php?topic=1431.0

ah, theymos, you're here - so what about the key pool? will the 'looking at wallet backup' thing work?


Title: Re: Address used for receiving the generated Bitcoin?
Post by: theymos on November 21, 2010, 06:42:28 AM
ah, theymos, you're here - so what about the key pool? will the 'looking at wallet backup' thing work?

Yes. It's good for 100 generations (and you can use the -keypool switch to increase this). I think an auto-send script would be easier, though.

Also, I think there may be some cases where a keypool address would be thrown away without a generation (like if Bitcoin crashes, or maybe even when it shuts down).


Title: Re: Address used for receiving the generated Bitcoin?
Post by: nanotube on November 21, 2010, 06:56:01 AM
ah, theymos, you're here - so what about the key pool? will the 'looking at wallet backup' thing work?

Yes. It's good for 100 generations (and you can use the -keypool switch to increase this). I think an auto-send script would be easier, though.

Also, I think there may be some cases where a keypool address would be thrown away without a generation (like if Bitcoin crashes, or maybe even when it shuts down).

well, if he's generating on a CPU rather than GPU, 100 addresses for several months should be way more than enough. :)

that said, indeed autosend script should be pretty easy to write as well. check balance, if >0, send balance to $myaddress. crontab it, and you're done.


Title: Re: Address used for receiving the generated Bitcoin?
Post by: Gavin Andresen on November 21, 2010, 02:04:25 PM
Also, I think there may be some cases where a keypool address would be thrown away without a generation (like if Bitcoin crashes, or maybe even when it shuts down).
The keypool IS used for coin-generation transactions.

And the way it is implemented, it should never throw away keys.  If I recall correctly, there is a very small chance if you lose power or bitcoin crashes a key from the keypool could be used twice.  But that has no bad effects, it is just very unusual.