Bitcoin Forum
July 02, 2024, 04:18:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sweep an entire wallet.dat?  (Read 1856 times)
drakahn (OP)
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500



View Profile
August 06, 2012, 04:44:00 AM
 #1

Is there a way to sweep an entire wallet.dat into one address? trying it the old fashioned way (sending the coins) is giving me "transaction create failed" -.-

I'm guessing it would be all the single satoshi inputs adding up

right now i have a little script that keeps trying to send different sized chunks of coins, but it crashes a lot (whenever qt would spit out the failed messagebox i guess), a mix of the script and manually sending small amounts eventually works, but it is not very.... efficient

blockchain.info has the pywallet dump reader, but i'm using the latest bitcoin and i think the wallet/private keys are different

or is there a way to detect when it would fail and make it use different inputs?


Edit : The wallet is a satoshi dice bot, i get about 500 transactions before fee's go crazy, i get about 3000 transactions before it starts with the failed transactions, i get about 5000 transactions before its almost useless, slow, huge fees, lots of errors, so i change every 3000 or so

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
August 09, 2012, 03:10:39 AM
 #2

Emptying an address of .00000001 payments is pretty hard, harder than it was to send them to you. It takes 100,000 of these dust payments to equal a bit-penny, so if you've ever walked by a penny without picking it up, that shows how little effort that small amount of money is worth. You must actually send these coins on the Bitcoin network in order to consolidate them.

The problem will be that your balance is made up of winnings and losing payments. Every time you send a payment from Bitcoin to the gambling site, Bitcoin also sends the unspent balance "change" back to itself to a new address (these reserve addresses aren't shown in Bitcoin). That means that for almost every gamble, there is a payment in your wallet in a unique address. If you modified Bitcoin so it always sends change back to the same address, that would eliminate much of the cruft.

When Bitcoin constructs a transaction, it does so out of the balances that will create the least change. If you were to send a payment exactly equal to only your winnings, it may construct this payment out of just winning payment balances and leave behind just satoshi balances which you can discard.
drakahn (OP)
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500



View Profile
August 09, 2012, 03:16:54 AM
 #3

Emptying an address of .00000001 payments is pretty hard, harder than it was to send them to you. It takes 100,000 of these dust payments to equal a bit-penny, so if you've ever walked by a penny without picking it up, that shows how little effort that small amount of money is worth. You must actually send these coins on the Bitcoin network in order to consolidate them.

The problem will be that your balance is made up of winnings and losing payments. Every time you send a payment from Bitcoin to the gambling site, Bitcoin also sends the unspent balance "change" back to itself to a new address (these reserve addresses aren't shown in Bitcoin). That means that for almost every gamble, there is a payment in your wallet in a unique address. If you modified Bitcoin so it always sends change back to the same address, that would eliminate much of the cruft.

When Bitcoin constructs a transaction, it does so out of the balances that will create the least change. If you were to send a payment exactly equal to only your winnings, it may construct this payment out of just winning payment balances and leave behind just satoshi balances which you can discard.
I'm using the -noprivacy branch so there are no change addresses, just change inputs
I've also modified the client to not spend the single satoshi's

ITs been pointed out to me that there is a 100kb limit on transaction size, which would be a little over 500 satoshi's, add that to the minimum fee's on here https://en.bitcoin.it/wiki/Free_transaction_relay_policy and it just isn't worth it

For now i can just take the single satoshi's as a loss, but one day they may be worth something and it'd be worth it to get them out... as long as fee calculation has changed by then anyway

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
HeavyMetal
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile
August 25, 2012, 12:25:30 AM
 #4

Just save those tiny units(I don't want to call them the S word) for about 20 years, then use them to buy beer.
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!