Commit Graph

16750 Commits

Author SHA1 Message Date
Daira Hopwood 71e48e10f3 zcashd-wallet-tool: adjust man page to correct copyright information.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 18:41:41 +00:00
Jack Grigg 639e97ed4a Merge branch 'master' into nu5-consensus 2022-03-24 18:09:17 +00:00
Daira Hopwood 6b836ce7e5 zcashd-wallet-tool: warn that wallet.dat needs to be backed up. fixes #5704
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:24:43 +00:00
Daira Hopwood e8fc2e60b4 zcashd-wallet-tool: add man page generation. fixes #5729
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:15:01 +00:00
therealyingtong bd6a34b0ea test_wallet: Test GetConflictedOrchardNotes. 2022-03-24 18:52:30 +08:00
Steven b12eb567cb
Merge pull request #5734 from superbaud/fix-segfault-5712
Prevent a pindex == NULL case in the ScanForWalletTransactions traversal
2022-03-23 16:30:03 -07:00
str4d 96001afc0d
Merge pull request #5731 from str4d/unify-nu5-consensus-changes
Unify NU5 consensus changes with 4.7.0-rc1
2022-03-23 22:39:16 +00:00
Jack Grigg ac7dd3acca qa: Remove pinned action indices from wallet_listreceived
Orchard output ordering is no longer deterministic, as we now shuffle
spends and outputs during bundle building. But we _can_ still check that
the action index of a note being spent is correct.
2022-03-23 20:56:22 +00:00
Jack Grigg 165901c654 qa: Remove hard-coded consensus branch IDs from RPC tests
Also fixes a bug in the `nuparams` helper, which would have caused MSB
zeroes in consensus branch IDs to not be rendered in the `-nuparams`
option. This hadn't been encountered because we haven't yet generated a
consensus branch ID with a zero MSB.
2022-03-23 20:28:31 +00:00
sasha cc05712e7f Prevent a pindex == NULL case in the ScanForWalletTransactions traversal 2022-03-23 12:15:45 -07:00
Jack Grigg e5210d50c9 Set NU5 protocol version for regtest to 170040, bump protocol version
We need to bump the `zcashd` protocol version because the new rules are
not compatible with existing rules followed by 170015 nodes, but we
_also_ need to ensure we can still bump it again once we set the testnet
reactivation height (changing node network behaviour again). This commit
also enables RPC tests to run (because previously the nodes considered
each other to be too old for NU5 to be active, and were disconnecting).
2022-03-23 18:37:56 +00:00
Jack Grigg d9c1b05a83 builder: Use correct `PrecomputedTransactionData` for transparent sigs
Before merging 4.7.0-rc1 into the nu5-consensus branch, we were in a
split state:

- 4.7.0-rc1 included Orchard support in the transaction builder, which
  required special handling of Orchard bundles when computing sighashes.
  The `PrecomputedTransactionData` structure could be shared, because
  its digests were only relevant to transparent signatures (as shielded
  signatures signed the txid directly even in shielding transactions).

- nu5-consensus included the changes to ZIP 244, which required passing
  around a `PrecomputedTransactionData` that contained the set of all
  transparent inputs being spent, because shielding transactions now also
  need to commit to transparent inputs.

In the merge commit, we incorrectly handled the resolution: we correctly
derived a fresh `PrecomputedTransactionData` when signing the Orchard
bundle, but we reused the `PrecomputedTransactionData` that was
previously derived before checking whether or not we even had an Orchard
bundle, for transparent inputs. This meant that its commitments didn't
commit to the Orchard bundle, and so transparent signatures on
transactions with Orchard bundles would fail to verify.

Incidentally, this is the exact inverse of a bug we encounted while
implementing the ZIP 244 changes on the nu5-consensus branch: we were
correctly computing the transparent sighash, but we were relying on the
initial `TxDigests` derived within `PrecomputedTransactionData` for the
Orchard sighash, even though we were actively rewriting the transaction
to include the Orchard bundle. The fix there was similarly to re-compute
the `TxDigests` before computing the sighash.
2022-03-23 18:27:12 +00:00
Larry Ruane 747745f7a2 Add regtest documentation to book 2022-03-23 08:27:42 -06:00
Jack Grigg 85b5595519 Fix logical merge conflicts after merging 4.7.0-rc1
The merge commit includes changes to address direct merge conflicts.
This commit makes the remaining changes necessary to integrate the
Orchard wallet changes with the NU5 consensus changes.
2022-03-23 03:19:39 +00:00
Jack Grigg 9e9f58b26f Merge branch 'master' into unify-nu5-consensus-changes 2022-03-23 02:57:16 +00:00
str4d bd1feab2db
Merge pull request #5730 from superbaud/missing-wallet-orchard-h
Add missing wallet/orchard.h to src/Makefile.am and gtest/test_transaction_builder.h to Makefile.gtest.include
2022-03-23 02:11:56 +00:00
Jack Grigg 77a971fbc1 Migrate to latest `zcash/librustzcash` revision
This includes:
- `orchard =0.1.0-beta.3` which includes the final circuit changes.
- The new NU5 consensus branch ID.
- Updated ZIP 244 test vectors (which use the NU5 consensus branch ID).
2022-03-23 02:05:06 +00:00
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