Commit Graph

15499 Commits

Author SHA1 Message Date
Kris Nuttycombe 62b86d6afc Use CKeyID and CScriptID instead of new P2PKH/P2SHAddress classes. 2022-01-06 13:44:45 -07:00
Kris Nuttycombe b305ad2892 Remove the `InvalidEncoding` type from key & address variants.
The presence of this variant results in a situation where more
of the code than necessary needs to be aware of and handle
decoding failures. This change moves all handling of decoding
failures to the point of decoding.
2022-01-06 13:44:45 -07:00
Kris Nuttycombe 0403799be2
Merge pull request #5454 from zcash/hotfix-v4.6.0-1
Hotfix v4.6.0-1
2022-01-05 18:15:33 -07:00
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
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
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
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
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 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