Commit Graph

13614 Commits

Author SHA1 Message Date
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
Alfredo Garcia f505d64c50 add documentation and command line parsing to afl scripts 2020-04-30 21:49:52 -03: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
Taylor Hornby 39ca21845a Fix undefined behavior in gtest tests 2020-04-30 17:16:53 -06: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
Alfredo Garcia 4c40f9f514 implement z_getnotescount api call 2020-04-25 11:17:20 -03:00
Homu c2a8beadec Auto merge of #4462 - rex4539:fix-typos, r=str4d
Fix typos
2020-04-25 06:51:08 +00:00
Homu 0ad52ca9b1 Auto merge of #4249 - oxarbitrage:issue_3724, r=str4d
Add confirmations, blockheight, blockindex and blocktime to z_listreceivedbyaddress

Fixes https://github.com/zcash/zcash/issues/3724

1- There was a PR to add confirmations to this call at https://github.com/zcash/zcash/pull/3836
I ported the commit from there and fixed test case by incrementing the confirmations as suggested at: https://github.com/zcash/zcash/pull/3836#issuecomment-499927807

2- Then added `blockheight`, `blockindex` and `blocktime`. To avoid some duplicated code (Sprout/Sapling) created a structure `trxblock`.

3- Original issue requests only time and blockindex however i think height is also important; if `blockindex` is the position of the transaction in the block then you are going to need also `height` to find it.
2020-04-25 05:28:16 +00:00
Kris Nuttycombe 5a8f6f8058 Merge remote-tracking branch 'upstream/master' into bug/4119-rewind_detection 2020-04-22 14:58:11 -06:00
Kris Nuttycombe 368a7c5a9d Ensure that we don't pass a null block pointer to ConnectTip. 2020-04-22 13:17:05 -06:00
Kris Nuttycombe db65d92df4 Make condition closer to original, Fix incorrect comment. 2020-04-22 13:17:05 -06:00
Kris Nuttycombe 2013b35e3e Remove option to load new blocks from ConnectTip 2020-04-22 13:17:05 -06:00
Homu ff1e8ebe2f Auto merge of #4469 - ebfull:release-v2.1.2, r=ebfull
Release v2.1.2

Includes **testnet** activation of Heartwood (NU3) on block `903800` -- approx May 6th, 4pm MST. Does **not** include mainnet activation, that's planned for `3.0.0`. See release notes for other cool changes.
2020-04-22 19:13:38 +00:00
Sean Bowe fdf34cefac
make-release.py: Updated release notes and changelog for 2.1.2. 2020-04-22 10:46:06 -06:00
Sean Bowe bfb0e4d985
make-release.py: Updated manpages for 2.1.2. 2020-04-22 10:46:06 -06:00
Sean Bowe 9eadd525a5
make-release.py: Versioning changes for 2.1.2. 2020-04-22 10:43:50 -06:00
Homu caea54013e Auto merge of #4468 - ebfull:heartwood-testnet, r=ebfull
Set Heartwood activation height for testnet to 903800.

Should activate on testnet approx 4PM MST on May 6th, 2020.
2020-04-22 00:50:15 +00:00
Daira Hopwood f7208c19c5 Clarify definition of NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-04-22 01:15:06 +01:00