Commit Graph

1412 Commits

Author SHA1 Message Date
Kris Nuttycombe 5c1a99a288
Merge pull request #5917 from nuttycom/feature/wallet_orchard-checkpoint_depth
Select anchors at `-anchorconfirmations` depth.
2022-05-09 08:29:55 -06:00
Kris Nuttycombe c920077a46 Use default anchor confirmations for minconf in z_mergetoaddress.
z_mergetoaddress doesn't currently have any mechanism for specifying
the minconf value. We don't want to default back to a minconf of 1,
as before, because we'll be selecting anchors with at least 3
confirmations by default, so the simplest change here is to make
the minconf value default to the number of anchor confirmations, and
add a configurable minconf at some point in the future. It's likely
that `z_mergetoaddress` will end up being deprecated in any case,
so this works for now.

Also, ensure that anywhere that we're attempting to obtain the Orchard
anchor that we don't attempt to get an anchor from a height below NU5
activation.
2022-05-06 22:15:20 -06:00
Kris Nuttycombe 66fad22873 Fix missing handling for imported transparent multisig addresses. 2022-05-06 13:29:05 -06:00
Taylor Hornby b900c4827b Reproduce an assertion failure in the listaddresses RPC 2022-05-06 11:59:28 -06:00
Kris Nuttycombe fefea8fe29 Fix RPC tests that depend upon -anchorconfirmations=1 2022-05-04 18:00:34 -06:00
Kris Nuttycombe f285a39063
Merge pull request #5410 from LarryRuane/2021-12-06-test-python-standalone
Allow rpc python tests to be run standalone
2022-05-04 17:41:42 -06:00
Kris Nuttycombe 63e4addd9a Select Orchard anchors at `-orchardanchorconfirmations` depth.
This changes anchor selection and Orchard authentication path generation
to default to select anchors at a the depth specified by the
`-orchardanchorconfirmations` CLI argument, with a default anchor
selection depth of 10 blocks.

If the value of `minconf` used for a particular call to `z_sendmany` is
less than the the set number of Orchard anchor confirmations, `minconf`
will be used instead for the Orchard anchor confirmations depth,
so that the selected anchor will be certain to contain any notes
selected to be spent.

Fixes #5644
2022-05-04 14:16:43 -06:00
Kris Nuttycombe 717b253a01 Remove `-allowdeprecated=all`
We've decided to remove the option to allow all deprecated features,
because this has the effect that, if a user enables this flag, they
won't get the warning (and hence may forget to take action) at the time
that a feature is moved from the default-allowed set to the
default-denied set.

Co-authored-by: str4d <thestr4d@gmail.com>
2022-05-03 20:32:10 -06:00
Kris Nuttycombe 4ea9de5ff6 Remove zcrawreceive, zcrawjoinsplit, zcrawkeygen from default-allowed deprecated methods. 2022-04-28 15:21:13 -06:00
Kris Nuttycombe d6d3be9bf2 Allow deprecated wallet features to be preemptively disabled.
This adds an `-allowdeprecated` CLI parameter whose value is a flag
indicating a deprecated feature that should be explicitly enabled.
Multiple instances of this argument may be provided. In the case that
this parameter is not provided, all currently deprecated RPC methods
that are not slated for removal in the next release remain available.
A user may disable all deprecated features entirely by providing the
string "none" as the argument to this parameter, or enable all
deprecated features, including those slated for removal, by providing
the string "all" as the argument to this parameter. In the case that
"all" or "none" is specified, multiple invocations of `-allowdeprecated`
are not permitted.

To explicitly enable only a specific set of deprecated features, use
`-allowdeprecated=<flag1> -allowdeprecated=<flagN> ...` when starting
zcashd. The following flags are recognized:

- "all" - enables all deprecated features.
- "none" - disables all deprecated features.
- "legacy_privacy" - enables the use of the deprecated "legacy" privacy
  policy for z_sendmany. This causes the default behavior to conform to
  the `FullPrivacy` directive in all cases instead of just for
  transactions involving unified addresses.
- "getnewaddress" - enables the `getnewaddress` RPC method.
- "z_getnewaddress" - enables the `z_getnewaddress` RPC method.
- "zcrawreceive" - enables the `zcrawreceive` RPC method.
- "zcrawjoinsplit" - enables the `zcrawjoinsplit` RPC method.
- "zcrawkeygen" - enables the `zcrawkeygen` RPC method.
- "addrtype" - when this option is set, the deprecated `type` attribute
  is returned in addition to `pool` or `address_type` (which contain the
  same information) in the results of RPC methods that return address metadata.
2022-04-28 15:20:05 -06:00
Larry Ruane c5752c7ea2 Allow rpc python tests to be run standalone
That is, without having to launch with test_runner.py. There are
several places where the BITCOIND environment variable determines the
executable, but the default is "bitcoind"; change the default to
"src/zcashd". This does require running the test from the top-level
directory.

Also change the environment variable from BITCOIND to ZCASHD. This could
conceivable break someone, but it just makes too much sense not to do.
2022-04-26 15:06:31 -06:00
Kris Nuttycombe 57d9d9ee05 Update boost dependencies to version 1.79.0 2022-04-14 13:31:14 -06:00
Kris Nuttycombe f8f698086b qa: postpone native_clang, libcxx, boost, and native_b2 upgrades before 4.7.0 release 2022-04-13 20:49:32 -06:00
sasha cf4de9d03d
Merge pull request #5741 from zcash/nu5-consensus
NU5 consensus changes; merge requested by @nuttycom
2022-04-13 18:09:21 -07:00
Kris Nuttycombe 9ca0a41cf7 Update protocol version to 170050 for v4.7.0 release. 2022-04-13 08:22:56 -06:00
sasha d153f27f52 fix smoke_tests.py accounting math to remove the warning before test 4r
the warning before test 4r is generated by the check_z_mergetoaddress
at line 459, which moves all the sapling funds into taddr_2 and thus
expects (sapling_balance - DEFAULT_FEE) to show up into taddr_2.

However, the check_z_mergetoaddress_parallel at line 418 had already
funded taddr_2 (with the sum of taddr_1 and taddr_3), and so we need to
add that to the amount of money that check_z_mergetoaddress at line 459
expects to find.
2022-04-12 23:21:38 -07:00
sasha ce6e8fd5f4 add walletrequirebackup=false to the zcash argument list in smoke_tests.py 2022-04-11 13:16:41 -07:00
Jack Grigg b01fe74161 qa: Update Berkeley DB release listener regex
Oracle have altered their downloads page to not list the actual download
filename, so we now extract the version from the changelog URL.
2022-04-09 14:43:32 +00:00
Kris Nuttycombe 866b3c7900 Merge remote-tracking branch 'upstream/master' into nu5-consensus_merge-master 2022-04-08 21:08:39 -06:00
Kris Nuttycombe 0f9868ef14
Merge pull request #5852 from nuttycom/bug/consistent_finalstate_encoding
Make Orchard finalState serialization format match Sapling.
2022-04-08 21:07:37 -06:00
Kris Nuttycombe f86a65d7cb Make Orchard `finalState` serialization format match Sapling.
For consistency, we serialize the `finalState` field in the
same (sparse) encoding as Sapling and Sprout use. In the future
we may want to update this to the dense encoding that
incrementalmerkletree::bridgetree::Frontier uses, but that's not
necessary for the moment.
2022-04-08 19:48:40 -06:00
Kris Nuttycombe b38189adcd
Merge pull request #5791 from therealyingtong/z_listaccounts
Add z_listaccounts API.
2022-04-08 15:30:57 -06:00
Kris Nuttycombe f98b2393a1 Fix error in z_listaccounts help text. 2022-04-08 13:06:41 -06:00
Jack Grigg c4006a7f24 qa: Postpone update to Rust 1.60
Rust 1.60 migrates to LLVM 14, and we want to keep our Clang and Rust
compilers on matching LLVM versions.
2022-04-07 15:01:26 +00:00
Kris Nuttycombe 369fc78e0b Use DEFAULT_FEE consistently in wallet_unified_change test
This fixes a nondeterministic error where zero-fee transactions
may be excluded due to minimum-block-size rules.
2022-04-07 08:57:48 -06:00
Kris Nuttycombe dada8b38bc Add 'AllowRevealedAmounts' in tests where it is now necessary. 2022-04-07 08:47:47 -06:00
Kris Nuttycombe 51defe9f96 Make all privacy policy checks after note selection.
This adds tests to wallet_z_sendmany that demonstrates conditions
where pool-crossing transfers were not being caught by the privacy
policy checks, which were validating only against the transfer
request rather than the actual transfer selected. This missed
cases where sending funds between unified addresses would reveal
amounts via the turnstile.

Making all privacy policy checks after note selection guards against
this error.
2022-04-07 08:47:47 -06:00
therealyingtong dcc2a68682 Inline z_listaccounts check in wallet_accounts.py 2022-04-07 18:06:41 +08:00
Kris Nuttycombe a48aa0195c Add logging to the miner to provide more detail on tx selection. 2022-04-05 20:47:37 -06:00
Kris Nuttycombe 1d2f1d6689 Add a test demonstrating that change may cross the pool boundary without permission. 2022-04-05 18:16:57 -06:00
Kris Nuttycombe 5b7370c55e Update test to verify rewind behavior. 2022-04-04 13:05:42 -06:00
Kris Nuttycombe d9de6b64fc Adds a test demonstrating an Orchard wallet initialization bug.
If a new Orchard wallet is created after the first Orchard spend
post NU5 activation, it causes an assertion failure because the root
of the wallet's empty note commitment tree does not match the global
note commitment tree root.
2022-04-04 12:04:32 -06:00
Steven c8e0503c69
Merge pull request #5797 from nuttycom/feature/z_listunspent_account
Add account ID to z_listunspent results.
2022-04-04 07:17:53 -07:00
Kris Nuttycombe 0a0ac9989e Add a test demonstrating that z_listaddresses reveals internal addrs. 2022-04-01 12:46:55 -06:00
Kris Nuttycombe 0a5dbc10d4 Add account ID to z_listunspent results.
Fixes #5795
2022-04-01 10:02:13 -06:00
Kris Nuttycombe f7b11f6da1
Merge pull request #5775 from nuttycom/feature/orchard_list_unspent
Add Orchard support to z_listunspent.
2022-04-01 07:39:25 -06:00
Jack Grigg e5756cc198 qa: Add test for Orchard support in `z_listunspent` 2022-04-01 02:44:56 +00:00
Kris Nuttycombe 866278f79a Merge remote-tracking branch 'upstream/master' into nu5-consensus_merge-master 2022-03-31 20:29:28 -06:00
str4d fbd2912885 Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
2022-03-31 16:07:05 +00:00
Jack Grigg 0255964559 qa: Add RPC test testing Orchard note position persistence
The test fails during the final `z_sendmany`, because it is selecting a
note that was detected before restarting the node. Because we force the
wallet to call `SetBestChain` on every block, the wallet doesn't need to
rescan on restart, and thus doesn't repopulate the `position` field of
the in-memory note.

This issue went unnoticed in existing tests that exercise node restarts,
because the RPC tests are fast enough that they never pass the 10-minute
timeout for writing the wallet state. This commit adds a regtest-only
config option that disables the lazy writing.
2022-03-30 23:23:27 +00:00
Kris Nuttycombe 53cc7ecceb Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-30 10:10:28 -06:00
Kris Nuttycombe 72b27fb906 Add independent wallet persistence tests.
Co-authored by: @therealyingtong
2022-03-30 08:27:41 -06:00
sasha 9befdb2c45
Merge pull request #5767 from daira/postpone-deps
Postpone native_clang and libcxx 14.0.0; admin merge as requested by @nuttycom
2022-03-29 11:12:02 -07:00
Kris Nuttycombe 72e7d2b83f
Merge pull request #5765 from nuttycom/doc/rpc_release_notes
Update release notes to include all RPC changes since 4.6.0
2022-03-29 11:25:55 -06:00
Daira Hopwood 5abe1b82b4 Postpone native_clang and libcxx 14.0.0.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-29 17:02:47 +01:00
Daira Hopwood c28b004256 qa/zcash/updatecheck.py: print status code and response of failed http requests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-29 17:02:32 +01:00
Kris Nuttycombe db315fd693 Update release notes to include all RPC changes since 4.6.0
This also corrects some minor errors in the help text for
a few of the RPC methods.
2022-03-29 09:41:03 -06:00
Marshall Gaucher 0ba5ccaa79
Merge pull request #5746 from defuse/do-not-print-exceptions
Only send exceptions to the log, not stderr
2022-03-29 07:10:10 -07:00
Kris Nuttycombe a574f6042b
Merge pull request #5759 from nuttycom/fix/restore_imported_addrs
Ensure that legacy imported addresses are properly restored to the wallet.
2022-03-29 07:33:36 -06:00
Kris Nuttycombe e8f23e3629 Add a test verifying the default addr is added when importing a Sapling key. 2022-03-28 19:47:19 -06:00