Commit Graph

16010 Commits

Author SHA1 Message Date
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
Jack Grigg d49c8a2865 Add Orchard to change address generation 2022-03-15 16:41:09 +00:00
Jack Grigg d4eee99060 Add Orchard cases to note selection logic 2022-03-15 16:41:09 +00:00
Jack Grigg f2ae807891 Implement opportunistic shielding in `SpendableInputs::LimitToAmount`
We now use the total funds in each available pool to figure out whether
a particular desired selection order can provide the requested amount,
and can alter the selection order each time we add another pool.
2022-03-15 16:41:09 +00:00
Jack Grigg 920de99c85 Select spendable inputs based on recipient and change pool types
This information enables us to select notes and coins in a way that
minimizes information leakage while moving funds into the shielded pool
where possible.
2022-03-15 16:41:09 +00:00
Jack Grigg 959b068468 Fix bug in `SpendableInputs::LimitToAmount`
This method selects inputs by iterating through available notes and
coins until sufficient value is found, and then dropping the remaining
notes and coins. However, the processing of each pool type was gated on
having not selected sufficient funds. This meant that if an earlier pool
had sufficient funds to fill a transaction, later pools would not be
processed at all and their notes would be left as selectable.
2022-03-15 16:41:09 +00:00
Jack Grigg 63437e4c18 Add unit tests for `SpendableInputs::LimitToAmount` 2022-03-15 16:41:09 +00:00
Jack Grigg f56a04ded2 Refactor `CWallet::GenerateChangeAddressForAccount`
There are no functional changes in this commit, but the refactor
separates the legacy account handling, and makes it easier to integrate
new pool types.

We also rename `libzcash::ChangeType` to `OutputPool`, in anticipation
of using it to track transaction recipient pools.
2022-03-15 16:41:09 +00:00
Kris Nuttycombe c3c5236cee
Merge pull request #5656 from nuttycom/feature/wallet_orchard-note_commitment_tree_ser
Add Orchard note commitment tree serialization & restore.
2022-03-14 23:16:44 -06:00
sasha 3a957618b6
Merge pull request #5662 from nuttycom/legacy_seed_to_mnemonic
Derive the mnemonic seed from the legacy HD seed, if one is available.
2022-03-14 20:32:09 -07:00
sasha 7071b41c55
Merge pull request #5578 from superbaud/powlimit-document
comment explaining the 0x0f0f[..]0f0f powLimit constant for regtest
2022-03-14 18:47:04 -07:00
Kris Nuttycombe 5a98080677 Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-14 19:13:25 -06:00
sasha f37d186e7e
Merge pull request #5600 from superbaud/use-debian-libtinfo
remove superfluous space at end of native_packages that i introduced in #5576
2022-03-14 17:06:53 -07:00
ying tong 4d7892bdde
Merge pull request #5649 from therealyingtong/conflicted-orchard-spends
Report conflicted Orchard spends
2022-03-15 07:46:02 +08:00
Kris Nuttycombe e335ff2325 Fix indentation. 2022-03-14 17:40:10 -06:00
Kris Nuttycombe d420e2efab Derive the new mnemonic seed from the legacy HD seed, if one is available.
Fixes #5572

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-14 17:40:04 -06:00
Daira Hopwood 4611493c9d
Merge pull request #5663 from nuttycom/check_master_key_validity
Return std::optional<CExtKey> from CExtKey::Master
2022-03-14 17:10:24 +00:00
Daira Hopwood 340840894a Tweaks to message text.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-14 08:24:25 +00:00
Daira Hopwood 6ee6692c83 qa/zcash/full_test_suite.py: enable `test_rpath_runpath` for Rust binaries, and
reenable `test_fortify_source` for C++ binaries.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-14 08:05:59 +00:00
Daira Hopwood 1d31d4bc7c Include $(bin_SCRIPTS) in `check-symbols`, `check-security`, and `clean` targets.
Checking for stack canaries in `check-security` is disabled for Rust executables
(Rust does support `-Z stack-protector=all` but only for the nightly compiler).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-13 22:53:29 +00:00
Daira Hopwood 55d14faebf Correct the fallback instruction for how to clear the terminal on macOS: pressing Command + K
also clears scrollback.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-13 18:25:40 +00:00
Kris Nuttycombe 19bce27321
Merge pull request #5641 from nuttycom/feature/wallet_orchard-restore_orchard_spends
Restore Orchard spentness cache in LoadCaches
2022-03-12 14:21:38 -07:00
Kris Nuttycombe c9938d0348
Update orchard_wallet_add_notes_from_bundle documentation. 2022-03-12 11:46:48 -07:00
Daira Hopwood ccada66324 Simplify debug tracing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-12 12:56:32 +00:00
Kris Nuttycombe 4eda33f184 Serialize the Orchard note commitment tree to the wallet.
This adds serialization of Orchard note commitment trees
to `SetBestChain` and deserialization and loading of those
trees to wallet load.
2022-03-11 22:47:37 -07:00
Kris Nuttycombe 30dd633de6 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-11 22:39:06 -07:00
Kris Nuttycombe 5d17e53c5c Address suggestions from code review on #5637 2022-03-11 22:39:06 -07:00
Kris Nuttycombe f5b23b3336 Modify `join_network` in tests to skip mempool resync.
Prior to this change, calling `join_network` after a network split
only worked in the case that no new non-coinbase transactions were
created during the network partition; in the case that such a
transaction was created, `join_network` would fail when waiting
for mempool synchronization, because zcashd nodes do not.
automatically broadcast their mempool contents on restart.

This change modifies `setup_network` to wait for mempool synchronization
or not on the basis of a newly added do_mempool_sync flag. In the
case of `join_network`, this flag is set to `False`; the default value
is set to `True` to preserve previous functionality elsewhere.

Tests should explicitly use the `resendwallettransactions` RPC method
to ensure that mempool transactions are rebroadcast before attempting
to synchronize the network after a `join_network` call.
2022-03-11 22:39:06 -07:00
Kris Nuttycombe 1e1521f101 Ensure that Orchard spentness information is repopulated by LoadUnifiedCaches. 2022-03-11 22:39:06 -07:00
str4d 0f59c5b926
Merge pull request #5658 from str4d/5570-tx-builder-orchard-spends
Add Orchard sender support to the transaction builder
2022-03-12 04:33:06 +00:00
therealyingtong 3c0e1d9aa8 CWallet::GetConflictS: Handle conflicting Orchard spends.
Co-authored by: Kris Nuttycombe <kris@nutty.land>
2022-03-11 19:30:52 -07:00
Kris Nuttycombe 0c38ad9200 Return std::optional<CExtKey> from CExtKey::Master
Master key generation is fallible, but the type of master
key generation did not previously reflect that the generated
key might be invalid.
2022-03-11 18:47:01 -07:00
Jack Grigg 93797d185b Improve FFI interface documentation
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-12 01:33:39 +00:00
Daira Hopwood 577f695af5 Set `meta` for `-datadir` option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-11 19:02:31 +00:00
Daira Hopwood 3e36252d9a Document that '~' cannot be used in `-datadir` (see #5661).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-11 18:35:52 +00:00