Commit Graph

15804 Commits

Author SHA1 Message Date
str4d fe7b87a96c
Merge pull request #5452 from str4d/release-v4.6.0-1
Release v4.6.0-1
2022-01-05 22:18:46 +00:00
Jack Grigg daef0041e0 Add release notes for v4.6.0-1 2022-01-05 20:24:29 +00:00
Jack Grigg cf22fa7fe3 make-release.py: Updated release notes and changelog for 4.6.0-1. 2022-01-05 20:18:43 +00:00
Jack Grigg b97133daaf make-release.py: Updated manpages for 4.6.0-1. 2022-01-05 20:18:43 +00:00
Jack Grigg 5bf937b422 make-release.py: Versioning changes for 4.6.0-1. 2022-01-05 20:16:10 +00:00
str4d 7b820cfa8f
Merge pull request #5451 from zcash/2022-01-getblocktemplate-regression-fix
rpc: Fix regression in getblocktemplate output
2022-01-05 20:07:44 +00:00
Jack Grigg 4559186596 rpc: Fix regression in getblocktemplate output
We added support for the NU5 consensus rules in v4.5.0, which alters the
block header to contain a `hashBlockCommitments` value instead of the
chain history root. However, the output of `getblocktemplate` wasn't
returning this value; once NU5 activated, the `blockcommitmentshash`
field was being set to "null" (all-zeroes).

In v4.6.0 we added full NU5 support to `getblocktemplate`, by adding a
`defaultroots` field that gave default values for `hashBlockCommitments`
and the components required to derive it. However, in doing so we
introduced a regression in the (now-deprecated) legacy fields, where
prior to NU5 activation they contained nonsense.

This commit fixes the output of `getblocktemplate` to have the intended
semantics for all fields:

- The `blockcommitmentshash` and `authdataroot` fields in `defaultroots`
  are now omitted from block templates for heights before NU5 activation.

- The legacy fields now always contain the default value to be placed
  into the block header (regaining their previous semantics).

Co-authored-by: Larry Ruane <larry@z.cash>
2022-01-05 12:07:46 +00:00
Larry Ruane 97a76f1b61 test: Fix ZIP 244 implementation
Script codes must be serialized in their field encoding, which
includes the CompactSize length prefix.

Co-authored-by: Jack Grigg <jack@z.cash>
2022-01-05 12:07:46 +00:00
Larry Ruane dfefab2f55 test: check getblocktemplate output before and after NU5
This test currently fails with submitblock returning the error
"bad-heartwood-root-in-block".

Added authdigest to GBT coinbasetxn field because we can't obtain this
via getrawtransaction.

Co-authored-by: Jack Grigg <jack@z.cash>
2022-01-05 12:07:46 +00:00
str4d 1d7a29ea56
Merge pull request #5395 from nuttycom/feature/wallet_orchard-unified_addrs
Add unified addresses to the zcashd wallet.
2022-01-05 02:30:30 +00:00
Kris Nuttycombe eb53abbbaf Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-04 16:29:53 -07:00
Kris Nuttycombe ad54591061 Improve documentation of UFVK/UA metadata storage semantics. 2022-01-04 16:29:28 -07:00
Kris Nuttycombe 8d6d178a47 Use Bip44TransparentAccountKeyPath() for Bip44AccountChains keypath construction. 2022-01-04 16:29:28 -07:00
Kris Nuttycombe 16ba83ab1e Make `FindAddress` correctly check for maximum transparent child index.
ZcashdUnifiedFullViewingKey::FindAddress was previously not checking
that the transparent child index did not overflow in unified address
generation. GenerateUnifiedAddress has been modified to search from
the last known diversifier index if no diversifier is specified, and
boundary conditions for transparent addresses are now correctly handled.
2022-01-04 16:29:28 -07:00
Dimitris Apostolou 2006939d27
Fix typos 2022-01-02 23:16:01 +02:00
Kris Nuttycombe 0931aa8908
Merge pull request #5443 from steven-ecc/gtest-fix-for-debug-mode
Lock cs_main prior to calling blockToJSON
2021-12-30 11:18:14 -07:00
Kris Nuttycombe 5d07a8ae79 Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-12-30 10:53:51 -07:00
Steven Smith 56b706d5c7 Lock cs_main prior to calling blockToJSON 2021-12-29 21:22:19 -08:00
Daira Hopwood ba0688da3f
Merge pull request #5441 from LarryRuane/2021-12-28-test-submitblock
test: assert that the return value of submitblock is None
2021-12-29 14:02:57 +00:00
Larry Ruane 1f223ebed7 assert that the return value of submitblock is None 2021-12-28 22:10:13 -07:00
Kris Nuttycombe 74e4bef6f2 Ensure that unified address metadata is always correctly populated.
This reworks the way that address metadata is added to the wallet
to make adding address metadata to the wallet's in-memory cache
the responsibility of a single method rather than distributed
across multiple places in the code.
2021-12-23 09:33:17 -07:00
Sasha ba4b4791c1
Merge pull request #5436 from superbaud/release-v4.6.0
Release v4.6.0
2021-12-22 19:13:55 -08:00
Sasha 25278c312a str4d suggested changes to release-notes-4.6.0.md 2021-12-22 17:36:39 -08:00
Sasha eeecf63dae make-release.py: Updated release notes and changelog for 4.6.0. 2021-12-23 00:35:41 +00:00
Sasha de4dd9f231 make-release.py: Updated manpages for 4.6.0. 2021-12-23 00:35:40 +00:00
Sasha baa3de9250 make-release.py: Versioning changes for 4.6.0. 2021-12-23 00:13:51 +00:00
Sasha bc6e565bcc
Merge pull request #5431 from LarryRuane/2021-12-test-getblocktemplate-submitblock
test: Use result of getblocktemplate to submitblock
2021-12-22 16:06:42 -08:00
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