Commit Graph

15969 Commits

Author SHA1 Message Date
Sean Bowe f7824e8cec
wallet: restore Orchard secret keys from mnemonic seed 2022-03-02 08:11:47 -07:00
Sean Bowe 49ce03ed79
wallet: consolidate unified key/address/account map reconstruction 2022-03-02 08:11:47 -07:00
Kris Nuttycombe 5141c2971c
Merge pull request #5594 from LarryRuane/2022-02-getblocktemplate-locking
Fix csBestBlock/cvBlockChange waiting in rpc/mining
2022-03-01 20:08:29 -07:00
Kris Nuttycombe 68d6c3ddc3
Merge pull request #5615 from nuttycom/feature/wallet_orchard-merge_master
Merge master back to feature/wallet_orchard
2022-03-01 19:57:39 -07:00
Kris Nuttycombe 1389eea5c2
Merge pull request #5614 from nuttycom/feature/wallet_orchard-fix_orchard_minconf
Filter returned Orchard notes by minimum confirmations.
2022-03-01 19:57:05 -07:00
Larry Ruane e170c3abd6 document global variables 2022-03-01 17:43:43 -07:00
Pieter Wuille c079a518c0 Modernize best block mutex/cv/hash variable naming
(cherry picked from commit bitcoin/bitcoin@4a6c0e3dcf)
2022-03-01 17:09:19 -07:00
Pieter Wuille 4693f8165f Fix csBestBlock/cvBlockChange waiting in rpc/mining
(cherry picked from commit bitcoin/bitcoin@45dd135039)
2022-03-01 17:09:19 -07:00
Kris Nuttycombe 783e269a7b Merge remote-tracking branch 'upstream/master' into feature/wallet_orchard-merge_master 2022-03-01 16:54:05 -07: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
sasha 0f06774e94 gtests ordering: CheckBlock.VersionTooLow calls SelectParams(MAIN) 2022-02-28 17:59:50 -08:00
sasha 3a7b4eca87 gtests ordering: ContextualCheckBlockTest's TearDown deactivates Blossom 2022-02-28 17:58:00 -08:00
sasha 489c025f81 gtests ordering: change wallet filename in WriteZkeyDirectToDb 2022-02-28 17:57:10 -08:00
Jack Grigg b5ce94d16c rust: Fix clippy lint 2022-03-01 01:35:46 +00:00
Jack Grigg 7b7dddba0c cargo update 2022-03-01 00:34:02 +00:00
Jack Grigg 2f1fbcc81f depends: Update Clang / libcxx to LLVM 13.0.1 2022-03-01 00:30:32 +00: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
Kris Nuttycombe 18f443db1c
Merge pull request #5604 from nuttycom/fix_missing_wallet_lock
GenerateNewKey must be guarded by a cs_wallet lock
2022-02-27 09:20:44 -07:00
Kris Nuttycombe 399ffa7f5c GenerateNewKey must be guarded by a cs_wallet lock 2022-02-26 20:13:38 -07:00
sasha 077f5550d4 remove superfluous space at end of native_packages line 2022-02-25 14:43:13 -08:00
Kris Nuttycombe f9380572c1
Merge pull request #5597 from nuttycom/feature/wallet_orchard-find_spendable_inputs
Select Orchard notes in FindSpendableInputs
2022-02-25 08:36:19 -07:00
Kris Nuttycombe 044d2de463
Merge pull request #5596 from str4d/feature/wallet_orchard-orchard_sendmany
z_sendmany: Send to Orchard receivers of UA recipients
2022-02-25 08:27:02 -07:00
Kris Nuttycombe 41ed311afa
Merge pull request #5595 from str4d/feature/wallet_orchard-ua_updates
Merge current master into Orchard wallet feature branch
2022-02-24 21:42:13 -07:00
Kris Nuttycombe d9cddac773 Select Orchard notes in FindSpendableInputs 2022-02-24 18:16:53 -07:00
Jack Grigg 701a7875a7 Regenerate `TxDigests` after rebuilding tx with Orchard bundle
In zcash/zcash/pull/5544 we added an FFI method specific to the Orchard
part of the transaction builder, to enable passing the Orchard bundle on
the Rust side directly instead of using a partial serialization. We
passed the remainder of the transaction to the Rust side by serializing,
as we similarly do in `SignatureHash`. We then decomposed the parsed
transaction on the Rust side to insert the Orchard bundle. However, we
then used the `TxDigests` that was derived from the parsed transaction,
not the reconstructed one, which meant we produced an invalid sighash
when building Orchard-containing transactions.
2022-02-25 00:52:52 +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 85a8784b38 Fix semantic merge conflicts
- We added `OrchardRawAddress` to the `Receiver` variant, which prevents
  it from having a default constructor.
- We added `ReceiverType::Orchard`, which Clang warns is unused when we
  use `ReceiverType` in a `switch` statement.
2022-02-25 00:48:17 +00:00
Jack Grigg bb4e792c84 Merge branch 'master' into feature/wallet_orchard-orchard_sendmany 2022-02-25 00:33:28 +00:00
Taylor Hornby 7d9dda4b7e
Merge pull request #5576 from superbaud/use-debian-libtinfo
fix breakage on Arch by using Debian libtinfo5_6.0 to satisfy clang
2022-02-24 16:33:13 -07:00
str4d 48bf0241e6
Merge pull request #5586 from str4d/feature/wallet_orchard-orchard_receivers
Add Orchard to default UA receiver types
2022-02-24 15:52:31 +00:00
Steven 82c33596b9
Merge pull request #5580 from steven-ecc/update-transaction-size-estimation
Update transaction size estimation to include V5 transactions
2022-02-23 20:16:58 -08: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
Jack Grigg 235fde5193 Add mappings from Orchard receivers to IVKs to the wallet
We add the Orchard change address mapping on account creation, as we
only ever generate a single change address internally. External Orchard
receivers are added to the map when `z_getaddressforaccount` is called.

This commit also fixes two bugs in the handling of Orchard internal IVKs.
When adding a full viewing key to the Orchard (Rust) wallet, we need to
derive both the internal and external IVKs (and map them to the external
FVK so we effectively never expose the internal FVK). We were only
deriving the external IVK, meaning that trying to add the Orchard change
address to the wallet should have failed. However, in a separate bug the
C++ internal IVK derivation method was calling the Rust external IVK
derivation function, meaning that we were effectively using the external
Orchard address at index 0 _as_ the change Orchard address.
2022-02-24 02:17:19 +00:00
Steven Smith a0740650c3 Update transaction size estimation to include V5 transactions 2022-02-23 16:49:01 -08:00
Kris Nuttycombe 49065bee59
Merge pull request #5569 from str4d/feature/wallet_orchard-ua_integration
Integrate Orchard into Unified Address types
2022-02-23 11:20:49 -07:00
John Newbery 4942020624 Log calls to getblocktemplate
(cherry picked from commit bitcoin/bitcoin@1352092dbd)
2022-02-22 22:14:36 -07:00
Jack Grigg 3179e45467 Trial-decrypt candidate Sapling receivers with all wallet UFVKs
This ensures we have the same semantics for detecting Orchard and
Sapling receivers in UAs, even if the UA they are part of was derived
outside of the zcashd wallet.
2022-02-23 02:23:45 +00:00
Jack Grigg d099e469e1 Rename to `ZcashdUnifiedSpendingKey::GetSaplingKey` for consistency 2022-02-22 21:08:10 +00:00
Jack Grigg c2a47b8d97 Return UFVK from `CWallet::GenerateNewUnifiedSpendingKey`
The only place we were using the returned Unified Spending Key was in a
test, where we immediately converted it to a UFVK.

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2022-02-22 21:08:10 +00:00
Kris Nuttycombe 3c84ed604e Remove OrchardSpendingKey serialization code
Orchard spending keys now live exclusively on the Rust side, and will be
serialized there as part of the Orchard wallet serialization.
2022-02-22 21:08:10 +00:00
Kris Nuttycombe 225c78f3ab Add Orchard components to unified spending keys
Co-authored-by: Jack Grigg <jack@z.cash>
2022-02-22 21:08:10 +00:00
Kris Nuttycombe 258f0fc72f Add Orchard components to unified full viewing keys
Co-authored-by: Jack Grigg <jack@z.cash>
2022-02-22 21:08:10 +00:00
sasha eab7efcae5 explain the 0x0f0f[..]0f0f powLimit constant for regtest 2022-02-22 11:21:37 -08:00
Kris Nuttycombe bb91c9fbc3
Merge pull request #5549 from therealyingtong/cache-ua
Cache UA recipients passed to `z_sendmany`
2022-02-22 09:05:13 -07:00
sasha 2d6dcd4750 on Arch only, use Debian's libtinfo5_6.0 to satisfy clang 2022-02-21 20:28:03 -08:00
therealyingtong 1dae16a41c WriteRecipientMapping: Check that receiver exists in UA.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-22 11:53:23 +08:00
ying tong 2943e13c8b
Apply docfixes from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-22 08:44:09 +08:00