Commit Graph

15994 Commits

Author SHA1 Message Date
Kris Nuttycombe 15bb06f452 Minor rename & documentation improvement.
Addresses https://github.com/zcash/zcash/pull/5700#discussion_r830395940
and https://github.com/zcash/zcash/pull/5700#discussion_r830396140
2022-03-20 12:30:37 -06:00
Charlie O'Keefe 612f3e7e81
Merge pull request #5711 from nuttycom/5186-updates-to-z_viewtransaction-fixes
Uncomment addtional tests that depend on z_viewtransaction.
2022-03-19 15:53:39 -06:00
Kris Nuttycombe ba3594f9ee Uncomment addtional tests that depend on z_viewtransaction. 2022-03-19 12:11:27 -06:00
Charlie O'Keefe 9974be75fb
Merge pull request #5710 from zcash/feature/wallet_orchard
Add Orchard support to the zcashd wallet.
2022-03-19 10:25:57 -06:00
Kris Nuttycombe b32c8d3f0f Fix missing AllowRevealedSenders flag in test. 2022-03-18 21:41:38 -06:00
Kris Nuttycombe b73ca36c45 Merge remote-tracking branch 'upstream/master' into feature/wallet_orchard 2022-03-18 19:19:50 -06:00
Kris Nuttycombe 4392375404
Merge pull request #5709 from str4d/5673-keypath-info-in-backups
Include HD keypath info in `dumpwallet` and `z_exportwallet`
2022-03-18 17:22:35 -06:00
Kris Nuttycombe fabff30d88
Merge pull request #5700 from nuttycom/5186-updates-to-z_viewtransaction
Add Orchard and Unified Address support to z_viewtransaction
2022-03-18 17:19:31 -06:00
Kris Nuttycombe d724c81289
Merge pull request #5438 from sandakersmann/master
Update copyright year to 2022
2022-03-18 16:13:43 -06:00
Jack Grigg 78fea33cde wallet: Add seedfp to transparent keys in dumpwallet / z_exportwallet
Also refactors Sapling key export logic to match. Sapling key exports
already have hdkeypath and seedfp (in a different spot in the line).

Sprout key exports are unmodified, because we have removed the ability
to generate new Sprout keys, so there will never be HD Sprout keys.
2022-03-18 21:53:12 +00:00
Jonas Schnelli eaf8eb40f4 [Wallet] add HD xpriv to dumpwallet
Zcash: Only the refactor and addition of hdkeypath to transparent keys.

(cherry picked from commit bitcoin/bitcoin@77c912d21c)
2022-03-18 21:29:22 +00:00
Kris Nuttycombe a1bd440f2b Return the default unified address if we have the UFVK but no address metadata. 2022-03-18 12:00:44 -06:00
Kris Nuttycombe 4df6c028f4 Correctly report change outputs in z_viewtransaction.
One of the invariants that we want to hold for unified addresses
is that we never want change addresses to be visible to users.
This updates address metadata retrieval to also indicate whether
or not an address is associated with a UFVK's internal key,
and omits and flags change addresses in z_viewtransaction output.
2022-03-18 11:09:35 -06:00
Kris Nuttycombe 7c3afad111 Add debug printing for receivers and recipient addresses. 2022-03-18 11:08:04 -06:00
Kris Nuttycombe 2d673ca704 Update z_viewtransaction documentation to correctly represent field names. 2022-03-18 11:05:48 -06:00
Kris Nuttycombe 0c977076bc Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-18 08:34:27 -06:00
Steven Smith e1e480e9c4 Ensure z_viewtransaction returns Orchard details 2022-03-18 08:31:51 -06:00
Steven Smith 445f4de0f4 Add Orchard & unified address support to z_viewtransaction.
Fixes #5186
2022-03-18 08:31:48 -06:00
Kris Nuttycombe 28210791a1
Merge pull request #5693 from str4d/z_sendmany-privacy-policy
z_sendmany: Replace `allowRevealedAmount` with `privacyStrategy`
2022-03-18 08:09:43 -06:00
Kris Nuttycombe 315392ce3b Add OrchardWallet::GetTxActions
This method detects and returns metadata for any notes belonging to the
wallet that are spent in the transaction. It also trial-decrypts the
Orchard outputs of a transaction using the wallet's incoming viewing
keys along a set of OVKs provided by the caller, and returns metadata
about the notes that were successfully decrypted.
2022-03-18 08:03:16 -06:00
Steven Smith 9993d948ef Load previously persisted sent transaction recipient metadata back into the wallet.
This completes some unfinished work from #5549
2022-03-18 08:03:12 -06:00
Daira Hopwood 6f4b283a3d
Merge pull request #5701 from str4d/5697-gitian-fix
build: Add missing `util/match.h` to `src/Makefile.am`
2022-03-18 11:28:31 +00:00
Jack Grigg 562f5add87 build: Add missing `util/match.h` to `src/Makefile.am`
The missing header reference meant that Gitian builds didn't include the
file in its distribution step, causing subsequent builds to fail with a
'file not found' error.

Closes zcash/zcash#5697.
2022-03-18 02:54:26 +00:00
Jack Grigg 65cb79e023 z_sendmany: Expand `privacyPolicy` cases
We now have a full roster of privacy policies. We can graph the
relationships between the policies; arrows point from more-private to
less-private, and each policy is permitted to reveal information covered
by all policies pointing to it (in addition to the extra information it
is permitted to reveal).

                       FullPrivacy
                            v
                   AllowRevealedAmounts
                        v           v
    AllowRevealedRecipients   ---- AllowRevealedSenders
               v             /               v
     AllowFullyTransparent <-  AllowLinkingAccountAddresses
                        v       v
                        NoPrivacy

The synthetic `LegacyCompat` policy now uses the `AllowFullyTransparent`
policy for backwards compatibility, and the `FullPrivacy` policy if the
sender or recipients involve Unified Addresses.

Closes zcash/zcash#5677.
Closes zcash/zcash#5678.
2022-03-18 02:45:23 +00:00
Jack Grigg 1505121877 z_sendmany: Replace `allowRevealedAmount` with `privacyStrategy`
This replaces the bool argument with a string argument, enabling us to
add additional privacy strategies. We also alter the default to be
backwards-compatible with existing RPC method usage, by only enabling
the strongest checks if a Unified Address is involved.

Closes zcash/zcash#5676.
2022-03-18 00:58:13 +00:00
Kris Nuttycombe cf84e1e79d
Merge pull request #5699 from nuttycom/feature/wallet_orchard-merge_master
Merge master branch back to feature/wallet_orchard
2022-03-17 18:25:28 -06:00
Kris Nuttycombe 80324bc653 Merge remote-tracking branch 'upstream/master' into feature/wallet_orchard-merge_master 2022-03-17 16:52:49 -06:00
Kris Nuttycombe 7cd4462b20
Merge pull request #5695 from str4d/5694-gitian-fix
build: Fix `zcash/address/orchard.hpp` filename in `src/Makefile.am`
2022-03-17 16:30:33 -06:00
Kris Nuttycombe b708b8ef60
Merge pull request #5692 from nuttycom/feature/wallet_orchard-limited_ua_inputs
Add UnifiedAddress variant to ZTXOSelector
2022-03-17 13:42:41 -06:00
Jack Grigg 22c6bf88a3 build: Fix `zcash/address/orchard.hpp` filename in `src/Makefile.am`
The incorrect extension caused `make distdir-am` to fail due to a
missing rule for the header file.

Closes zcash/zcash#5694.
2022-03-17 19:38:10 +00:00
Kris Nuttycombe a783de43e3 Simplify retrieval of unified account by address.
Co-authored-by: ying tong <yingtong@z.cash>
2022-03-17 11:38:44 -06:00
Kris Nuttycombe 9582a2c1f1 Eliminate redundancy between the wallet and the keystore.
The methods `FindUnifiedFullViewingKey` and `FindUFVKByReceiver`
are implementable with only the information that'a available from
the keystore, so it's better to use the methods that are defined
there in the previous commit.
2022-03-17 11:38:44 -06:00
Kris Nuttycombe 9d8c20ed78 Add UnifiedAddress variant to ZTXOSelector
When a user supplies a unified address as the source of funds
for z_sendmany, the previous behavior could have risked user
privacy by spending transparent UTXOs belonging to different
diversified addresses in the same transaction, thereby linking
those addresses, and consequently any diversified shielded
receivers of unified addresses containing those transparent
receivers.

This change limits selection of transparent UTXOs to only those
explicitly associated with the unified receivers of the provided
source UA. Also, if a UA is provided as the source, the behavior
is maintained that only shielded notes in pools corresponding to
the receivers of that UA will be selected.
2022-03-17 11:38:44 -06:00
str4d 12b37d5a11
Merge pull request #5665 from str4d/5657-z_sendmany-orchard-spends
Add support for sending Orchard funds in `z_sendmany`
2022-03-16 18:12:56 +00:00
str4d 454e7640f0
Merge pull request #5680 from nuttycom/saplingmigration_explicit_change
Explicitly specify the change address in the Sapling migration.
2022-03-16 13:11:02 +00:00
Kris Nuttycombe b9b471bfa6
Merge pull request #5684 from nuttycom/feature/wallet_orchard-rpc_doc_cleanup
Address minor issues from #5605
2022-03-15 21:43:47 -06:00
Kris Nuttycombe 5c9b7ec4df
Merge pull request #5671 from therealyingtong/ua-z_getbalance
z_getbalance: Handle Unified Address case.
2022-03-15 19:29:37 -06:00
Kris Nuttycombe 860fc8886a Update documentation of z_importviewingkey and z_exportviewingkey to address unified keys. 2022-03-15 16:39:26 -06:00
Kris Nuttycombe 482f0e7e44 Return the correct error for `z_getbalance` if a UA does not correspond to an account in the wallet..
Also, update the help text for z_getbalance to suggest that the user
prefer z_getbalanceforviewingkey.

Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-15 16:22:05 -06:00
ying tong 1cd92e579c Style improvements in RPC tests.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-15 16:22:05 -06:00
therealyingtong c1cd8a7e2d Adapt RPC tests to use z_getbalance for UAs. 2022-03-15 16:22:05 -06:00
therealyingtong 6caec7aef1 z_getbalance: Handle Unified Address case. 2022-03-15 16:22:05 -06:00
Kris Nuttycombe 235767ba6e Document that Orchard keys are not supported in z_importkey help 2022-03-15 16:07:37 -06:00
Kris Nuttycombe 24ce54f3ed Add orchard support to z_getnotescount 2022-03-15 15:49:01 -06:00
Kris Nuttycombe 5d65952f54 Document that z_getnewaccount and z_getaddressforaccount replace z_getnewaddress. 2022-03-15 15:32:06 -06:00
Kris Nuttycombe 1b1495b7d7 Add TODO for Orchard z_listunspent integration. 2022-03-15 15:31:40 -06:00
sasha 2dcaac5fcb
Merge pull request #5574 from daira/zcashd-wallet-tool
Make a zcashd-wallet-tool executable
2022-03-15 13:41:55 -07:00
Jack Grigg 381b626a78 Set default Orchard anchor confirmations to 1
Currently we cannot use anything greater than 1, because the Orchard
witness tree cannot provide authentication paths to anything but the
current tree root. Once zcash/incrementalmerkletree#22 is implemented,
we can revert this change as part of zcash/zcash#5644.
2022-03-15 19:53:30 +00:00
Jack Grigg c2220f4eb9 Add support for sending Orchard funds in `z_sendmany`
Closes zcash/zcash#5665.
2022-03-15 19:53:30 +00:00
Kris Nuttycombe 7ba239e605 Explicitly specify the change address in the Sapling migration. 2022-03-15 10:57:19 -06:00