Commit Graph

16750 Commits

Author SHA1 Message Date
Greg Pfeil cca3b070bb Eliminate indirection for debug log
Many error messages would say "see debug.log" or similar, without
indicating where the debug log actually lives. This now prints the
actual path in those cases.

It also changes more general uses of "debug.log" to "debug log", since
the file name may not even be "debug.log" if the user has specified it.
2022-08-17 09:02:40 -06:00
str4d e9b4a1af09
Merge pull request #6116 from str4d/update-rust-deps-with-audits
rust: Update some of the pinned dependencies
2022-08-17 13:58:02 +01:00
Jack Grigg a2b971befb rust: Update some of the pinned dependencies
The primary purpose of this commit is an exercise in using `cargo vet`
for tracking audits of our Rust dependency updates. `cargo update` was
run, and then a simple-to-audit subset of the dependency updates were
audited and committed.
2022-08-17 10:39:38 +00:00
Jack Grigg 3bf9022d51 CI: Migrate to published versions of cargo-vet 2022-08-17 08:20:39 +00:00
ebfull 317ce50622
Merge pull request #6112 from str4d/rust-1.63
depends: Update Rust to 1.63.0
2022-08-11 11:37:21 -06:00
Jack Grigg e27190d00a depends: Update Rust to 1.63.0 2022-08-11 15:51:57 +00:00
str4d 81764889c8
Merge pull request #6071 from str4d/llvm-14
Migrate to LLVM 14
2022-08-11 03:47:54 +01:00
Kris Nuttycombe df6e05173e
Merge pull request #6083 from zcash/leveldb-1.22
Update LevelDB to 1.22+
2022-08-10 18:14:43 -06:00
Jack Grigg 12c36670fe depends: Update Clang / libcxx to LLVM 14.0.6
In practice we are using 14.0.0 in most cases, as the LLVM Project have
not published Ubuntu binaries for any point release after 14.0.0 (which
we are using here).
2022-08-10 23:10:40 +00:00
Jack Grigg 93422e8fe2 depends: Update Rust to 1.62.1 2022-08-10 22:57:46 +00:00
Daira Hopwood f38db34693 Add contrib/debian/copyright entry for crc32c.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-07-28 19:08:02 +01:00
Kris Nuttycombe 92b21576e0
Merge pull request #6101 from zcash/version-5.2.0
Version 5.2.0
2022-07-26 13:55:54 -06:00
Kris Nuttycombe d6d2093beb
Merge pull request #6099 from ebfull/release-v5.2.0
Release v5.2.0
2022-07-26 09:03:35 -06:00
Sean Bowe b63dc026c7
make-release.py: Updated release notes and changelog for 5.2.0. 2022-07-25 12:42:25 -06:00
Sean Bowe 011092e608
make-release.py: Updated manpages for 5.2.0. 2022-07-25 12:42:25 -06:00
Sean Bowe 9d8e85373e
make-release.py: Versioning changes for 5.2.0. 2022-07-25 12:38:28 -06:00
Kris Nuttycombe b3ac8ee76d
Merge pull request #6098 from daira/narrow-too-many-args
Update to cxx 1.0.72 and narrow use of `#[allow(clippy::too_many_arguments)]`
2022-07-25 11:48:24 -06:00
Kris Nuttycombe 4a17098b72
Merge branch 'version-5.2.0' into narrow-too-many-args 2022-07-25 10:42:15 -06:00
Daira Hopwood fe9dc18003 Narrow the use of `#![allow(clippy::too_many_arguments)]` in src/rust/src/sapling.rs.
This depends on the fix for https://github.com/dtolnay/cxx/issues/1061 in cxx 1.0.70.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-07-25 14:57:19 +01:00
Daira Hopwood a227652d7d Update cxx to 1.0.72.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-07-25 14:57:19 +01:00
Daira Hopwood 315f534b23
Merge pull request #6095 from superbaud/fix-gitian-5.2.0
Add cuckoocache.h to Makefile.am
2022-07-24 02:39:54 +01:00
sasha d326b8ba45 Add cuckoocache.h to Makefile.am
Like c85fae833e, the missing header ref
means that the `make dist` step of gitian builds don't include it in the
tarball, causing an error upon build.
2022-07-22 18:00:59 -07:00
Kris Nuttycombe 9186131098 Fix incomplete release notes for witness pruning. 2022-07-22 17:14:28 -06:00
Kris Nuttycombe 18223753ee
Merge pull request #6093 from nuttycom/release-v5.2.0-rc1
Release v5.2.0 rc1
2022-07-22 17:06:03 -06:00
Kris Nuttycombe c2f8318444 make-release.py: Updated release notes and changelog for 5.2.0-rc1. 2022-07-22 15:52:42 -06:00
Kris Nuttycombe 7125a164ad make-release.py: Updated manpages for 5.2.0-rc1. 2022-07-22 15:49:26 -06:00
Kris Nuttycombe 5671ed3f9d make-release.py: Versioning changes for 5.2.0-rc1. 2022-07-22 15:49:26 -06:00
Kris Nuttycombe c6da56c216 Update release notes for v5.2.0.
This also updates the v5.1.0 release notes with a change that had
been previously missed.
2022-07-22 15:40:52 -06:00
Kris Nuttycombe e48d26eeb9 qa: Postpone recent native_rust, native_cxxbridge and rustcxx updates 2022-07-22 14:56:22 -06:00
Kris Nuttycombe e3e5465438
Merge pull request #6088 from str4d/wallet-batch-scanner
Use multithreaded batched trial decryption for Sapling outputs
2022-07-22 14:09:50 -06:00
Daira Hopwood 7d1e14ac3d Use crossbeam-channel instead of std::sync::mpsc.
See https://github.com/zcash/zcash/pull/6088#issuecomment-1192806433 for rationale.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-07-22 19:34:50 +01:00
Daira Hopwood ee4a427519 Apply doc suggestions from code review 2022-07-22 19:34:50 +01:00
Jack Grigg 1caf6f70df wallet: Domain-separate batched txids with a "block tag"
Previously when a transaction was queried for batch trial decryption, we
identified it by its txid. This is sufficient to uniquely identify the
transaction within the wallet, but was _not_ sufficient to uniquely
identify it within a `ThreadNotifyWallets` loop. In particular, when a
reorg occurs, and the same transaction is present in blocks on both
sides of the reorg (or is reorged into the mempool and then conflicted
out):

- The first occurrence would batch the transaction's outputs and store a
  result receiver.
- The second occurrence would overwrite the first occurrence's result
  receiver with its own.
- The first occurrence would read the second's result receiver (which
  has identical results to the first batch), removing it from the
  `pending_results` map.
- The second occurrence would not find any receiver in the map, and
  would mark the transaction as having no decrypted results.

We fix this by annotating each batched transaction with the hash of the
block that triggered it being trial-decrypted: either the block being
disconnected, the block being connected, or the null hash to indicate
a new transaction in the mempool. This is sufficient to domain-separate
all possible sources of duplicate txids:

- If a transaction is moved to the mempool via a block disconnection, or
  from the mempool (either mined or conflicted) via a block connection,
  its txid will appear twice: once with the block in question's hash,
  and once with the null hash.
- If a transaction is present in both a disconnected and a connected
  block (mined on both sides of the fork), its txid will appear twice:
  once each with the two block's txids.

Both of the above rely on the assumption that block hashes are collision
resistant, which in turn relies on SHA-256 being collision resistant.
2022-07-22 15:54:25 +00:00
Jack Grigg 20e6710fc6 wallet: Enforce an assumption about how wallet data evolves
We never delete IVKs from the wallet, so the amount of data that can be
decrypted should strictly increase.
2022-07-22 15:53:11 +00:00
Jack Grigg 8fadcb97e1 wallet: Use batch trial decryption for Sapling outputs 2022-07-22 15:53:10 +00:00
Jack Grigg 8190815526 rust: Implement multithreaded batched trial decryption for Sapling 2022-07-22 15:46:41 +00:00
Jack Grigg f447e33aad wallet: Migrate `CWallet` to `CValidationInterface::InitBatchScanner`
In this commit, the new `WalletBatchScanner` performs the same
single-threaded trial decryption as before; we've just migrated to the
batching APIs.
2022-07-22 15:46:39 +00:00
Jack Grigg 87d6ad1be4 wallet: Pass `Consensus::Params` into `CWallet::FindMySaplingNotes` 2022-07-22 15:42:29 +00:00
Jack Grigg 576d1b7134 wallet: Add `BatchScanner` interface to `CValidationInterface`
`CValidationInterface` listeners can either listen directly to
`CValidationInterface::SyncTransaction` as they currently do, or they
can listen to `CValidationInterface::InitBatchScanner` and then process
transactions via `BatchScanner::SyncTransaction`. The latter approach
allows listeners to perform trial decryption via whatever strategy is
most optimal for them.
2022-07-22 15:42:29 +00:00
str4d 37047d5d6c
Merge pull request #6082 from zcash/sha256-asm
Backport SHA-256 assembly optimisations
2022-07-21 21:28:18 +01:00
str4d 26d41818ad
Minor fixes to documentation
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-07-21 09:37:03 +01:00
str4d 768850e237
Merge pull request #5287 from furszy/2021_restructure_incrementWitnesses
[Wallet] Restructure increment witnesses workflow
2022-07-19 19:23:17 +01:00
furszy bed3c9ee3e Use references instead of pointers where possible.
Also, rename WitnessNoteIfMine -> WitnessMyNoteIfNecessary
and apply other suggestions from code review

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-07-19 09:59:22 -06:00
furszy 8fb46c794e Rework Sprout and Sapling witnesses increment and cache workflow, so it does not loop over the entire wallet txs map indiscriminately.
From:
```
1) for-each tx in wallet : call CopyPreviousWitnesses.
2) for-each tx in block:
   a) for-each note in tx:
      a1) for-each tx in wallet : call AppendNoteCommitment.
      a2) if note is mine : call WitnessNoteIfMine.
3) for-each tx in wallet : call UpdateWitnessHeights.
```

To:

```
1) for-each tx in block:
   a) gather note commitments in vecComm.
   b) witness note if ours.
2) for-each shield tx in wallet:
   a) copy the previous witness.
   b) append vecComm notes commitment.
   c) Update witness last processed height.
```
2022-07-19 09:52:40 -06:00
furszy 54b55ebae6 Fix missing vector include and vector type definition 2022-07-19 07:22:24 -06:00
Kris Nuttycombe c1a18cab39
Merge pull request #6040 from nuttycom/test/persisted_sprout_chain
Add persistent test data to avoid needing to create new Sprout outputs in RPC tests.
2022-07-18 11:35:57 -06:00
Kris Nuttycombe 035a26b674 Replace setup_clean_chain with cache_behavior in rpc test init. 2022-07-18 09:00:34 -06:00
Kris Nuttycombe 6477c6165b Update getblocktemplate test to use persisted sprout chain 2022-07-18 09:00:34 -06:00
Kris Nuttycombe 91f62f4161 Update finalsaplingroot test to use persisted sprout chains. 2022-07-18 09:00:34 -06:00
Daira Hopwood dc7f3e74fb
Merge pull request #6084 from str4d/fix-connectblock-benchmarks
bench: Fix ConnectBlock large block benchmarks
2022-07-18 15:27:57 +01:00