Commit Graph

13415 Commits

Author SHA1 Message Date
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
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 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
Dimitris Apostolou 8403e04db9
Fix typos 2020-04-17 17:46:15 +03: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
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
Homu 9307eab1ab Auto merge of #4452 - rex4539:fix-typo, r=str4d
Fix typos in test framework
2020-04-15 20:25:14 +00: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
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
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
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
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