Commit Graph

9038 Commits

Author SHA1 Message Date
Daira Hopwood 76c416d2df Remove an unused CCriticalSection.
The code that used this was removed in 5f84491d82.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-06-23 19:38:29 +01:00
Homu 4ffccda774 Auto merge of #4322 - oxarbitrage:issue3740, r=str4d
Add -debuglogfile option

Cherry-picked from https://github.com/bitcoin/bitcoin/pull/11781.
Closes https://github.com/zcash/zcash/issues/3740.
2020-06-04 00:40:45 +00:00
Homu e9a6d7926b Auto merge of #4282 - oxarbitrage:issue2375, r=daira
Add a flag to get amount results as integer

Closes https://github.com/zcash/zcash/issues/2375
2020-06-03 11:26:00 +00:00
Alfredo Garcia 916351be04
fix/improve docs
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-02 09:14:50 -03:00
Homu 7275bc7f3f Auto merge of #4545 - str4d:metrics-ibd-progress-bar, r=str4d
metrics: Add a progress bar when in Initial Block Download mode

The progress bar shows both headers (in green) and blocks (in white / inverse of background colour). It is only printed for TTY output.

Additionally, the "not mining" message is no longer shown on mainnet, as the built-in CPU miner is not effective at the current network difficulty.
2020-06-02 03:01:51 +00:00
Jack Grigg 12e169d09f metrics: Only print IBD progress bar on TTY
Now that it is created from space characters, it is meaningless to print
it to a log file.
2020-06-02 14:23:03 +12:00
Jack Grigg a79337c3ee metrics: Switch to ANSI colour codes for progress bar
We already assume that ANSI colour codes work for the metrics art,
whereas the block characters have inconsistent support in fonts.
2020-06-02 14:20:55 +12:00
Alfredo Garcia 74039434a8
initialize size_t 2020-06-01 09:47:02 -03:00
Alfredo Garcia 93afebeef4 add new parameters to rpc client and fix some bugs 2020-05-30 12:18:43 -03:00
Alfredo Garcia e7c829aa0e update docs 2020-05-30 10:34:03 -03:00
Alfredo Garcia 3b9bd2da2f fix sort of options 2020-05-28 10:58:04 -03:00
Wladimir J. van der Laan 540cdb34e2 Add `-debuglogfile` option
This patch adds an option to configure the name and/or directory of the
debug log.

The user can specify either a relative path, in which case the path
is relative to the data directory. They can also specify an absolute
path to put the log anywhere else in the file system.
2020-05-28 10:53:58 -03:00
Daira Hopwood c1227ae67c Rename NU4 to Canopy in constant and function names.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-28 13:11:48 +01:00
Jack Grigg 96681695c9 metrics: Don't show "not mining" text for mainnet
Mining with the zcashd built-in CPU miner is not useful work on mainnet
at the current network difficulty.
2020-05-28 22:21:40 +12:00
Jack Grigg eb4ada98d2 metrics: Draw IBD progress bar showing headers and blocks 2020-05-28 22:21:40 +12:00
Jack Grigg 3a1b1a2fa2 metrics: Fix indents 2020-05-28 22:21:40 +12:00
Homu 68d25c9259 Auto merge of #3936 - solardiz:report-headers-download, r=str4d
Report headers download

With current compile-time defaults, a Zcash node prefetches up to 160 block headers per request without a limit on how far it can prefetch, but only up to 16 full blocks at a time. For this and other reasons, it can get very far ahead in headers prefetch (and PoW verification on those, so it's quite some processing too) over full blocks fetch (such as 10x ahead) during initial blocks download. Let's report to the user on how many headers the node has fetched, and let's also use this information as additional input on estimating the total number of blocks to fetch: it can't be less than the number of headers already fetched.

While at it, also fix typos in related code.
2020-05-28 09:08:44 +00:00
Solar Designer fad004114a During initial blocks download, also report the number of headers 2020-05-28 20:34:31 +12:00
Solar Designer ed3b473ec6 Fix typos in ProcessMessage() "headers" 2020-05-28 20:26:00 +12:00
Homu 804125cc20 Auto merge of #4543 - defuse:fix-invalid-argument, r=str4d
Add missing <stdexcept> header for std::invalid_argument

Closes #1703.
2020-05-28 08:06:06 +00:00
Homu 9bf8443c16 Auto merge of #4504 - str4d:disconnectblock-fixes, r=str4d
Use the cached consensusBranchId in DisconnectBlock

If a node is started with a set of network upgrades that don't match the
serialized chain (such as when we implement NU rollbacks on testnet),
RewindBlockIndex will disconnect each block in the chain until it
reaches the most recent block that agrees with the node's set of network
upgrades. However, the blocks themselves should be disconnected using
the consensus branch ID that they were connected with, which is
persisted alongside the chain and reconstructed in LoadBlockIndex.
2020-05-28 02:51:34 +00:00
Homu 4907a31302 Auto merge of #4242 - oxarbitrage:issue3726, r=str4d
Add estimatedheight to rpc getblockchaininfo response

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

Ported from https://github.com/zcash/zcash/pull/3727 with comments addressed.
2020-05-28 00:49:49 +00:00
Homu 72edd11bd9 Auto merge of #4486 - defuse:fix-undefined-behavior-in-gtest, r=daira
Fix undefined behavior in gtest tests
2020-05-27 23:47:58 +00:00
Jack Grigg 27b2ce3468 Use the cached consensusBranchId in DisconnectBlock
If a node is started with a set of network upgrades that don't match the
serialized chain (such as when we implement NU rollbacks on testnet),
RewindBlockIndex will disconnect each block in the chain until it
reaches the most recent block that agrees with the node's set of network
upgrades. However, the blocks themselves should be disconnected using
the consensus branch ID that they were connected with, which is
persisted alongside the chain and reconstructed in LoadBlockIndex.
2020-05-28 09:50:08 +12:00
Homu 8c778c9c0d Auto merge of #4527 - dannywillems:librustzcash/c-header-compatibility, r=str4d
librustzcash: make the header C compatible

The `librustzcash.h` file is compatible with both languages. However, only C++ is supported at the moment. By relying on the preprocessor to include or not the `extern "C"` piece, the interface becomes compatible with both.
2020-05-27 21:23:08 +00:00
Taylor Hornby 08662fa09a Add missing <stdexcept> header for std::invalid_argument 2020-05-24 16:49:13 -06:00
Sean Bowe 306a336a0a
make-release.py: Versioning changes for 3.0.0. 2020-05-22 11:46:19 -06:00
Sean Bowe 61aee9ec9c
Set deprecation of 3.0.0 to target EOS halt mid-September. 2020-05-21 07:35:09 -06:00
Sean Bowe 7000f452fa
make-release.py: Versioning changes for 3.0.0-rc1. 2020-05-21 07:32:25 -06:00
Homu 3860e7cae7 Auto merge of #4533 - ebfull:heartwood-activation, r=ebfull
Enable Heartwood activation on mainnet

This sets the Heartwood activation height to `903000`, which follows the deprecation height of `v2.1.2-3` (which is set to deprecate on block `901475`, roughly 31 hours earlier, sometime mid-July).
2020-05-20 21:36:27 +00:00
Homu bfb1bfd9d6 Auto merge of #4534 - ebfull:fix-chainwork, r=daira
Update minimum chain work on testnet to reflect Heartwood activation.
2020-05-20 06:45:44 +00:00
Sean Bowe 5a955674a5
Bump the protocol version, as this node supports Heartwood on mainnet. 2020-05-19 14:38:53 -06:00
Sean Bowe d0c96683bf
Set the Heartwood activation height to 903000. 2020-05-19 14:38:49 -06:00
Homu ed9537f9dd Auto merge of #4529 - daira:fix-abort-on-reindex, r=daira
Fix a null pointer dereference that occurs when formatting an error message

This fixes a bug in the error message printout for the case when we have sufficient chain work, but an expected network upgrade has not activated.
2020-05-19 19:33:31 +00:00
Daira Hopwood cb7c90522d Explicitly assert that chainActive[upgrade.nActivationHeight] is non-null at this point.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-19 20:13:37 +01:00
Alfredo Garcia 1805466d5c add MINOR_CURRENCY_UNIT 2020-05-18 16:53:01 -03:00
Alfredo Garcia 507e1623f9 simplify inzat balances logic
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2020-05-18 16:53:01 -03:00
Alfredo Garcia 25f48c21dd add amountZat field to z_listreceivedbyaddress 2020-05-18 16:53:01 -03:00
Alfredo Garcia 76e7f21d4a add amountZat field to listunspent 2020-05-18 16:52:04 -03:00
Alfredo Garcia 9a55c8b238 add amountZat field to listtransactions, gettransaction and listsinceblock 2020-05-18 16:51:24 -03:00
Alfredo Garcia 2ec9ac3c81 add amountZat field to listreceivedbyaddress and listreceivedbyaccount 2020-05-18 16:49:39 -03:00
Alfredo Garcia 306270911e add boolean inZat to z_getbalance 2020-05-18 16:47:17 -03:00
Alfredo Garcia 50372cab62 add boolean inZat to getbalance 2020-05-18 16:47:17 -03:00
Alfredo Garcia d2c26b33e0 add boolean inZat to getreceivedbyaccount 2020-05-18 16:47:17 -03:00
Alfredo Garcia 4155db0325 change argument name 2020-05-18 16:47:17 -03:00
Alfredo Garcia aba1d94673 add documentation to flag 2020-05-18 16:47:17 -03:00
Alfredo Garcia 4b61aede28 add bool argument to get balance in satoshis to rpc getreceivedbyaddress 2020-05-18 16:47:17 -03:00
Sean Bowe ecafe6913c
Update minimum chain work on testnet to reflect Heartwood activation. 2020-05-18 09:59:34 -06:00
Homu 1eff1f98b6 Auto merge of #4526 - defuse:update-univalue, r=daira
Add univalue to updatecheck.py and update it to v1.1.1
2020-05-17 18:12:13 +00:00
Daira Hopwood a76e568800 Fix a null pointer dereference that occurs when formatting an error message, if we haven't activated an upgrade as expected.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-16 00:26:44 +01:00