Commit Graph

15676 Commits

Author SHA1 Message Date
Kris Nuttycombe ad5c4dcf09 Remove unused ufvkid argument from AddTransparentSecretKey
All of the necessary relationships between transparent receivers
and UFVKs are set up by `AddUnifiedAddress`, so there's no
need to do so as part of transparent key management otherwise.
2021-12-22 16:09:17 -07:00
Kris Nuttycombe 900cd50741 Rename `ZcashdUnifiedSpendingKeyMetadata` -> `ZcashdUnifiedAccount`
Also, fix a couple of minor documentation issues and
make UA generation tests a little more robust.
2021-12-22 16:09:17 -07:00
Kris Nuttycombe 24e46a16f1 Only derive ZcashdUnifiedFullViewingKey from UnifiedFullViewingKey
This changes ZcashdUnifiedSpendingKey::ToUnifiedFullViewingKey
to return a `UnifiedFullViewingKey` object. This makes the
derivation of ZcashdUnifiedFullViewingKey values more regular,
removing the need to be able to construct these values directly
from the spending key.

This change also modifies ZcashdUnifiedSpendingKey to remove
the `std::optional` wrapper from its member keys. This
optionality is spurious, because it is always possible to
derive a "complete" spending key, and we do not support
import of unified spending keys.
2021-12-22 16:09:17 -07:00
Kris Nuttycombe 735ecd0906 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-22 15:57:47 -07:00
Kris Nuttycombe 9b72fff365 Fix handling of unified full viewing key metadata.
This fixes two issues with the management of unified full viewing
key metadata:
* Adds a reverse mapping from ufvkid to account id.
* Ensures that UFVK metadata is correctly initialized when USK
  metadata is loaded from disk.
2021-12-22 15:57:47 -07:00
Kris Nuttycombe b34fd6a816 Add test for CKeyStore::AddUnifiedAddress 2021-12-22 15:57:47 -07:00
Kris Nuttycombe 009ba76b0e Add test for wallet UA generation & detection. 2021-12-22 15:57:47 -07:00
Kris Nuttycombe 700b98f0b0 Add tests for keystore storage and retrieval of UFVKs. 2021-12-22 15:57:47 -07:00
Kris Nuttycombe 0dcdc28a38 Add CWallet::GetUnifiedForReceiver 2021-12-22 15:57:47 -07:00
Kris Nuttycombe 8337442553 Add newly generated transparent UA receivers to the wallet. 2021-12-22 15:57:47 -07:00
Kris Nuttycombe 290985ba48 AddTransparentSecretKey does not need to take a CExtKey 2021-12-22 15:57:47 -07:00
Kris Nuttycombe b29ca10b8d Add unified address generation.
Generate unified addresses from UFVKs, and add the associated
metadata to the wallet database.
2021-12-22 15:57:47 -07:00
Kris Nuttycombe ca20cf512c Add key metadata to walletdb. 2021-12-22 15:57:47 -07:00
Kris Nuttycombe d869d7f4a3 Load unified full viewing keys from the walletdb. 2021-12-22 15:57:47 -07:00
Kris Nuttycombe e56f252a86 Add unified address tracking to KeyStore 2021-12-22 15:55:36 -07:00
Kris Nuttycombe ef068c51a9 Store ufvks to the wallet database. 2021-12-22 15:55:36 -07:00
Larry Ruane b538577359 test: Use result of getblocktemplate to submitblock
This will ensure that miners can use the values returned by
getblocktemplate (in particular, the block commitment hash)
to submit a valid block using the submitblock RPC.
2021-12-22 15:35:46 -07:00
Larry Ruane 8c0177a507 test: fix bugs in test framework 2021-12-22 15:05:38 -07:00
Charlie O'Keefe a2a66df5e0
Merge pull request #5435 from charlieok/add_libtinfo5_to_gitian_packages_list
Add libtinfo5 to gitian packages list
2021-12-21 11:06:43 -08:00
Charlie O'Keefe 04c292a379 Add libtinfo5 to gitian packages list
libtinfo5 is a build dependency of zcashd
https://zcash.readthedocs.io/en/latest/rtd_pages/Debian-Ubuntu-build.html
2021-12-21 09:17:51 -07:00
str4d 213ba58fae
Merge pull request #5434 from superbaud/config.offline-update
update librustzcash hash in config.offline, and remove all other repos from config.offline
2021-12-21 03:02:52 +00:00
Sasha 87101eeaed
only librustzcash in config.offline 2021-12-20 17:11:25 -08:00
Sasha 4e928fa67f
update hash for librustzcash 2021-12-20 16:25:05 -08:00
str4d 3acc68548e
Merge pull request #5300 from LarryRuane/feature/wallet_orchard
Feature/wallet orchard UA RPCs
2021-12-20 20:31:10 +00:00
str4d 12e022a53a
Merge pull request #5430 from str4d/release-v4.6.0-rc1
Release v4.6.0-rc1
2021-12-18 06:30:31 +00:00
Jack Grigg 9c4a1e7ad7 make-release.py: Updated release notes and changelog for 4.6.0-rc1. 2021-12-18 04:25:50 +00:00
Jack Grigg 1c910cf9cc make-release.py: Updated manpages for 4.6.0-rc1. 2021-12-18 04:25:50 +00:00
Jack Grigg d4b850d3f7 make-release.py: Versioning changes for 4.6.0-rc1. 2021-12-18 04:23:05 +00:00
str4d 75b539400c
Merge pull request #5429 from str4d/pre-4.6.0-rc1-changes
Pre-4.6.0-rc1 changes
2021-12-18 04:07:03 +00:00
Jack Grigg 8387aa40cf Update release notes 2021-12-18 01:44:27 +00:00
Jack Grigg d85bfb4744 Migrate to latest revisions of Zcash Rust crates 2021-12-18 01:44:27 +00:00
str4d eb175dddaa
Merge pull request #5426 from str4d/5379-revert-lint-fix
Revert lint: Fix false positive
2021-12-17 22:05:17 +00:00
Kris Nuttycombe 8b093a79da
Merge pull request #5402 from LarryRuane/2021-12-getblocktemplate
Add defaultroots field to getblocktemplate
2021-12-17 12:28:06 -07:00
str4d 72aad89859
Merge pull request #5404 from LarryRuane/2021-12-05-getmininginfo
[rpc] mining: Omit uninitialized currentblockweight, currentblocktx
2021-12-17 18:07:44 +00:00
MarcoFalke 6d60f1a9c9 [rpc] mining: Omit uninitialized currentblockweight, currentblocktx
zcash/zcash:
The `getmininginfo` RPC now omits `currentblockize` and `currentblocktx`
when a block was never assembled via RPC on this node during its current
process instantiation. The relevant RPCs are `generate` (regtest only) and
`getblocktemplate`. Blocks are also assembled when running the internal
miner (`zcashd -gen=1`), after the node mines its first block.

(cherry picked from commit bitcoin/bitcoin@fa178a6385)
2021-12-17 09:35:30 -07:00
str4d 9e4b6f670d
Merge pull request #5398 from str4d/ed25519-zebra-3
`ed25519-zebra` 3
2021-12-17 03:55:46 +00:00
Larry Ruane c937ba5ae5 getblocktemplate: add NU5 commitments to new `defaultroots` section
- merkleroot
- authdataroot
- chainhistoryroot
- blockcommitmentshash
2021-12-16 18:52:04 -07:00
Kris Nuttycombe 5c2d91589f
Merge pull request #5427 from str4d/5321-remove-misleading-log-message
rust: Remove misleading log message
2021-12-16 17:44:49 -07:00
str4d 34a8677c43
Merge pull request #5403 from LarryRuane/2021-12-nuparams
test: automatically add missing nuparams (network upgrade heights)
2021-12-17 00:42:04 +00:00
Jack Grigg 1b7a031e7b rust: Remove misleading log message
We use the `zcash_address` crate to parse Unified Addresses (which we
currently do nothing with). That crate returns an `UnsupportedAddress`
error for unhandled address kinds, which we were previously logging.
However, we _do_ support the other address kinds; we just parse them in
the C++ code.

Closes zcash/zcash#5321.
2021-12-16 22:22:05 +00:00
Jack Grigg 09e0af815f Revert "lint: Fix false positive"
This reverts commit fb38cf0d90.

The lint fix caused a problem on macOS, where the escaped double quote
was interpreted as part of an argument, and not as defining an argument.
We will need to find another way to address the lint.

Closes zcash/zcash#5379.
2021-12-16 21:54:48 +00:00
str4d 6a57389f38
Merge pull request #5424 from str4d/update-deps-4.6.0
Update dependencies for 4.6.0
2021-12-16 20:57:43 +00:00
Kris Nuttycombe ceeede3dc6
Merge pull request #5422 from LarryRuane/2021-12-getspentindex-logging
Dont log ERROR: spent index not enabled
2021-12-16 12:58:10 -07:00
Jack Grigg 407a0d9324 qa: Postpone recent CCache releases 2021-12-16 17:58:05 +00:00
Jack Grigg c37a69a357 depends Update Rust to 1.57.0
Also adds a developer script to make updating the hashes easier.
2021-12-16 17:57:34 +00:00
Jack Grigg 0d310a79ca depends: Update Boost to 1.78.0 2021-12-16 17:57:34 +00:00
Kris Nuttycombe fc1a16f4ff
Merge pull request #5423 from nuttycom/fix/orchard_batch_verifydb
Batch-verify Orchard transactions at the block level.
2021-12-16 10:43:09 -07:00
Jack Grigg e257844261 cargo update
In the three days since the last update, `futures 0.3.18` was yanked due
to panics: https://github.com/rust-lang/futures-rs/issues/2529
2021-12-16 16:55:11 +00:00
Kris Nuttycombe 99b2098f89 Batch-verify Orchard transactions at the block level.
Fixes #5316
2021-12-16 08:58:14 -07:00
Larry Ruane f139cdc4fe Add new and modify existing Orchard RPCs, non-functional
The new RPCs aren't functional, only have argument parsing and sample
outputs, guarded by experimental -orchardwallet flag.

These changes used the tickets linked from
https://github.com/zcash/zcash/issues/5056 as a guide.
2021-12-15 16:40:23 -07:00