Commit Graph

9167 Commits

Author SHA1 Message Date
fanquake d84878d853 scripted-diff: prefer MAC_OSX over __APPLE__
-BEGIN VERIFY SCRIPT-
sed -i 's/__APPLE__/MAC_OSX/g' src/compat/byteswap.h src/util.cpp
-END VERIFY SCRIPT-

Zcash: Excludes byteswap.h change as we don't have bitcoin/bitcoin#9366.
2020-07-30 04:33:36 +01:00
Homu f39e4dbaf1 Auto merge of #4627 - LarryRuane:issue4596-flush-wallet-db, r=str4d
flush witness cache (SetBestChain()) on clean shutdown

Closes #4596, follow-on to #4573. In addition to flushing witness data on shutdown, fix the RPC test that was preventing this change from being part of #4573.
2020-07-29 13:12:04 +00:00
Homu 24f3bcf275 Auto merge of #4623 - str4d:metrics-locking, r=str4d
metrics: Collect general stats before clearing screen

This prevents the metrics screen from flashing if locks are being held
by long-running processes, specifically cs_main during block validation.

We split up locking on cs_main and cs_vNodes to make obtaining the locks
easier, at the expense of potentially having slightly out-of-sync
statistics (which doesn't really matter, as all we are fetching from the
latter lock is the number of connected peers).
2020-07-29 09:33:07 +00:00
Homu 91cb52adc5 Auto merge of #4606 - str4d:safe-mode-alert-for-pre-heartwood-nodes, r=str4d
Send alert to put pre-Heartwood nodes into safe mode.

The alert targets nodes running protocol version <= 170010.
Heartwood-compatible nodes run protocol version >= 170011.
2020-07-29 07:59:59 +00:00
therealyingtong 369c16ef44
Set APPROX_RELEASE_HEIGHT to 917000 and update release-notes-3.1.0.md 2020-07-28 07:57:58 +08:00
therealyingtong e4963385a4
make-release.py: Versioning changes for 3.1.0. 2020-07-28 06:54:02 +08:00
Homu d08883263f Auto merge of #4636 - daira:disable-mining-regression, r=daira
Fix "--disable-mining" build regression

closes #4634

Test by building with:
* `CONFIGURE_FLAGS="--disable-tests --disable-mining --disable-bench" zcutil/build.sh`
* `zcutil/distclean.sh`
* `CONFIGURE_FLAGS="--disable-mining" zcutil/build.sh`

After the second build, run `qa/zcash/full-test-suite.py`. Stop when it gets to the RPC tests, which will hang. The preceding parts of the test suite are all expected to pass.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-27 21:41:25 +00:00
Homu 162d5a50ee Auto merge of #4610 - ebfull:testnet-dev-fund, r=str4d
Add dev fund addresses and set activation height for testnet NU4 activation.
2020-07-27 09:05:53 +00:00
Daira Hopwood 40b9cbf0b1 Allow Equihash validation tests to be compiled with --disable-mining.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-25 16:33:02 +01:00
Daira Hopwood c99a00596f Fix --disable-mining build regression. closes #4634
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-25 15:41:39 +01:00
therealyingtong 283287ab5b
Use 51 Testnet Dev Fund addresses, and adjust the end heights.
Co-authored-by: Ying Tong Lai <yingtong@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-25 09:45:30 +08:00
therealyingtong 62c3613816
Delay testnet activation height by one week 2020-07-24 08:15:35 +08:00
Kris Nuttycombe 04b4d42767 Zero-initialize HistoryNode values. 2020-07-23 16:24:48 -06:00
therealyingtong 13aa74aa45
Pass HistoryNode struct to librustzcash FFI 2020-07-21 17:56:47 +08:00
Larry Ruane a65ecaad54 flush wallet db (SetBestChain()) on clean shutdown 2020-07-20 20:04:48 -06:00
Jack Grigg 5d15ee1f22 metrics: Collect general stats before clearing screen
This prevents the metrics screen from flashing if locks are being held
by long-running processes, specifically cs_main during block validation.

We split up locking on cs_main and cs_vNodes to make obtaining the locks
easier, at the expense of potentially having slightly out-of-sync
statistics (which doesn't really matter, as all we are fetching from the
latter lock is the number of connected peers).
2020-07-18 23:35:19 +12:00
therealyingtong ab4d2ede40
Set PROTOCOL_VERSION to 170012 2020-07-18 00:29:03 +08:00
therealyingtong 8a4c51508a
Set Canopy testnet activation height to 1020500 2020-07-18 00:28:45 +08:00
Daira Hopwood d9307ddd83 Add unit tests for DisplayDuration, DisplaySize, and DisplayHashRate.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-17 13:59:27 +01:00
Daira Hopwood 460a601e9b Metrics screen: display hash rates using SI prefixes rather than as powers of 2.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-17 13:56:33 +01:00
Daira Hopwood 976dce7696 src/metrics.cpp: cosmetic whitespace changes.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-17 13:54:58 +01:00
ewillbefull@gmail.com c0a19854bf Add dev fund addresses for testnet NU4 activation. 2020-07-15 20:09:39 -06:00
Homu d292376176 Auto merge of #4609 - therealyingtong:release-v3.1.0-rc2, r=daira
Release v3.1.0-rc2
2020-07-15 21:25:37 +00:00
Daira Hopwood 3383c4855f More iterator cleanups.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-15 19:18:57 +01:00
therealyingtong 170ea7bda0
make-release.py: Versioning changes for 3.1.0-rc2. 2020-07-15 21:50:12 +08:00
Jack Grigg 42f98aaccb Send alert to put pre-Heartwood nodes into safe mode.
The alert targets nodes running protocol version <= 170010.
Heartwood-compatible nodes run protocol version >= 170011.
2020-07-15 19:45:49 +12:00
Jack Grigg 3611f68811 Revert "Pass the block height through to CheckEquihashSolution()"
This reverts commit 49f9584613.

Now that we are depending unconditionally on the Rust Equihash
validator, CheckEquihashSolution() can revert to being a non-contextual
check.

This also fixes a segfault that would occur during reindexing if the
consensus rules were altered such that a previously-valid block would
become invalid, and the node's block files contained blocks in a
specific order. It was encountered while testing the Canopy NU on
testnet (due to a bug in the implementation of ZIP 212 that was
separately fixed in zcash/zcash#4604).
2020-07-15 16:16:40 +12:00
Jack Grigg 96920e952d Remove C++ Equihash validator 2020-07-15 14:03:45 +12:00
Jack Grigg 79846ac1f3 Use Rust Equihash validator unconditionally
It correctly validates all blocks prior to Heartwood activation.
2020-07-15 13:59:32 +12:00
Daira Hopwood 2336259c1e Fix an unintended consensus change in decryption of coinbase outputs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-14 22:59:34 +01:00
Daira Hopwood 239ea1270e Add key_constants.h to src/Makefile.am.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-14 17:44:54 +01:00
therealyingtong 0901cb0241
Undo manual DEPRECATION_HEIGHT 2020-07-14 14:46:15 +08:00
therealyingtong e2be85b3af
make-release.py: Versioning changes for 3.1.0-rc1. 2020-07-14 14:36:44 +08:00
Homu 973dff930a Auto merge of #4599 - daira:iterator-cleanup, r=therealyingtong
Clean up some iterator usage

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-14 05:12:41 +00:00
Daira Hopwood 0b0c84f4c9 Another cleanup.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-14 01:00:18 +01:00
Daira Hopwood 57409b7d2b Remove an unnecessary iterator increment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-14 00:47:34 +01:00
Homu 6caed410c0 Auto merge of #4600 - daira:fix-cscheduler, r=daira
Fix bug in CScheduler
2020-07-13 21:38:06 +00:00
Taylor Hornby daf9ed98a1 Fix bug in CScheduler 2020-07-13 19:40:49 +01:00
Daira Hopwood 66096d540f Clean up some iterator usage.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-13 19:35:26 +01:00
Homu 959f5b09d0 Auto merge of #4560 - str4d:zip-207, r=nuttycom
[ZIP 207] Funding Streams + [ZIP 214] Dev Fund Recipients

Closes #4554. Closes #4555.
2020-07-10 22:45:11 +00:00
Kris Nuttycombe d80857f2b5 Trivial whitespace fix. 2020-07-10 08:31:46 -06:00
Kris Nuttycombe c88b461f89
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-10 08:29:47 -06:00
Kris Nuttycombe 0e7ae06905 Fix assertion check in GetBlockSubsidy 2020-07-10 08:26:33 -06:00
str4d 8f7861573d
Merge pull request #20 from daira/zip-207
Changes to getblocksubsidy RPC, and resolution of a problem with initializing chain params
2020-07-11 01:55:03 +12:00
Daira Hopwood 69cf041d5d Change the format of `getblocksubsidy` output to use an array of funding stream objects.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-10 14:10:26 +01:00
Daira Hopwood 64cfbab3db
Apply suggestions from code review
keyInfo -> keyConstants

Co-authored-by: ying tong <yingtong@z.cash>
2020-07-10 12:33:27 +01:00
Homu 66d4c88943 Auto merge of #4572 - oxarbitrage:issue4571, r=str4d
Add solution rates aproximation to metrics

Closes https://github.com/zcash/zcash/issues/4571
2020-07-10 07:02:14 +00:00
Daira Hopwood aa1b924427 Cosmetic spacing changes.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-10 02:14:42 +01:00
Daira Hopwood 9161071b02 Use ValueFromAmount instead of double arithmetic, and improve variable names.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-10 02:08:30 +01:00
Kris Nuttycombe 9228c3113d Fix typo in constant. 2020-07-09 18:26:11 -06:00