Bitcoin Forum
June 26, 2024, 11:05:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Interesting address generation in qt client solo mining  (Read 415 times)
satsumi (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
January 26, 2014, 07:43:09 AM
 #1

I had an odd experience with solo mining, and thought maybe someone else had seen it, or had read through the source and could explain it.

I was solo mining on one of the low difficulty alt coins, where it's still possible to solo mine and see a block at least once a day.

The setup was cgminer 3.7.2 connected to the QT client (which is based on the Litecoin client, which is based on the Bitcoin client) via the usual 127.0.0.1 with a username and password, with an unencrypted wallet. As it mined it would assign a new address to every mined block; until I sent them somewhere they showed up in the block chain as unredeemed on unique addresses.

Then I encrypted the wallet, and suddenly it mined all blocks into one address. Not quite as cool, since I didn't like having one address with a big balance to attract the attention of anyone analyzing the block chain, but not that big of a deal.

I realized that because it was all going in to one address that I could load that address's private key into the client on my non-mining computer, and as the mining computer found new blocks and put them in that address I could access them from the other computer without having to do a transfer. Probably too clever by half.

Did it though, with a 'walletpassphrase' and a 'dumpprivkey' in the console of the mining computer, then typed the private key into an 'importprivkey' on the non-mining computer. It froze, as it's apparently meant to, for a frightening couple of minutes as it re-scanned the block chain, then magically had access to the balance of the private key that had been mined to. (I literally typed the private key in, as I didn't want to save it to disk anywhere.)

So that all worked as it was supposed to. The part where it becomes interesting is that after the import the mining client went back to generating new addresses for each block it mined. After all that effort, I didn't get the advantage of having blocks just show up on a different computer than the miner. The name I gave to the private key during the import showed up on the 'contacts' pane of the non-miner computer.

 * Is the client supposed to mine into one address when the wallet is encrypted, or is that a bug?
 * Is the client supposed to stop using an address after the privkey has been dumped, or is that a bug?
 * Is anything else here off-nominal behavior, or am I a bug?

After that I used the mining computer to send its whole balance to an address generated by the non-miner, to wipe out the balance on the address whose private key had been moved. The name disappeared from the contacts page, and both clients seem to be working normally. I'm thinking of deleting the block chain files on both computers just to force each of them to re-figure their balances.
satsumi (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
January 26, 2014, 10:29:28 PM
 #2

Update: it started mining to the one address again. Perhaps it was the act of unlocking the wallet that allowed it to start making new addresses for the miner, though I locked it and restarted the program.

From reading other posts on here it seems unlikely that anyone here has read through the source and fully understands how the process actually works, but thanks for reading my weird story!
Pages: [1]
  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!