Commit Graph

13625 Commits

Author SHA1 Message Date
Kris Nuttycombe 37b4faab6a
Pass by const reference where possible.
Co-authored-by: Larry Ruane <larry@z.cash>
2020-07-07 09:41:32 -06:00
Kris Nuttycombe 88c5bf7217
Minor help message correction.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-06 15:41:28 -06:00
Kris Nuttycombe f9b10b866e Trivial comment correction. 2020-07-06 13:15:27 -06:00
Kris Nuttycombe 90fc879492 Move test-only code into test sources. 2020-07-06 13:09:49 -06:00
Kris Nuttycombe 0141aacc67 Add `RegtestDeactivateCanopy` calls to restore shared regtest params. 2020-07-06 12:47:12 -06:00
Kris Nuttycombe 8b363e9a70 Fix funding stream end-height-exclusion bugs 2020-07-06 10:52:41 -06:00
Kris Nuttycombe fccf37844b Fix pyflakes. 2020-07-02 16:54:49 -06:00
Kris Nuttycombe 834911c0d7 Update HalvingHeight documentation. 2020-07-02 14:30:06 -06:00
Kris Nuttycombe 49ea02925e Merge branch 'zip-207' of github.com:str4d/zcash into zip-207 2020-07-02 13:33:09 -06:00
Kris Nuttycombe d9088ab050
Record-constructor syntax for funding stream initialization.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-02 13:32:23 -06:00
Kris Nuttycombe 4d223f9797 Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-02 13:24:45 -06:00
Kris Nuttycombe 5f20ef3c9d Minor naming change FundingStreamShare -> FundingStreamElement 2020-07-02 12:15:26 -06:00
Kris Nuttycombe b17f263c20
Capitalization fixes from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-02 09:58:12 -06:00
Kris Nuttycombe aff38f75f3
Qualified imports of std:: types
Co-authored-by: str4d <thestr4d@gmail.com>
2020-07-01 16:06:27 -06:00
Kris Nuttycombe bf381ad580
Replace BOOST_FOREACH with for..:
Co-authored-by: str4d <thestr4d@gmail.com>
2020-07-01 16:05:30 -06:00
Homu eed865052b Auto merge of #4579 - rvagg:rvagg/joinSplitRPC, r=str4d
Add joinSplitPubKey and joinSplitSig to RPC

These two properties are required to fully reconstruct a Zcash transaction's binary form from the RPC data.
2020-06-30 23:02:47 +00:00
Rod Vagg a106c15a19
Add joinSplitPubKey and joinSplitSig to RPC
These two properties are required to fully reconstruct a Zcash
transaction's binary form from the RPC data.

Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-30 21:47:51 +10:00
Kris Nuttycombe 92cec200ee Minor fixes for ZIP-207 review comments. 2020-06-29 16:13:08 -06:00
Kris Nuttycombe 074d054e84
Trivial error message fix.
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:54:07 -06:00
Kris Nuttycombe 665b8c647b
Use for..: rather than BOOST_FOREACH
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:53:41 -06:00
Kris Nuttycombe 1c00a0b541
Identify `-fundingstream` parameter as being regtest-only
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:42:45 -06:00
Jack Grigg efd04b920b Implement zip-207 and zip-214.
Add funding streams to consensus parameters.

Add funding stream payments to coinbase txns generated by the miner.
* Reduce valueBalance for shielded outputs to funding streams.
* Ensure we produce binding signatures in any case where shielded
  outputs go to either a funding stream or the miner.
2020-06-25 16:15:50 -06:00
Homu ab2b7c0969 Auto merge of #4566 - gtank:new_seeders, r=ebfull
Add Foundation's and gtank's DNS seeders

This adds our new DNS seeders to the list. They're running [CoreDNS](https://coredns.io) with a [Zcash crawler plugin](https://github.com/ZcashFoundation/dnsseeder), the result of a Zcash Foundation in-house development effort to replace zcash-seeder with something memory safe and easier to maintain.

These are validly operated seeders per the existing policy (https://zcash.readthedocs.io/en/latest/rtd_pages/dnsseed_policy.html):

> A DNS seed operating organization or person is expected to follow good host security practices, maintain control of applicable infrastructure, and not sell or transfer control of the DNS seed. Any hosting services contracted by the operator are equally expected to uphold these expectations.

In both cases the code is running on well-operated public cloud infrastructure in either a container or the most sandboxing appropriate to the environment. The DNS records pointing to the seeders are controlled by reputable third-party DNS providers under accounts with 2FA enabled.

> The DNS seed results must consist exclusively of fairly selected and functioning Zcash nodes from the public network to the best of the operator’s understanding and capability.

The crawler attempts to connect to all discoverable Zcash peers and ensures their continued uptime on a regular basis. The results are always a uniformly randomized subset of all known live peers.

> For the avoidance of doubt, the results may be randomized but must not single out any group of hosts to receive different results unless due to an urgent technical necessity and disclosed.

See above. However, we reserve the right to begin offering [NU-targeted results](https://github.com/ZcashFoundation/dnsseeder/issues/3) based on opt-in client queries.

> The results may not be served with a DNS TTL of less than one minute.

Mainnet results are served with a TTL of 600 seconds, and Testnet results with a TTL of 300 seconds to account for greater flux on that network.

> Any logging of DNS queries should be only that which is necessary for the operation of the service or urgent health of the Zcash network and must not be retained longer than necessary nor disclosed to any third party.

There is no logging of DNS queries in either production configuration, which can be somewhat confirmed by examining the Corefile(s) [[1]](https://github.com/ZcashFoundation/coredns-zcash/blob/master/coredns/Corefile)[[2]](https://github.com/ZcashFoundation/coredns-zcash/blob/master/scripts/gcp-start.sh#L9-L27) we use.

> Information gathered as a result of the operators node-spidering (not from DNS queries) may be freely published or retained, but only if this data was not made more complete by biasing node connectivity (a violation of expectation (1)).

The seeder currently has no persistence outside of its static config file, so this data is neither retained nor shared by the operators.

> Operators are encouraged, but not required, to publicly document the details of their operating practices.

Our deployments are described in detail by the [coredns-zcash](https://github.com/ZcashFoundation/coredns-zcash) repo. Reader, you could run one too!

> A reachable email contact address must be published for inquiries related to the DNS seed operation.

For general questions related to either seeder, contact george@zfnd.org or mention @gtank in the Foundation's Discord. For bug reports, open an issue on the [dnsseeder](https://github.com/ZcashFoundation/dnsseeder) repo.
2020-06-25 00:44:33 +00:00
Homu a23aa9113e Auto merge of #4582 - daira:remove-cs_ParamsIO, r=daira
Remove an unused CCriticalSection.

The code that used this was removed in 5f84491d82.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-06-24 19:04:38 +00:00
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
George Tankersley 27b8a616de Add ZF and gtank's DNS seeders 2020-06-10 21:10:43 -04:00
Homu 552482a404 Auto merge of #3913 - str4d:smoke-tests, r=str4d
Automated smoke tests

Usage:

```
ZCASHD=./src/zcashd ZCASHCLI=./src/zcash-cli ./qa/zcash/smoke_tests.py --wallet=wallet.smoketest.dat "$HOME/.zcash"
```

Includes code cherry-picked from bitcoin/bitcoin#7751.
2020-06-04 22:17:48 +00: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
Daira Hopwood 270a724c87
Remove unused import in qa/rpc-tests/listtransactions.py
Co-authored-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
2020-06-03 12:25:31 +01: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
Homu 6d9573c66e Auto merge of #4552 - oxarbitrage:patch-5, r=str4d
Initialize size_t in CTxMemPool::DynamicMemoryUsage before using it

Closes https://github.com/zcash/zcash/issues/4551
2020-06-02 01:50:40 +00: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 76cb4e8d04 remove not needed comments from wallet.py 2020-05-29 11:24:39 -03:00
Homu 3ded976d31 Auto merge of #4546 - daira:nu4-to-canopy, r=str4d
Rename NU4 to Canopy in constant and function names

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-29 09:15:59 +00:00
Daira Hopwood 1527e5b3ca Missing NU4->Canopy renames.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-29 10:02:50 +01:00
Daira Hopwood 22b8574d9e Rename golden/nu4.tar.gz to canopy.tar.gz.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-29 01:30:30 +01:00
Alfredo Garcia 3b9bd2da2f fix sort of options 2020-05-28 10:58:04 -03:00
Alfredo Garcia 7c84f4e98a fix test cases 2020-05-28 10:58:04 -03:00
Anthony Towns 83087be393 test: Add tests for `-debuglogfile` with subdirs 2020-05-28 10:58:04 -03:00
Wladimir J. van der Laan 42b025705f doc: Update release notes for `-debuglogfile` 2020-05-28 10:58:04 -03:00
Wladimir J. van der Laan 4de0ac3351 test: Add test for `-debuglogfile` 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 5a577c7630 qa: Add --automate flag to smoke tests 2020-05-28 23:04:58 +12:00