Bitcoin Forum
December 14, 2024, 05:29:21 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: getnewaddress per wallet  (Read 2444 times)
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 07, 2010, 07:39:24 AM
 #1

Hey,

Quote
< MT`AwAy> genjix: http://pastecoin.com/ <- you're generating a new
                 bitcoin address at each page load, don't you fear wallet.dat
                 will grow to astronomical size?

Is this correct? Does my wallet save every single address?
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
December 07, 2010, 07:41:15 AM
 #2

Hey,

Quote
< MT`AwAy> genjix: http://pastecoin.com/ <- you're generating a new
                 bitcoin address at each page load, don't you fear wallet.dat
                 will grow to astronomical size?

Is this correct? Does my wallet save every single address?

That you generate?  If I understand correctly, it's a public/private keypair, and you have to store the private key.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
December 07, 2010, 08:27:08 AM
 #3

It has to store both, you can't deduce the public key from the private key...

This is another reason to have a more modularized bitcoin software... someone could make a wallet-management module that uses a database instead of a file, to better scale...

Is the wallet.dat file indexed?
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
December 07, 2010, 08:52:59 AM
 #4

This is another reason to have a more modularized bitcoin software... someone could make a wallet-management module that uses a database instead of a file, to better scale...

Is the wallet.dat file indexed?

wallet.dat is a db4 key/value database.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2311


Chief Scientist


View Profile WWW
December 07, 2010, 12:40:20 PM
 #5

Is this correct? Does my wallet save every single address?

Yes.

The getaccountaddress method will return the same address until it is used (until a payment is received on that address).

But getnewaddress always creates, stores, and returns a new address.

How often do you get the chance to work on a potentially world-changing project?
Amso
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
March 01, 2011, 07:40:50 AM
 #6

Sorry to bump an old topic. I am researching this subject...

Is this correct? Does my wallet save every single address?

Yes.

The getaccountaddress method will return the same address until it is used (until a payment is received on that address).


Why create a new address when a payment is received?

In a few years, won't there be hundreds or even thousands of addresses if bitcoin is used regularly? That would be very "messy" since bitcoin stores all the addresses.

Won't it be "cleaner" if user just reuse existing addresses until the user decide to create a new address?....May be anonymity is not an issue for an user and the user wish to use the same address again and again.
M4v3R
Hero Member
*****
Offline Offline

Activity: 607
Merit: 500


View Profile
March 01, 2011, 08:49:14 AM
 #7

I think that future Bitcoin clients will have the ability to merge Bitcoin addresses into one - by sending their balance to one final address, and discarding old ones. Would make sense for me.
burtyb
Newbie
*
Offline Offline

Activity: 45
Merit: 0



View Profile WWW
March 01, 2011, 01:37:11 PM
 #8

I created 10,000 addresses and that gave a wallet of around 6.2MB - so they will build up after time but I'm sure by the time it matters we'll have other tools to manage them.
khal
Hero Member
*****
Offline Offline

Activity: 540
Merit: 500



View Profile WWW
March 01, 2011, 05:43:42 PM
 #9

It may be a good security to generate 1'000'000'000 addresses to avoid someone to send your wallet over the web :p
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5404
Merit: 13498


View Profile
March 01, 2011, 08:18:28 PM
 #10

The addresses don't take up all that much room. The wallet.dat size is mostly all the sent/received transactions of yours.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Hal
VIP
Sr. Member
*
expert
Offline Offline

Activity: 314
Merit: 4276



View Profile
March 02, 2011, 01:11:26 AM
 #11

It may be a good security to generate 1'000'000'000 addresses to avoid someone to send your wallet over the web :p
Actually there's respectable cryptographic research into making signing keys enormous, potentially GBs in size. The purpose is to make it hard for a virus to steal them. Then you might say, well, how do I sign with a multi-GB key? This is the trick, you can sign using a small subset of the key, but the subset changes for each signature, so the virus has to steal the whole key in order to sign arbitrary data.

Not too applicable to Bitcoin, but the basic idea might be useful sometimes.

Hal Finney
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!