Commit Graph

16333 Commits

Author SHA1 Message Date
sasha 5cfaea5dd4 Add missing gtest/test_transaction_builder.h to Makefile.gtest.include
Like 562f5add87, the missing header ref
means that the make dist step of gitian builds don't include it in the
tarball, causing an error upon build.
2022-03-22 17:38:32 -07:00
sasha c85fae833e Add missing wallet/orchard.h to src/Makefile.am
Like 562f5add87, the missing header ref
means that the make dist step of gitian builds don't include it in the
tarball, causing an error upon build.
2022-03-22 17:03:16 -07:00
str4d d38da460eb
Merge pull request #5728 from zcash/release-v4.7.0-rc1
Release v4.7.0-rc1
2022-03-22 22:46:08 +00:00
Jack Grigg 1f3c145e4a make-release.py: Updated release notes and changelog for 4.7.0-rc1. 2022-03-22 21:14:02 +00:00
Jack Grigg 5ea2aaff0d make-release.py: Updated manpages for 4.7.0-rc1. 2022-03-22 21:14:02 +00:00
Jack Grigg 96edba2e41 make-release.py: Versioning changes for 4.7.0-rc1. 2022-03-22 21:04:37 +00:00
str4d 584e8e56a8
Merge pull request #5726 from str4d/update-deps-4.7.0-rc1
Update dependencies for 4.7.0-rc1
2022-03-22 21:02:54 +00:00
Dimitris Apostolou 234867d270
Fix typos 2022-03-22 23:01:25 +02:00
Jack Grigg e646905f1b cargo update 2022-03-22 19:34:29 +00:00
Jack Grigg 479b10364b qa: Exclude `native_libtinfo` from dependency update checks
We are pinning a specific version to get Arch builds working.
2022-03-22 19:33:14 +00:00
Charlie O'Keefe 7b7ac148ac
Merge pull request #5681 from LarryRuane/2022-02-listaddresses
Update the listaddresses RPC endpoint to correctly report unified addresses
2022-03-22 12:55:41 -06:00
Jack Grigg c21890af8d wallet: Fix expected `listaddresses` sources in `rpc_wallet_tests` 2022-03-22 17:18:30 +00:00
Charlie O'Keefe b62d4917be
Merge pull request #5715 from nuttycom/z_viewtransaction_cleanup
z_viewtransaction cleanup following #5700
2022-03-22 09:16:11 -06:00
Jack Grigg d4e47e4720 wallet: Fix Sapling address bug in `listaddresses`
`CWallet::FindUnifiedAddressByReceiver` is a wrapper around the visitor
`UnifiedAddressForReceiver`, which looks up the Unified Address (if any)
corresponding to the given receiver. However, this only returns external
UAs, and returns `std::nullopt` both if the receiver does not correspond
to a UFVK, and if it does but is derived from an internal FVK. By using
this method as a filter, `listaddresses` was not filtering out internal
Sapling receivers, and thus was leaking Sapling change addresses for
accounts (which we do not want revealed in the UI anywhere).

Instead, we now check for UFVK metadata directly, which verifies that
the Sapling receiver is derived from a UFVK without any extra filtering.
2022-03-22 14:55:40 +00:00
Jack Grigg 24089109b2 wallet: Fix bugs in `listaddresses`
- Legacy transparent addresses derived from the mnemonic seed are no
  longer duplicated in the `legacy_random` source.
- Legacy transparent change addresses derived from the mnemonic seed are
  now shown under that source.
- Sapling addresses that aren't part of a UA are now identified
  correctly when derived from the mnemonic seed, rather than being
  assumed to be derived from the legacy HD seed.
2022-03-22 14:55:40 +00:00
Jack Grigg e576f6616f Fix bugs in wallet_addresses RPC test
- The legacy_random source should only contain Sprout addresses (as
  zcashd now only derives transparent addresses from the mnemonic seed).
- Sapling addresses should appear in the mnemonic_seed source, not the
  legacy_seed source (as zcashd no longer ever generates keys there).

The RPC test also now has several additional checks:

- `listaddresses` does not return duplicate addresses (an address can
  only come from a single source).
- Address sets are now explicitly checked (to ensure that there are no
  unexpected addresses under the checked sources).
2022-03-22 14:55:39 +00:00
Larry Ruane e575e0f217 update listaddresses RPC for UAs, Orchard
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2022-03-22 14:55:17 +00:00
Kris Nuttycombe 17e078f068 Documentation fix for UnifiedAddressForReciever (+ spelling corrections.) 2022-03-21 20:20:19 -06:00
Kris Nuttycombe 151074cbb1 Fix legacy address handling in CWallet::GetPaymentAddressForRecipient
Fix handling of legacy transparent change addresses & legacy Sapling addresses.
2022-03-21 20:03:08 -06:00
sasha 3e6cfdffa5 Move LoadProofParameters to gtest/utils.cpp 2022-03-21 17:59:44 -07:00
Kris Nuttycombe a8bae004b1 Lock cs_main for accesses to chainActive in GetPaymentAddressForRecipient. 2022-03-21 16:46:15 -06:00
Kris Nuttycombe 758852b281 Return failure rather than asserting on WriteRecipientMapping failure.
Addresses https://github.com/zcash/zcash/pull/5700#discussion_r830538438
2022-03-21 16:46:15 -06:00
Kris Nuttycombe 9220ebb0de Make CWallet::DefaultReceiverTypes height-dependent.
Addresses https://github.com/zcash/zcash/pull/5700#discussion_r830538538
2022-03-21 16:46:15 -06:00
Charlie O'Keefe 11bd9463c1
Merge pull request #5698 from charlieok/swap_stretch_for_bullseye
Remove stretch (debian 9), add bullseye (debian 11) in gitian descriptor
2022-03-21 09:10:25 -06:00
Kris Nuttycombe 87cc0d22db Add RecipientType to GetPaymentAddressForRecipient result.
This now returns whether or not the address corresponds to an
internal recipient, an external address for the wallet, or a
counterparty's address (an address not derived from any of
the wallet's keys) from GetPaymentAddressForRecipient.

Fixes #5708
2022-03-20 16:36:38 -06:00
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 8c0e76e12b Remove stretch (debian 9), add bullseye (debian 11) in gitian descriptor 2022-03-19 15:56:55 -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