Bitcoin Forum
May 05, 2024, 04:58:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I create a cron job to prune out my wallet.dat file?  (Read 1038 times)
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 07, 2013, 10:08:41 PM
 #1

My wallet.dat file is getting out of control how can I remove some addresses that were used in once off transactions and are now empty in php?

I know PHP has a berkley db tools to interact with it, so has anyone written a script for this?
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
1714928316
Hero Member
*
Offline Offline

Posts: 1714928316

View Profile Personal Message (Offline)

Ignore
1714928316
Reply with quote  #2

1714928316
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1028



View Profile WWW
February 08, 2013, 05:34:23 AM
Last edit: February 08, 2013, 05:51:58 AM by deepceleron
 #2

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

You shouldn't use a cron job for anything except Bitcoin RPC commands, accessing the data files when Bitcoin could be running is a bad thing.
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 08, 2013, 05:43:02 AM
 #3

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

Yes when you have over 200,000 bitcoin addresses, the bitcoind system starts getting slow, and I want to make it faster, this would be one way. I guess one day I will be taking to write a script to clear it out.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1028



View Profile WWW
February 08, 2013, 06:02:08 AM
 #4

You'd have a hard time figuring out what addresses to remove. If you make a script to "remove addresses with 0 balance and all their transactions if they previously received coins", it may remove persistent receiving addresses like 1gweedo, etc, and such a task would only work correctly if the information in the wallet is actually correct. It would be much better to just dump the private keys of addresses you want to keep and send the balance to a new wallet.
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 08, 2013, 06:15:07 AM
 #5

You'd have a hard time figuring out what addresses to remove. If you make a script to "remove addresses with 0 balance and all their transactions if they previously received coins", it may remove persistent receiving addresses like 1gweedo, etc, and such a task would only work correctly if the information in the wallet is actually correct. It would be much better to just dump the private keys of addresses you want to keep and send the balance to a new wallet.

well these addresses are for one off transactions, that people know about that. I also need to keep the accounts intact, I mean the worst case I can rebuild the accounts from the database. I guess it is back to testnet and see what works.
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
February 08, 2013, 09:28:46 AM
 #6

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

Yes when you have over 200,000 bitcoin addresses, the bitcoind system starts getting slow, and I want to make it faster, this would be one way. I guess one day I will be taking to write a script to clear it out.
did you once already had more than 1 million addresses?
still looking for a solution to manage 46M adresses.
sry for topic hijacking!

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 08, 2013, 05:55:52 PM
 #7

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

Yes when you have over 200,000 bitcoin addresses, the bitcoind system starts getting slow, and I want to make it faster, this would be one way. I guess one day I will be taking to write a script to clear it out.
did you once already had more than 1 million addresses?
still looking for a solution to manage 46M adresses.
sry for topic hijacking!

what?
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
February 08, 2013, 07:04:26 PM
 #8

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

Yes when you have over 200,000 bitcoin addresses, the bitcoind system starts getting slow, and I want to make it faster, this would be one way. I guess one day I will be taking to write a script to clear it out.
did you once already had more than 1 million addresses?
still looking for a solution to manage 46M adresses.
sry for topic hijacking!

what?
did you manage to have a working wallet.dat with atleast 1m addresses?

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 08, 2013, 07:14:53 PM
 #9

Here's a start, as a bonus you get a language that's designed for data and analytics, not for making web pages.

https://github.com/gavinandresen/bitcointools

You've got 6GB of blockchain and you're worried about your wallet?

Yes when you have over 200,000 bitcoin addresses, the bitcoind system starts getting slow, and I want to make it faster, this would be one way. I guess one day I will be taking to write a script to clear it out.
did you once already had more than 1 million addresses?
still looking for a solution to manage 46M adresses.
sry for topic hijacking!

what?
did you manage to have a working wallet.dat with atleast 1m addresses?

nope that was someone else I think I remember that thread or something
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
February 08, 2013, 07:59:34 PM
 #10

Import the keys you use into a blank wallet, you'll just need JSON-RPC

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!