Commit Graph

13474 Commits

Author SHA1 Message Date
Homu c82b3f9450 Auto merge of #4510 - zcash:hotfix-v2.1.2-2, r=nuttycom
Merge in 2.1.2-2 hotfix
2020-05-11 19:11:56 +00:00
ebfull e7395fb67d
Merge pull request #4509 from ebfull/release-v2.1.2-2
Release v2.1.2-2
2020-05-08 11:56:26 -06:00
Sean Bowe d86b56bd6c
Modify release notes for v2.1.2-1 and v2.1.2-2 to reflect the changes more accurately. 2020-05-08 11:47:41 -06:00
Sean Bowe 2e52500acf
make-release.py: Updated release notes and changelog for 2.1.2-2. 2020-05-08 11:43:55 -06:00
Sean Bowe 6d82cff680
make-release.py: Updated manpages for 2.1.2-2. 2020-05-08 11:43:54 -06:00
Sean Bowe bdb2df182b
make-release.py: Versioning changes for 2.1.2-2. 2020-05-08 11:41:47 -06:00
ebfull 4ee4b767ec
Merge pull request #4503 from daira/4496-heartwood-chain-consistency-check
txdb: More complete fix for the Heartwood chain consistency check issue
2020-05-08 11:40:55 -06:00
Daira Hopwood 58d49ac61b
txdb: log additional debug information.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-07 16:22:25 -06:00
Jack Grigg daabcd6d22
txdb: More complete fix for the Heartwood chain consistency check issue.
#4499 was an insufficient fix, because it did not consider the case where
a post-Heartwood node wrote a block index object for a header from a
non-upgraded peer. In that case the version in the block index entry is
`>= CHAIN_HISTORY_ROOT_VERSION`, and so the fix in #4499 has no effect.
In addition, we should skip the consistency check when the index object
validity is not BLOCK_VALID_CONSENSUS.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-07 16:22:09 -06:00
Homu 4b71f1633a Auto merge of #4490 - benzcash:ben/contrib/ci-builders, r=mdr0id
Dockerfiles for zcashd CI builds

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged

This PR is intended to move the existing buildbot worker docker images into this repo, and provide for a way to build gitian-builder images.

The included README.md describes the purpose and an example script.

When this is merged the existing buildbot CI will be updated to start using these images.
2020-05-07 18:08:22 +00:00
Homu 93599b7ec8 Auto merge of #4455 - benzcash:Dockerfile-contrib, r=ebfull
Added Dockerfile to contrib with README

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
2020-05-07 14:53:42 +00:00
Homu 38885ee9a8 Auto merge of #4501 - zcash:hotfix-v2.1.2-1, r=ebfull
Merge in hotfix v2.1.2-1

This PR brings our `v2.1.2-1` hotfix into master.

**Please don't try/r+ this yet.**
2020-05-06 23:01:09 +00:00
ebfull 84a703b3b1
Merge branch 'master' into hotfix-v2.1.2-1 2020-05-06 16:36:01 -06:00
Homu eb06b0a8d4 Auto merge of #4447 - nuttycom:bug/4119-rewind_detection, r=str4d
Reproduce and fix off-by-one error in reorg logic (#4119)

This attempts to reproduce #4119 using a simple chain split.It currently seems to trigger a different issue, an assertion failure in `CheckBlockIndex` when restarting
2020-05-06 21:50:03 +00:00
Sean Bowe f7d2142eb0
Add release details about v2.1.2-1 hotfix. 2020-05-06 10:58:53 -06:00
Sean Bowe c80adfcfcc
make-release.py: Updated release notes and changelog for 2.1.2-1. 2020-05-06 10:52:57 -06:00
Sean Bowe 72da9f77fa
make-release.py: Updated manpages for 2.1.2-1. 2020-05-06 10:52:57 -06:00
Sean Bowe 5d24937e5f
make-release.py: Versioning changes for 2.1.2-1. 2020-05-06 10:50:43 -06:00
ebfull 853eb885fa
Merge pull request #4499 from ebfull/heartwood-testnet-hotfix
Heartwood testnet hotfix
2020-05-06 10:47:56 -06:00
Sean Bowe c3018904c3
Don't throw exception in PopHistoryNode when popping from empty tree.
If we are doing an expected rollback that changes the consensus
branch ID for some upgrade (or introduces one that wasn't present
at the equivalent height) this will occur because
`SelectHistoryCache` selects the tree for the new consensus
branch ID, not the one that existed on the chain being rolled
back.
2020-05-05 17:25:56 -06:00
Jack Grigg d946b69cf8 txdb/chain: Restrict Heartwood chain consistency check to block index objects that were created by Heartwood-unaware clients.
In the vicinity of a network upgrade, a zcashd node may receive headers
for a non-upgrading chain from its non-upgraded peers (e.g. if the block
at the NU activation height is found more quickly by the non-upgrading
chain). In this situation, the node will end up with two headers at the
NU activation height (and possibly for subsequent block heights).

In the case of Heartwood, the block headers from the non-upgrading chain
do not satisfy the Heartwood header consistency check in
CBlockTreeDB::LoadBlockIndexGuts. In this commit, we restrict the
Heartwood consistency checks to block index objects that were created by
clients that are CHAIN_HISTORY_ROOT_VERSION or better.
2020-05-06 10:41:30 +12:00
Sean Bowe 8dcb533226
Add the intended testnet activation block of Heartwood to our intended rewind logic. 2020-05-05 14:47:29 -06:00
Kris Nuttycombe 35ff8d9bf2 Remove unused imports. 2020-05-05 11:41:06 -06:00
Homu 68fd808e0f Auto merge of #4444 - oxarbitrage:issue4375, r=str4d
Fix advertised version

Closes https://github.com/zcash/zcash/issues/4375 by adding the `-` character to the list of safe ones.

Now i can see stuff like the following in the logs:

```
...
2020-04-13 14:19:37 receive version message: /MagicBean:2.1.1-1/: version 170009, blocks=795400, us=[2800:a4:316b:8e00:ceb:c7b4:3481:197f]:59754, peer=2
...
```

API call `getpeerinfo` will also gets fixed.
2020-05-05 00:29:32 +00:00
Kris Nuttycombe 45dab9adc0 Revert "Update qa/rpc-tests/sapling_rewind_check.py"
This reverts commit e09f052570.
2020-05-04 16:57:48 -06:00
Kris Nuttycombe ae86386648 Update test description and clarify internal comments. 2020-05-04 10:55:32 -06:00
Kris Nuttycombe 6742ba021f
Add Zcash copyright to sapling_rewind_check.py 2020-05-02 18:33:58 -06:00
Kris Nuttycombe e09f052570
Update qa/rpc-tests/sapling_rewind_check.py
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-05-02 18:33:01 -06:00
Kris Nuttycombe e7eff424c1
Update qa/rpc-tests/test_framework/mininode.py
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-05-02 18:31:26 -06:00
Kris Nuttycombe 2de5a2cb2d
Use `%x` formatter for branch id hex string in test_framework/util.py
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-05-02 18:31:13 -06:00
Kris Nuttycombe c2e3454e0a
Clean up imports in sapling_rewind_check.py
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-05-02 18:30:09 -06:00
Kris Nuttycombe 1508345a20 Merge remote-tracking branch 'upstream/master' into bug/4119-rewind_detection 2020-05-01 17:33:53 -06:00
Ben Wilson 134d8e4cd0 Dockerfiles for zcashd CI builds 2020-05-01 12:56:17 -04:00
Homu 1abdc883ac Auto merge of #4487 - str4d:nu4-activation-logic, r=str4d
Add NU4 to upgrade list

Once NU4 has been named, we will rename the constants and functions.

Closes #4472.
2020-05-01 13:41:28 +00:00
Jack Grigg febfaef44e Update URLs for prior network upgrades 2020-05-01 11:40:13 +12:00
Jack Grigg 7e684120d3 Add NU4 test helpers 2020-05-01 11:38:32 +12:00
Jack Grigg 99d387fc51 Add NU4 to upgrade list
Once NU4 has a name, we will rename the constants.
2020-05-01 11:38:03 +12:00
Homu 7a0fe273d8 Auto merge of #4482 - str4d:memory_cleanse-backports, r=str4d
memory_cleanse backports

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#10308
- bitcoin/bitcoin#11196
- bitcoin/bitcoin#11558
  - Only the changes that did not conflict.
- bitcoin/bitcoin#16158

Part of #145.
2020-04-30 23:03:44 +00:00
Jack Grigg 8ea2f467cd Improve memory_cleanse documentation
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-05-01 11:00:49 +12:00
Jack Grigg 6a4ff45e8a Use BOOST_SCOPE_EXIT_TPL to clean and free datValue in CDB::Read 2020-05-01 10:57:24 +12:00
Homu 29ad02eda3 Auto merge of #4483 - nuttycom:update_cargo_lockfile, r=ebfull
Update cargo lockfile to V2 version.
2020-04-30 19:35:01 +00:00
Kris Nuttycombe 12ad13d2d8 Update to the Cargo V2 lockfile format.
The following crates required explicit downgrades:
    arrayvec v0.4.12 -> v0.4.11
    autocfg v0.1.7 -> v0.1.6
    c2-chacha v0.2.3 -> v0.2.2
    ppv-lite86 v0.2.6 -> v0.2.5
    proc-macro2 v1.0.10 -> v1.0.3
error: no matching package named `quote` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `ff_derive v0.6.0`
    ... which is depended on by `ff v0.6.0`
    ... which is depended on by `bellman v0.6.0`
    ... which is depended on by `librustzcash v0.2.0 (/home/nuttycom/work/zcash)`
2020-04-30 13:26:31 -06:00
Kris Nuttycombe 2bb5e2d175 Update all crates. 2020-04-30 13:16:18 -06:00
Tim Ruffing 1ccdb5734d Improve documentation of memory_cleanse()
So far, the documentation of memory_cleanse() is a verbatim copy of
the commit message in BoringSSL, where this code was originally
written. However, our code evolved since then, and the commit message
is not particularly helpful in the code but is rather of historical
interested in BoringSSL only.

This commit improves improves the comments around memory_cleanse()
and gives a better rationale for the method that we use. This commit
touches only comments.
2020-04-30 17:40:26 +12:00
Tim Ruffing f27ff314e6 Clean up logic in memory_cleanse() for MSVC
Commit fbf327b13868861c2877c5754caf5a9816f2603c ("Minimal code
changes to allow msvc compilation.") was indeed minimal in terms
of lines touched. But as a result of that minimalism it changed the
logic in memory_cleanse() to first call std::memset() and then
additionally the MSVC-specific SecureZeroMemory() function, and it
also moved a comment to the wrong location.

This commit removes the superfluous call to std::memset() on MSVC
and ensures that the comment is in the right position again.
2020-04-30 17:40:26 +12:00
Aaron Clauson 2fcc466273 Minimal code changes to allow msvc compilation.
Zcash: Only changes that did not conflict.
2020-04-30 17:40:26 +12:00
Adam Langley c502acc7c4 Switch memory_cleanse implementation to BoringSSL's to ensure memory clearing even with link-time optimization.
The implementation we currently use from OpenSSL prevents the compiler from optimizing away clensing operations on blocks of memory that are about to be released, but this protection is not extended to link-time optimization. This commit copies the solution cooked up by Google compiler engineers which uses inline assembly directives to instruct the compiler not to optimize out the call under any circumstances. As the code is in-lined, this has the added advantage of removing one more OpenSSL dependency.

Regarding license compatibility, Google's contributions to BoringSSL library, including this code, is made available under the ISC license, which is MIT compatible.

BoringSSL git commit: ad1907fe73334d6c696c8539646c21b11178f20f
2020-04-30 17:40:26 +12:00
Thomas Snider 0a2d4756e1 [wallet] Securely erase potentially sensitive keys/values 2020-04-30 17:40:26 +12:00
Homu 0dbb2d05d3 Auto merge of #4465 - oxarbitrage:issue4463, r=str4d
Add z_getnotescount API

Implement new API call to count notes in wallet.

Closes https://github.com/zcash/zcash/issues/4463
2020-04-30 01:35:59 +00:00
Homu 9e86cc2d82 Auto merge of #4427 - nuttycom:simplify_connect_tip, r=daira
Remove option to load new blocks from ConnectTip

A minor refactoring to move file IO out of ConnectTip, which has only a single caller.
2020-04-25 19:06:55 +00:00