Sapling keys generated from the seed are not yet persisted, so we don't
want to persist the seed or chain state either, otherwise the wallet
could end up in an inconsistent state.
Some tests are temporarily disabled because commenting out HDSeed
persistence breaks invariants inside CCryptoKeyStore.
Revert this commit during the PR for #3388.
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32.
Note that not all Sapling keys in the wallet will correspond to the
wallet's HDSeed, as a standalone Sapling xsk can be imported via
z_importkey. However, it must have been generated from a seed itself,
and thus is more likely to be backed up elsewhere.
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.
A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.
All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
This patch removes the need for the intermediary Base58 type
CZCPaymentAddress, by providing {Encode,Decode}PaymentAddress
functions that directly operate on the conversion between strings
and libzcash::PaymentAddress.
Refactor t-address encoding
Includes code cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- Only the second commit (first is for QT code)
- bitcoin/bitcoin#11167
- Only the first commit (the rest are not part of the t-address encoding refactor).
Part of #3058. Precursor to #3202.
Update note classes to be polymorphic
Closes#3194. Lays foundation for introduction of Sapling notes through refactoring and creation of a class hierarchy for Sprout notes. This PR updates some tests, but otherwise is a no-op.
[macOS] Fix test/gtest bugs caught by latest clang
Tests fail with latest clang on macOS (clang-900.0.39.2)
```
test/rpc_wallet_tests.cpp:1064:26: error: implicit conversion from 'double' to 'CAmount' (aka 'long long') changes value from 123.456 to 123 [-Werror,-Wliteral-conversion]
test/rpc_wallet_tests.cpp:1071:18: error: implicit conversion from 'double' to 'CAmount' (aka 'long long') changes value from 1.111 to 1 [-Werror,-Wliteral-conversion]
gtest/test_deprecation.cpp:28:1: error: control reaches end of non-void function [-Werror,-Wreturn-type]
```
Part of #2246.
The new parameter is to satisfy the principle of least astonishment
by providing a sensible default for the maximum number of transparent
inputs to shield. If users do not configure -mempooltxinputlimit
it is possible for them to create transactions with hundreds of
inputs which suffer from mining delay, due to the current state of
the network where some miners have configured -mempooltxinputlimit
as a way to deal with the problem of quadratic hashing.
Usability improvements for z_importkey
- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
for existing keys.
Closes#2032
- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
for existing keys.
Closes#2032