Commit Graph

1333 Commits

Author SHA1 Message Date
str4d 12b37d5a11
Merge pull request #5665 from str4d/5657-z_sendmany-orchard-spends
Add support for sending Orchard funds in `z_sendmany`
2022-03-16 18:12:56 +00: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
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 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 8bf99eaacc Merge remote-tracking branch 'upstream/master' into feature/wallet_orchard-merge_master 2022-03-09 22:17:49 -07:00
Kris Nuttycombe ca34a97a37 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-09 13:26:10 -07:00
Kris Nuttycombe 98ee3bd733 Update tests with rollback checks. 2022-03-09 09:26:37 -07:00
sasha ced825edec
Merge pull request #5587 from nuttycom/feature/wallet_orchard-record_spends 2022-03-08 18:38:47 -08:00
str4d 7129827509
Merge pull request #5601 from str4d/feature/wallet_orchard-shielded_coinbase
Select Orchard receivers from UA miner addresses once NU5 activates
2022-03-08 15:32:32 +00:00
Kris Nuttycombe c3cf141936 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-07 19:11:43 -07:00
Kris Nuttycombe 6171f27b02 Add a test for Orchard note detection.
We can't actually test rollback via RPC tests until
wallet persistence is implemented. This implements
a rollback scenario that will should pass after wallet
persistence is implemented.
2022-03-07 19:05:00 -07:00
str4d 13351ff31d
Merge pull request #5609 from str4d/bump-deps-4.7.0-rc1
Bump dependencies ahead of 4.7.0-rc1
2022-03-05 13:37:28 +00:00
Kris Nuttycombe cf4d0f3d2d Add test for Orchard contribution to z_gettotalbalance 2022-03-03 17:41:30 -07:00
Jack Grigg 3fa58149b0 Select Orchard receivers from UA miner addresses once NU5 activates
Closes zcash/zcash#5023.
2022-03-03 15:57:40 +00:00
Jack Grigg 9a60cdeed9 Add RPC test for the Orchard commitment tree bug on first NU5 testnet 2022-03-03 13:36:42 +00:00
therealyingtong cedf2b5ecb wallet_sendmany_any_taddr.py: Expect expired tx to be ignored. 2022-03-03 01:31:32 +08:00
therealyingtong 98cd4bab0b wallet_sendmany_any_taddr.py: Test sending output from expired tx. 2022-03-03 01:31:32 +08:00
Kris Nuttycombe bd50fbbb94 Filter returned Orchard notes by minimum confirmations. 2022-03-01 16:30:29 -07:00
therealyingtong 4a8bdabb2f wallet_sendmany_any_taddr.py: Test sending from a change taddr. 2022-03-01 11:33:54 +08:00
Jack Grigg 21430b13ac depends: Update Rust to 1.59.0 2022-03-01 00:09:18 +00:00
Jack Grigg adb7d074d5 qa: Postpone recent CCache release 2022-03-01 00:05:01 +00:00
Jack Grigg 4c49af7750 qa: Bump all postponed dependencies
We have a pending PR to address the `native_ccache` and `googletest`
dependencies, and we aren't going to touch `bdb`.
2022-03-01 00:03:42 +00:00
Jack Grigg d4078c8d25 Select Orchard receivers preferentially from UAs
The addition of `OrchardRawAddress` to `RecipientAddress` drives most of
the changes in this commit, which enable `z_sendmany` to send funds to
addresses in the Orchard pool once NU5 activates.
2022-02-25 00:52:52 +00:00
Jack Grigg bb4e792c84 Merge branch 'master' into feature/wallet_orchard-orchard_sendmany 2022-02-25 00:33:28 +00:00
Jack Grigg b0769e3f1d Add Orchard to default UA receiver types
We also add Orchard-specific information to several RPCs in order for
tests to pass:

- `z_listunifiedreceivers`
- `z_getbalanceforaccount`
- `z_getbalanceforviewingkey`
2022-02-24 02:17:52 +00:00
Larry Ruane ba9e020fcd add functional test 2022-02-17 16:47:59 -07:00
Larry Ruane 698f7ba770 z_listreceivedbyaddress: reject UA component addr (#5537) 2022-02-15 09:19:09 -07:00
sasha e568a190f3
Merge pull request #5419 from zcash/feature/wallet_unified_addresses 2022-02-14 08:17:36 -08:00
Kris Nuttycombe b1ab30c8d9 Rename sapling-specific zip32 FFI methods.
Also addresses a couple of other minor comments from code review.
2022-02-12 15:24:48 -07:00
Larry Ruane 326dafeebe fix wallet_listreceived.py, add blockdata to taddr output 2022-02-12 13:01:58 -07:00
Kris Nuttycombe 007f05493a Add change field to z_listreceivedbyaddress for transparent addrs.
This updates the `IsChange` method to check the HD keypath associated
with the key for whether the address was generated as internal
or external.
2022-02-11 12:48:35 +00:00
Larry Ruane c48e35bb66 Update z_listreceivedbyaddress to support unified addresses (5467) 2022-02-11 12:48:23 +00:00
Jack Grigg 89b9bbaf33 wallet: Separate counters for external and internal transparent keys
This fixes a potential bug with importing the mnemonic into a third
party transparent wallet. Previously, if a user called `getnewaddress`,
made a bunch of transactions that generated at least 20 change
addresses, and then called `getnewaddress` again, the two external
addresses would be separated by a gap of more than 20. If this mnemonic
were imported into a third party transparent wallet, the wallet would
not detect any funds in the second (or subsequent) transparent addresses
because it would detect 20 unused addresses in a row (via the BIP 44
default gap limit).

Now, we track external and internal keys separately; repeated calls to
`getnewaddress` will return addresses for sequential keys. This has the
added benefit that the sequence of `getnewaddress` outputs will be the
same after restoring from a backup.
2022-02-10 21:26:29 +00:00
Jack Grigg 11e62fa997 wallet: Remove `CWallet::GetKeyFromPool`
Legacy transparent addresses for external use are now obtained directly
via `GenerateNewKey(true)`.
2022-02-10 21:26:29 +00:00
Kris Nuttycombe 2aad87e147
Merge pull request #5526 from str4d/wallet-unified-addrs-in-rpcs
Handle wallet Unified Addresses in RPCs
2022-02-09 21:11:41 -07:00
Jack Grigg 88dde127f4 wallet: Show UAs instead of Sapling receivers in `z_listunspent`
We also add a `type` field to the output objects (matching the field in
`z_viewtransaction`), now that the output type can't be distinguished
solely from the address encoding.
2022-02-10 02:32:56 +00:00
Kris Nuttycombe bf79be2b57 Replace z_getbalanceforaddress with z_getbalanceforviewingkey 2022-02-09 16:58:55 -07:00
str4d 9439c79bab
Merge pull request #5469 from nuttycom/feature/wallet_unified_addresses-z_sendmany
Add support for unified addresses to z_sendmany
2022-02-08 23:42:59 +00:00
Kris Nuttycombe 3f84067658 Fix nondeterministic test failure in wallet_listreceivedby.py 2022-02-08 14:18:18 -07:00
Kris Nuttycombe 1890758b27 Apply suggestions from code review.
Co-authored-by: str4d <thestr4d@gmail.com>
2022-02-08 10:59:15 -07:00
Kris Nuttycombe cf271473eb Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2022-02-07 16:52:31 -07:00
Kris Nuttycombe 13ee447a42 Merge branch 'test_wallet_listreceived' into feature/wallet_unified_addresses-z_sendmany 2022-02-07 15:08:35 -07:00
Kris Nuttycombe fa0d4eb473 Use z_shieldcoinbase for Sprout funds in wallet_listreceived tests.
After release 4.7.0, z_sendmany will no longer support sending
funds to Sprout. By using z_shieldcoinbase, we can avoid this
limitation.
2022-02-07 15:06:19 -07:00
Larry Ruane 1e165b8396 allow UA as z_shieldcoinbase destination 2022-02-03 08:31:26 -07:00
zancas ca04cb0a58
All implementations of ComparisonTestFramework were overriding num_nodes
Moreover, they were all overriding it to the same value (1).
Set the default to 1 and remove redundant subclass constructor code.
2022-02-01 10:27:16 -07:00
zancas 4dce020678
enforce usage of the get_tests comptool interface as ComparisonTestFramework method
In practice all-and-only subclasses of ComparisonTestFramework implement get_tests.
This commit enforces this relation.
2022-02-01 10:27:10 -07:00
Kris Nuttycombe 214567be2c Add a few additional cases to z_sendmany RPC tests. 2022-02-01 08:24:31 -07:00
Kris Nuttycombe a0c27bf254 Address TODOs in rpc-tests/wallet-accounts.py 2022-02-01 08:24:31 -07:00
Kris Nuttycombe 9afea4f10b Add failing tests for z_sendmany ANY_TADDR -> UA and UA -> <legacy_taddr> 2022-01-30 11:07:00 -07:00