Commit Graph

13748 Commits

Author SHA1 Message Date
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
Sean Bowe b42af16553
Set Heartwood activation height for testnet to 903800. 2020-04-21 16:13:33 -06:00
Homu ee00d28907 Auto merge of #4466 - ebfull:fix-gitian, r=str4d
Add rust resources to distribution.

These were added in 90f7234136 but aren't currently being included by `make dist`.
2020-04-21 17:52:00 +00:00
Sean Bowe 08e6ed154c
Add test_random.h to distribution tarball. 2020-04-20 14:53:48 -06:00
Sean Bowe 37fa94e01d
Add Rust resources to distribution tarball. 2020-04-20 13:44:06 -06:00
Alfredo Garcia 766e0b8f09 add a test case 2020-04-19 09:52:38 -03:00
Dimitris Apostolou 8403e04db9
Fix typos 2020-04-17 17:46:15 +03:00
Ben Wilson 299887486c Fixed Docker README grammar 2020-04-16 09:02:13 -04:00
Homu 659ac40ad1 Auto merge of #4457 - ebfull:release-v2.1.2-rc1, r=str4d
Release v2.1.2-rc1
2020-04-16 10:50:28 +00:00
Jack Grigg 51af936f19 Set hashFinalSaplingRoot and hashChainHistoryRoot in AddToBlockIndex
- hashFinalSaplingRoot is now always set to hashLightClientRoot before
  Heartwood activation (regardless of whether or not that is the correct
  Sapling root), and set to the Sapling root after Heartwood activation
  only for blocks that have been passed to ConnectBlock() at least once.

- hashChainHistoryRoot is now always set "correctly" (either null, or
  identical to hashLightClientRoot).

We rely on the fact that block headers are downloaded in order, and we
therefore always know the height of a block header, in order to check
whether Heartwood is active for a particular header.
2020-04-16 20:48:20 +12:00
Sean Bowe 3da600ee3a
make-release.py: Updated release notes and changelog for 2.1.2-rc1. 2020-04-15 17:47:45 -06:00
Sean Bowe 8f0655b841
make-release.py: Updated manpages for 2.1.2-rc1. 2020-04-15 17:47:45 -06:00
Sean Bowe 2386046941
make-release.py: Versioning changes for 2.1.2-rc1. 2020-04-15 17:45:34 -06:00
Homu 215c74ec3f Auto merge of #4454 - defuse:cscriptnum-serialization-fix, r=daira
Fix undefined behavior in CScriptNum

Fixes #4432
2020-04-15 22:36:33 +00:00
Kris Nuttycombe 7629560a26 Trivial comment. 2020-04-15 16:09:19 -06:00
Kris Nuttycombe a4e80ae1ab Restart node in a chain split state to allow the test to complete. 2020-04-15 15:58:48 -06:00
Homu e7e5a61f2b Auto merge of #4453 - str4d:release-notes-v2.1.2, r=ebfull
Update release notes for v2.1.2
2020-04-15 21:35:14 +00:00