Commit Graph

15459 Commits

Author SHA1 Message Date
Kris Nuttycombe 2ec7073459 Fix error message text to refer to zcashd-wallet-tool rather than the RPC method. 2021-11-17 18:03:11 -07:00
Kris Nuttycombe b1d6a514e2 Parameterize HD keypath parsing by coin type. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe b722c40fe2 Minor naming fixes 2021-11-17 18:01:28 -07:00
Kris Nuttycombe 0fe1134337 Only maintain CKeyID for the transparent part of ZcashdUnifiedAddress 2021-11-17 18:01:28 -07:00
Kris Nuttycombe cfee863644 Add diversifier_index_t::ToTransparentChildIndex 2021-11-17 18:01:28 -07:00
Kris Nuttycombe 6e6359229a Use MnemonicSeed instead of HDSeed where appropriate. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe f31b3c2190 Update documentation for GenerateNewSeed. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe 7860d6ede3 Generalize keypath parsing over account id. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe f65d6f63ee Minor cleanup of the code that searches for a valid transparent key. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe de57da38ce Document mnemonic-seed-related RPC method changes & update changelog. 2021-11-17 18:01:28 -07:00
Kris Nuttycombe f626673b89 Fix polymorphism of string serialization.
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-07 10:16:22 -07:00
Kris Nuttycombe ea8e9438af Fix name of menmonic entropy length constant. 2021-11-07 10:16:22 -07:00
Kris Nuttycombe a67fb00d0a Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-07 10:16:22 -07:00
Kris Nuttycombe 399ed5b4d7 Do not strip quotes when verifying mnemonic seed. 2021-11-07 10:16:22 -07:00
Kris Nuttycombe 551072165a Style fix in BIP 32 path account parsing test. 2021-11-07 10:16:22 -07:00
Kris Nuttycombe 6fdded20bc Restore legacy HDSeed encryption tests. 2021-11-07 10:16:22 -07:00
Kris Nuttycombe d84845d199 Clean up handling of mnemonic seed metadata. 2021-11-07 10:16:22 -07:00
Kris Nuttycombe 4080f48868 Fix max transparent diversifier index. 2021-11-01 21:18:14 -06:00
Kris Nuttycombe 87f7e5fbba Fix naming of unified spending & full viewing keys 2021-11-01 21:12:41 -06:00
Kris Nuttycombe cd01b2d9bf Fix transparent BIP-44 keypaths. 2021-11-01 21:06:32 -06:00
Kris Nuttycombe b54d4cac7d Restore FindAddress comment 2021-11-01 10:13:19 -06:00
Kris Nuttycombe e4e77eb389 Fix diversifier_index_t less than operator. 2021-10-30 08:26:59 -06:00
Kris Nuttycombe 0951fe22d8 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-10-30 08:26:59 -06:00
Kris Nuttycombe 67557df165 Use SecureString for mnemonic phrase. 2021-10-30 08:26:59 -06:00
Kris Nuttycombe d09a0c44f3 Clean up format of recovery information in the wallet dump. 2021-10-29 13:38:36 -06:00
Kris Nuttycombe 30517a002b Move CKeyMetadata back to wallet.h 2021-10-29 13:38:36 -06:00
Kris Nuttycombe dbcdc560de Fix spurious test passage. 2021-10-29 13:38:36 -06:00
Kris Nuttycombe 22fa6b22ea Restore legacy HD seed storage & retrieval tests. 2021-10-29 13:38:36 -06:00
Kris Nuttycombe b67e62d977 Address comments from code review. 2021-10-29 13:38:36 -06:00
Kris Nuttycombe 477a166565 Use hardened derivation for the legacy Sapling key at the address index level. 2021-10-29 13:38:36 -06:00
Kris Nuttycombe 8bf4ec3b4a Require backup of the emergency recovery phrase.
After 4.5.2, all wallets will be populated with an emergency
recovery phrase, and all future addresses will be derived from
the associated seed. To prevent potential loss of funds, we
require that the user explicitly invoke the `walletconfirmbackup`
RPC method to verify that they have backed up this seed.
2021-10-29 13:38:36 -06:00
Kris Nuttycombe 5760a639d2 Use 0x7FFFFFFF for the legacy account ID. 2021-10-25 14:09:21 -06:00
Kris Nuttycombe d6984dbf78 Fix wallet import/export test 2021-10-21 11:44:08 -06:00
Kris Nuttycombe e0ae5362c9 Revert change to the type of GenerateNewKey 2021-10-21 08:21:13 -06:00
Kris Nuttycombe d8d9cd129e Use legacy address for Sapling migration until UA functionality is available to the RPC tests. 2021-10-20 17:13:52 -06:00
Kris Nuttycombe ebab190fdf Replace account ID with ZIP-0032 key path in listaddresses output.
Account ID information is insufficiently granular to identify separate
pools of spend authority.
2021-10-20 13:33:47 -06:00
Kris Nuttycombe dc2c07bbde Generate legacy Sapling addresses from the mnemonic seed.
This further deprecates the legacy seed, by no longer using it
as a source of randomness. Instead of continuing to rely on
successive account identifiers for the legacy seed, it now
takes advantage of the `m/32'/coin_type'/account'/addressIndex'`
keypath scheme defined by ZIP 32. For the purpose of the zcashd
wallet, the account identifier used in generation of Sapling
addresses associated with the legacy address generation code
path is fixed to 0x7FFFFFFE, the same as the account used for
all future transparent address generation.
2021-10-20 13:33:47 -06:00
Kris Nuttycombe 2885ae7643 Derive transparent keys from mnemonic seed. 2021-10-19 17:51:14 -06:00
Kris Nuttycombe 666d135e2e Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-10-19 11:48:02 -06:00
Kris Nuttycombe daf443c9e6 Update librustzcash dependency version. 2021-10-19 11:48:02 -06:00
Kris Nuttycombe 8f1d58f16f Remove unused forward declaration. 2021-10-19 11:48:02 -06:00
Kris Nuttycombe f99f2e4b3f Fix tests for wallet operations on legacy Sapling keys. 2021-10-19 11:48:02 -06:00
Kris Nuttycombe 290b2e4e39 Use the default UA-based Sapling address for the saplingmigration tool. 2021-10-19 11:48:02 -06:00
Kris Nuttycombe f6ad523ccb Add unified full viewing keys and Zcash-internal unified addresses. 2021-10-19 11:48:02 -06:00
Kris Nuttycombe 83dee7e886 Adds basic unified spending key derivation.
Also, begin pruning Sapling key derivation down to the
minimal amount required to support the legacy Sapling
key derivation process.
2021-10-19 11:48:02 -06:00
Kris Nuttycombe 8883ae8b9e Add support for externally searching for valid Sapling diversifiers.
In order to support generation of unified addresses, it needs
to be possible for the code generating a unified address to search
the space of Sapling diversifiers to obtain a valid diversifier.

Historically, invalid diviersifiers were simply skipped, so we retain
this behavior when obtaining a Sapling address from the legacy HD seed.
2021-10-19 11:48:02 -06:00
Kris Nuttycombe 5677649af1 Derive random HD seeds from ZIP-339 seed phrases.
Add support for dump of legacy HD seeds & persistence of mnemonic-based seeds.
2021-10-19 11:48:02 -06:00
Marshall Gaucher d6fc064018
Merge pull request #5342 from LarryRuane/2021-10-wallet-network-info-error
better wallet network info error handling
2021-10-15 18:12:44 -07:00
Kris Nuttycombe 3329b26374
Merge pull request #5339 from git-sgmoore/patch-1
Update reduce-traffic.md - add one word
2021-10-14 18:41:57 -06:00
Kris Nuttycombe 0e685b67da
Fix wallet-related wording in doc/reduce-traffic.md 2021-10-13 13:20:40 -06:00