Bitcoin Forum
May 30, 2024, 09:12:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Absolute minimum Wallet size? @DEVs!!  (Read 1082 times)
oOoOo (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 29, 2011, 04:15:12 AM
 #1

What is the absolute minimum amount of information that needs to be in the wallet.dat file in order to be accepted by the client?

I guess a single private key should be sufficient, but what exactly has to go into the wallet.dat file?

Can any of you devs please give me a dump (./db_dump) of the smalles possible file so I can take a look at it? Or maybe you could just post a link to your "nanowallet.dat" file in this thread. I think you should use a testnet key for this^^

Anyone?!?

indio007
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
July 29, 2011, 04:21:40 AM
 #2

I started the exact same thread. I don't remember getting a satisfactory answer.
koin
Legendary
*
Offline Offline

Activity: 873
Merit: 1000


View Profile
July 29, 2011, 07:39:02 AM
 #3

What is the absolute minimum amount of information that needs to be in the wallet.dat file in order to be accepted by the client?

I guess a single private key should be sufficient, but what exactly has to go into the wallet.dat file?

Can any of you devs please give me a dump (./db_dump) of the smalles possible file so I can take a look at it?

bitcointools might help you create one yourself, i'm not sure though:  http://github.com/gavinandresen/bitcointools
oOoOo (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 29, 2011, 12:25:07 PM
 #4

No, I don't want to create one myself, I want to know the minimum size required!
koin
Legendary
*
Offline Offline

Activity: 873
Merit: 1000


View Profile
July 29, 2011, 04:48:38 PM
 #5

No, I don't want to create one myself, I want to know the minimum size required!

sorry, i don't know the answer.

this is not something useful for other bitcoin users as even if the wallet had only one key, the wallet.dat file would grow significantly after the very first transaction.

perhaps you could explain for what purpose this is useful to you?  maybe then someone else might be more interested in figuring out an answer.
indio007
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
July 29, 2011, 06:01:56 PM
 #6

My purpose is to make paper bitcoins in qr code with set face values.

these would pretty much be onetime use.
basically it would work like this.

Take empty wallet
open wallet.dat in notepad.
save gibberish to qr code
send 5 btc to  wallet

Now when someone gets the paper
scan qr code
save gibberish as wallet.dat
copy to bitcoin directory
start bitcoin client

One side of the paper will be qr code with visible embedded address so amount can be verified visually or with scan with blockexplorer
otherside has the wallet.dat as ascii text

just as cash physical security is necessary.
bitplane
Sr. Member
****
Offline Offline

Activity: 321
Merit: 250

Firstbits: 1gyzhw


View Profile WWW
July 29, 2011, 07:37:46 PM
 #7

The best option would be to use a separate tool to create wallet.dat from a single keypair, or a different client that doesn't need a bloated wallet
vector76
Member
**
Offline Offline

Activity: 70
Merit: 18


View Profile
July 29, 2011, 08:41:14 PM
 #8

A wallet contains:
- public key/private key pairs for your addresses showing in the UI
- public key/private key pairs for the key pool and 'change' addresses, which are invisible in the UI
- records of transactions you have made, both sending and receiving
- your 'default key'
- public keys and associated names in the address book, for sending only, not receiving
- various other client settings, such as whether to use a proxy, default transaction fee, etc..

Almost all of this data is useless for the case you are describing.  Rather than importing a wallet, you only need to import a single key.

Just generate a new address, send coins to that address, and produce a qr code that contains a single public/private key pair.  You technically only need to save the private key, and the public key can be generated from it.

So the minimum is 256 bits, or 32 bytes.

If you had a standard way to deterministically generate keys, you might be able to get away with half that.
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!