Commit Graph

16044 Commits

Author SHA1 Message Date
Kris Nuttycombe 46190bca23
Merge pull request #5751 from nuttycom/feature/fix_rpc_docs
Add undocumented attributes to getinfo API help text.
2022-03-25 22:01:15 -06:00
str4d 696a49b30d
Merge pull request #5745 from str4d/orchard-shielded-coinbase-tests
Test Orchard shielded coinbase rules
2022-03-25 23:04:39 +00:00
sasha d10c0553f3
Merge pull request #5750 from nuttycom/defensive/scanwallet_nullptr_check
Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions
2022-03-25 16:02:05 -07:00
Charlie O'Keefe 72d2f302f2
Merge pull request #5752 from nuttycom/test/orchard_spend_rollback
Add test for rollback of an Orchard spend.
2022-03-25 17:01:21 -06:00
Kris Nuttycombe ecc1e5da0c Add missing filter to ensure only fully-transparent transactions end up in mapOrphans. 2022-03-25 15:10:44 -06:00
Kris Nuttycombe 9f4e5ef2cc Add test for rollback of an Orchard spend. 2022-03-25 15:10:42 -06:00
Charlie O'Keefe 212f2bfb41
Merge pull request #5719 from nuttycom/cleanup/rpc_address_naming
Rename fields in RPC results: unifiedaddress->address and type->(pool or address_type)
2022-03-25 14:05:36 -06:00
Kris Nuttycombe dc4afca405 Correctly return p2pkh/p2sh labels for z_listunifiedreceivers 2022-03-25 10:44:18 -06:00
Kris Nuttycombe 8630891c5a Improve consistency of RPC parameter and result attribute naming.
Make consistent use of "pool", "address type" and "receiver type",
in RPC documentaion, and deprecate bare uses of "type" in RPC APIs.

Fixes #5534

Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-25 10:44:18 -06:00
Kris Nuttycombe 0b8a4e1985
Merge pull request #5714 from LarryRuane/2022-03-regtest-doc
Add regtest documentation to book
2022-03-25 09:59:11 -06:00
Kris Nuttycombe 1d73567f42 Add undocumented components to getinfo API. 2022-03-25 09:25:46 -06:00
Kris Nuttycombe 881e0f2ca8 Rename unifiedaddress->address in z_getaddressforaccount results
Fixes #5432
2022-03-25 08:29:56 -06:00
Kris Nuttycombe b9b5d47523 Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions 2022-03-25 08:23:51 -06:00
Marshall Gaucher 4a9bd59fef
Merge pull request #5743 from daira/no-banlist-on-reindex
Start with an empty banlist if -reindex is set
2022-03-25 06:37:11 -07:00
Jack Grigg def5a0be38 Test Orchard shielded coinbase rules
Also fixes a bug in `z_sendmany` transaction size estimation (we were
using the wrong size of a `CompactSize`).
2022-03-25 02:12:42 +00:00
Kris Nuttycombe 56f7bce865
Merge pull request #5742 from nuttycom/fix/sapling_ivk_load
Restore legacy default Sapling addresses to the keystore.
2022-03-24 20:00:04 -06:00
Daira Hopwood 50d4be17cf Start with an empty banlist if -reindex is set. fixes #5739
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-25 01:07:44 +00:00
Kris Nuttycombe dd578cb290 Restore legacy default Sapling addresses to the keystore.
Prior to zcash/zcash@90e59c3be0 Sapling
default payment addresses were added to the in-memory keystore whenever
a full viewing key was added, or loaded from disk. After that change,
the Sapling address was no longer being restored to the in-memory
keystore on wallet load; instead, z_getnewaddress and
z_getnewaddressforaccount both persist the address to the keystore
directly. This commit adds handling to `LoadCaches` to correctly persist
the default address to the wallet database, and add it to the in-memory
keystore, when this condition is detected.
2022-03-24 17:02:43 -06:00
Daira Hopwood d17c981013
Merge pull request #5738 from daira/wallet-backup-warning
zcashd-wallet-tool: warn that wallet.dat still needs to be backed up, and add man page
2022-03-24 20:29:25 +00:00
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
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
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
sasha cc05712e7f Prevent a pindex == NULL case in the ScanForWalletTransactions traversal 2022-03-23 12:15:45 -07:00
Larry Ruane 747745f7a2 Add regtest documentation to book 2022-03-23 08:27:42 -06: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
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
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
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