Browse Source

More details relating to sapzaddr which breaks our 'no addresses in wallet.dat' statement

zip400
Jonathan "Duke" Leto 6 years ago
parent
commit
f81f94b514
  1. 43
      zip-0400.rst

43
zip-0400.rst

@ -27,7 +27,7 @@ Motivation
Specification
===============
Zcash wallet.dat format is inherited from Bitcoin 0.11 wallet format with
Zcash wallet.dat format is inherited from Bitcoin 0.11.2 wallet format with
various additions to store data related to Sprout and Sapling shielded
addresses, and transactions involving them. Transparent addresses and
transactions involving them are identical, with exceptions being mentioned in
@ -53,19 +53,31 @@ addresses. This key type simply stores a public and private key, without a
hash of the values. This means that these entries take up much less space
than transparent keys.
The reader should note that Zcash addresses of any kind never appear in a
wallet.dat file. Only public keys and private keys exist in wallet.dat files,
addresses never appear or are stored in any way, they are calculated from
pubkeys by nodes when the wallet is loaded.
The reader should note that Zcash addresses are almost never stored in a
wallet.dat file. Only transparent public keys and private keys exist in
wallet.dat files, transparent addresses never appear or are stored in any way,
they are calculated from pubkeys by nodes when the wallet is loaded.
Sprout shielded addresses work the same as above, only pubkeys and private keys
are stored in wallet.dat. But in Zcash Sapling, there can be more than one
diversified address for an incoming viewing key (IVK), so pairs of data of the
form
(IVK,sapling_zaddr)
are stored in the wallet, the only actual addresses stored directly.
Here is a concise list of each wallet key type with the kind of data that is stored:
* bestblock - Data relating to best block, i.e. chaintip
* chdseed - Encrypted HD seed
* ckey - Encrypted transparent pubkey and private key
* csapzkey - Encrypted Sapling zaddr pubkey and privkey
* cscript - Redeem script
* czkey - Encrypted Sprout zaddr pubkey and privkey
* defaultkey - Default transparent address pubkey
* hdseed - Hierarchical Deterministic seed
* hdchain - Hierarchical Deterministic chain code, derived from seed
* hdseed - Hierarchical Deterministic seed
* key - Transparent pubkey and privkey, with sha256(pubkey+privkey)
* keymeta - Transparent key metadata
* minversion - Minimum wallet version required to open this wallet.dat
@ -73,20 +85,29 @@ Here is a concise list of each wallet key type with the kind of data that is sto
* name
* orderposnext - Index of next tx
* pool - Keypool pub/private keypair
* purpose - Purpose of a transparent address
* sapzaddr - Sapling zaddr viewing key
* purpose - Purpose of an address
* sapzaddr - Sapling zaddr viewing key and address
* sapzkey - Sapling zaddr pubkey and privkey
* sapzkeymeta - Metadata about Sapling pubkeys
* tx - Transaction data
* version - Wallet version (different from source code version)
* vkey - Sprout viewing key
* version
* watchs - Watch-only address
* witnesscachesize - Shielded Note Witness cache size
* wkey
* zkey - Sprout zaddr pubkey and privkey
* zkeymeta - Metadata about Sprout pubkey
The key types beginning with z* and sapz* are Zcash additions to the
Bitcoin wallet format, they do not exist in Bitcoin Core wallets.
The following are Zcash additions to the Bitcoin wallet format, they do not
exist in Bitcoin Core wallets:
* zkey
* zkeymeta
* czkey
* sapzaddr
* sapzkey
* csapzkey
* sapzkeymeta
The following keys only exist in Zcash Sapling-enabled wallets:
* sapzkey

Loading…
Cancel
Save