Commit Graph

13992 Commits

Author SHA1 Message Date
therealyingtong 7a1d119170 Add gtests for v2 plaintexts 2020-06-25 09:12:24 +08:00
therealyingtong 6402c589c6 Refactor SaplingNotePlaintext::decrypt
Break up plaintext decryption into height-dependent and non-height-dependent parts.
2020-06-25 09:12:24 +08:00
therealyingtong 3c8e970358 Check epk vs esk whenever caller has esk 2020-06-25 09:12:24 +08:00
therealyingtong e060d59890 Reject v1 plaintexts after grace period
SaplingNotePlaintext::decrypt() now has to be aware of consensus params and blockheight. Its callers in wallet, rpcwallet, and tests are updated accordingly.

TransactionBuilder is also modified to reject invalid leadBytes.

Co-authored by Daira Hopwood (daira@jacaranda.org)
2020-06-25 09:12:21 +08:00
Sean Bowe 56d4ef8333 Make transaction builder take the next block height into account for use of v2 note plaintexts. 2020-06-25 09:11:43 +08:00
Sean Bowe 4af761121d Require that shielded coinbase output note plaintexts are version 2 if Canopy is active.
Co-authored by Ying Tong (yingtong@electriccoin.co)
2020-06-25 09:11:31 +08: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
Taylor Hornby 8f5dbd3293 Enforce pre-release dependency update check in make-release.py 2020-06-24 18:14:47 -06:00
Taylor Hornby 44c35c6f68 Change release instructions to block the release when dependencies are not updated and not postponed. 2020-06-24 18:14:47 -06:00
Taylor Hornby 75876f477b Implement system for postponing dependency updates. 2020-06-24 18:14:47 -06:00
Larry Ruane 0219a97139 flush witness cache correctly
Rather than flushing the witness cache from FlushStateToDisk(), called
by ActivateBestChain() called by ProcessNewBlock(), do so from
ThreadNotifyWallets() after the wallet has updated the in-memory witness
data according to the new block, so it's always consistent on disk.
2020-06-24 16:49:59 -06:00
Sean Bowe 98c6bdbae8
Redirect git checkouts of ebfull/ed25519-zebra through our vendored sources in offline mode. 2020-06-24 14:08:25 -06: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
Larry Ruane 6335944784 add python test to reproduce bug 4301 2020-06-24 09:27:11 -06:00
Alfredo Garcia 26522d212b only allow duplicates for certain options of the config 2020-06-24 12:21:25 -03:00
Sean Bowe f29c731915
Minor adjustments to librustzcash and tests. 2020-06-23 16:35:19 -06:00
Sean Bowe ba04450945
Remove unused curve25519-dalek dev-dependency. 2020-06-23 16:29:51 -06:00
Sean Bowe 14bdf7e811
Remove bincode crate. 2020-06-23 15:38:59 -06:00
Sean Bowe 2a3527bfe8
Add test that a weird signature successfully validates. 2020-06-23 14:31:41 -06:00
Sean Bowe 3251bea45a
Enforce ZIP 215 rules upon activation of Canopy. 2020-06-23 13:17:29 -06:00
Sean Bowe 9f71fa1c09
Change to version of ed25519-zebra crate which is compliant with ZIP 215. 2020-06-23 13:17:27 -06: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
Sean Bowe 3688f508d8
Make ed25519-zebra available via librustzcash. 2020-06-22 15:58:26 -06:00
Sean Bowe bf9baf2cb6 Change transaction builder and miner to use v2 Sapling note plaintexts after Canopy activates.
Co-authored by Ying Tong (yingtong@electriccoin.co)
2020-06-18 15:51:34 +08:00
Sean Bowe 8770a5c532 Add support for receiving v2 Sapling note plaintexts.
Co-authored by Ying Tong (yingtong@electriccoin.co)
2020-06-18 15:02:50 +08:00
Sean Bowe e71d2fba9d
Add a getter method to obtain rcm from a Sapling note plaintext. 2020-06-17 13:18:20 -06:00
Sean Bowe 1c2c6be872
Remove bare SaplingNote constructor. 2020-06-17 11:36:35 -06:00
Sean Bowe 6581970d59
Add implementations of PRF_expand calls that obtain esk and rcm. 2020-06-17 10:59:48 -06: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