Commit Graph

13604 Commits

Author SHA1 Message Date
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
Kris Nuttycombe 9fc94cc372 The last valid height condition reads better flipped. 2020-04-15 14:33:41 -06:00
Homu 9307eab1ab Auto merge of #4452 - rex4539:fix-typo, r=str4d
Fix typos in test framework
2020-04-15 20:25:14 +00:00
Kris Nuttycombe 40b5d5e3ea Fix #4119. 2020-04-15 14:19:09 -06:00
Kris Nuttycombe 5030e73afc Make the test reproduce the actual off-by-one error in rewind length. 2020-04-15 14:19:05 -06:00
Homu 4fad49d802 Auto merge of #4416 - daira:sa_restart, r=daira
Use SA_RESTART in sa_flags when setting up signal handlers

Explanation: if a signal interrupts certain syscalls such as `open`, `read`, or `write`,
then the library function will by default fail with `errno` `EINTR`. But we [almost](https://github.com/zcash/zcash/search?q=WSAEINTR) [never](https://github.com/zcash/zcash/search?q=EINTR)
check for `EINTR`, so this is likely to cause spurious errors. We want to restart the syscall
instead, which is what `SA_RESTART` is intended to do. Since our signal handlers (defined
in init.cpp) only set a flag, restarting the syscall is safe and is always the Right Thing.

See <https://www.gnu.org/software/libc/manual/html_node/Flags-for-Sigaction.html> and
<https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html> for
further information.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-04-15 19:23:14 +00:00
Alfredo Garcia a1c37b7b79
Fix typo
Co-Authored-By: Dimitris Apostolou <dimitris.apostolou@icloud.com>
2020-04-15 15:46:49 -03:00
Ben Wilson c3fe9e9850 Fixed README grammar, reuse Dockerfile vars 2020-04-15 13:41:05 -04:00
Homu 1f5de9cae2 Auto merge of #4306 - oxarbitrage:issue4224, r=daira
Compute more structures in CTxMemPool::DynamicMemoryUsage()

Closes https://github.com/zcash/zcash/issues/4224

Added more structures to the computation of the mempool memory size as indicated in the issue. RPC call `getmempoolinfo` is the only place where this is used to get the `usage` result.
2020-04-15 17:03:31 +00:00
Ben Wilson 416d6c9880 Added Dockerfile to contrib with README 2020-04-15 11:51:20 -04:00
Homu 8a2ab9fbda Auto merge of #4450 - str4d:make-release-py3, r=daira
Updates to zcutil/make-release.py

Finishes its migration to Python 3, and adds release process dependency checks.
2020-04-15 15:36:42 +00:00
Taylor Hornby 418ef7002a Fix undefined behavior in CScriptNum 2020-04-15 09:19:00 -06:00
Homu e555fd6472 Auto merge of #4410 - daira:clean-that-works, r=str4d
Add `zcutil/clean.sh` and `zcutil/distclean.sh` scripts that work reliably (unlike `make clean`)

Workaround for #2226.
2020-04-15 13:28:46 +00:00
Daira Hopwood 47b05ab801 Address review comments: `target` and `depends/work` should be cleaned by clean.sh.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-04-15 12:09:27 +01:00
Homu 344a2325ef Auto merge of #4431 - oxarbitrage:issue4389, r=daira
Lock with cs_main inside gtests that request chain state

Fix https://github.com/zcash/zcash/issues/4389

- Used the lock from boost tests where `chainActive.Height()` is being called: https://github.com/zcash/zcash/blob/master/src/wallet/test/rpc_wallet_tests.cpp#L1323

- I found no other place in the gtests where `chainActive` is used apart from just the same tests `chainActive.Height()` is called. It seems chain state is only used when we fake mine transactions and these are all inside `test_wallet.cpp`.

I might be missing some other patterns to look at, please let me know if so.
2020-04-15 11:03:48 +00:00
Jack Grigg 86f8bcfa17 zcutil/release-notes.py: Add Python 3 execution header 2020-04-15 22:57:05 +12:00
Jack Grigg 7b9aa90880 Update release notes for v2.1.2 2020-04-15 22:42:22 +12:00
Dimitris Apostolou 5f2e015aa3
Fix typos 2020-04-15 13:24:00 +03:00
Jack Grigg 8b9e4eec0f zcutil/make-release.py: Check for release dependencies 2020-04-15 17:56:38 +12:00
Jack Grigg 147526b0a8 zcutil/make-release.py: Fix to run with Python 3 2020-04-15 17:56:38 +12:00
Homu b5dda4ecc5 Auto merge of #4448 - str4d:equihash-validator-rust-nu, r=ebfull
consensus: From Heartwood activation, use Rust Equihash validator

The C++ and Rust Equihash validators are intended to have an identical
set of valid Equihash solutions, so this should merely be an
implementation detail. However, deploying the Rust validator at the same
time as a network upgrade reduces the risk of an unintentional consensus
divergence due to undocumented behaviour in either implementation.

Once Heartwood has activated on mainnet, we can verify that all
pre-Heartwood blocks satisfy the Rust validator, and then remove the C++
validator and make Equihash-checking non-contextual again.

Replaces zcash/zcash#2851.
2020-04-15 02:03:06 +00:00
Jack Grigg 655f0c9802 consensus: From Heartwood activation, use Rust Equihash validator
The C++ and Rust Equihash validators are intended to have an identical
set of valid Equihash solutions, so this should merely be an
implementation detail. However, deploying the Rust validator at the same
time as a network upgrade reduces the risk of an unintentional consensus
divergence due to undocumented behaviour in either implementation.

Once Heartwood has activated on mainnet, we can verify that all
pre-Heartwood blocks satisfy the Rust validator, and then remove the C++
validator and make Equihash-checking non-contextual again.
2020-04-15 11:53:28 +12:00
Jack Grigg 49f9584613 Pass the block height through to CheckEquihashSolution()
This requires moving CheckEquihashSolution() to
ContextualCheckBlockHeader() for all but the genesis block, which has no
effect on consensus; it just means that an invalid Equihash solution is
rejected slightly later in the block validation process.
2020-04-15 11:51:21 +12:00
Kris Nuttycombe 59d2a6458d Narrow down the test case. 2020-04-14 17:47:29 -06:00
Jack Grigg f4fe77ad1e test: Run Equihash test vectors on both C++ and Rust validators 2020-04-15 11:31:10 +12:00
Alfredo Garcia 8a40b8518a fix wallet nullifiers test 2020-04-14 17:11:20 -03:00
Homu 084303d8c2 Auto merge of #4264 - NikVolf:mmr, r=str4d
[ZIP 221] FlyClient - Consensus-Layer Changes

Implements https://zips.z.cash/zip-0221
2020-04-14 20:09:34 +00:00
Kris Nuttycombe a4e8945cfa Check network reunification. 2020-04-14 13:52:50 -06:00
Kris Nuttycombe f432ceff31 Add a test reproducing the off-by-one error. 2020-04-14 13:37:40 -06:00
Homu ccc7735635 Auto merge of #4446 - str4d:heisenbug-squashing, r=ebfull
Heisenbug squashing

Both bugs addressed here had clear causes, so we are confident that the corresponding issues are fixed.
2020-04-14 16:47:24 +00:00
Alfredo Garcia 6f3ad1c496 compute more structures in mempool DynamicMemoryUsage 2020-04-14 10:22:27 -03:00
Alfredo Garcia 8ed97dd9cc Add a new safe chars rule for node version string 2020-04-14 09:08:51 -03:00
Jack Grigg f4194a3fd7 test: Add a second Sapling note to WalletTests.ClearNoteWitnessCache
Quoting the documentation for `std::vector::operator[]`:

    Portable programs should never call this function with an argument
    n that is out of range, since this causes undefined behavior.

This test was doing just that: performing checks on a non-existent
second Sapling witness (duplicating the Sprout logic that checked two
notes, one of which was in the wallet). The test was instead reading
arbitrary memory after the witness that did exist; in most cases, this
memory was interpreted as a `boost::none` as expected, but in some cases
the memory was interpreted as a "real" witness.

Closes zcash/zcash#4445.

Co-authored-by: Ying Tong <yingtong@ethereum.org>
2020-04-14 20:57:59 +12:00
Jack Grigg e85fac5167 test: Ignore timestamps in addressindex checks
The mempool timestamps are local to each node, and if the testing
machine is under load, they can potentially differ by a second.

Closes zcash/zcash#4439.

Co-authored-by: Ying Tong <yingtong@ethereum.org>
2020-04-14 20:56:37 +12:00
str4d 070f4faaeb
Merge pull request #4443 from rex4539/fix-pr-template
Update GitHub PR template
2020-04-14 17:45:18 +12:00
str4d eaafb8d6b5
Merge pull request #4435 from rex4539/rocket2discord
Point at support community on Discord
2020-04-14 12:53:24 +12:00
Dimitris Apostolou f2a163ccaf
Update documentation info 2020-04-12 15:27:09 +03:00
Jack Grigg 31e5f9cde2 Make peak_pos zero-indexed in CCoinsViewCache::PreloadHistoryTree 2020-04-11 11:52:56 +12:00
Jack Grigg 21d8e5be15 Comment clarifications and fixes 2020-04-11 11:39:00 +12:00
Jack Grigg bc30c57cdb Truncate HistoryCache.appends correctly for zero-indexed entries 2020-04-10 19:56:13 +12:00
Jack Grigg 15ef73e586 Improve documentation of CCoinsViewCache::PreloadHistoryTree 2020-04-10 19:47:45 +12:00
Jack Grigg 65073157e6 Remove unnecessary else case in CCoinsViewCache::PreloadHistoryTree 2020-04-10 19:47:45 +12:00
Jack Grigg 9cfd574eac test: Add an extra assertion to feature_zip221.py 2020-04-10 19:47:45 +12:00
Daira Hopwood d47676fe00 Refer to altitude instead of height for history tree peaks 2020-04-10 19:47:45 +12:00
Homu 3033b8a0ec Auto merge of #4402 - oxarbitrage:issue4326, r=str4d
Add -lightwalletd experimental option

Similar to `-insightexplorer` but loading less indexes.

After testing and code review this should be able to close https://github.com/zcash/zcash/issues/4326
2020-04-10 03:42:54 +00:00