Commit Graph

17241 Commits

Author SHA1 Message Date
Kris Nuttycombe cb22267fa3
Merge pull request #6399 from str4d/6396-retroactive-zip-216
Retroactively enable ZIP 216 before NU5 activation
2023-02-10 17:36:11 -07:00
Kris Nuttycombe af4994c1ae
Merge pull request #6414 from zcash/version-5.4.0 2023-02-08 15:28:18 -07:00
Kris Nuttycombe 3ffa99f1ad
Merge pull request #6413 from zcash/release-v5.4.0
Release v5.4.0
2023-02-08 12:23:55 -07:00
Jack Grigg 774f2d8eda Document known issues in v5.4.0 release notes 2023-02-08 17:50:06 +00:00
Jack Grigg 0e277800bb make-release.py: Updated release notes and changelog for 5.4.0. 2023-02-08 17:21:10 +00:00
Jack Grigg 3ca7d806fa make-release.py: Updated manpages for 5.4.0. 2023-02-08 17:21:09 +00:00
Jack Grigg 4cb8973c22 make-release.py: Versioning changes for 5.4.0. 2023-02-08 17:07:58 +00:00
str4d 8b8fcddffa
Merge pull request #6406 from str4d/lower-reindex-lock-contention
Sleep for 200µs before each ActivateBestChainStep call
2023-02-07 20:36:17 +00:00
str4d 048af2d7a3
Adjust documentation of 200µs sleep
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-02-07 19:08:59 +00:00
str4d 932241595c
Merge pull request #6407 from str4d/6065-thin-lto
rust: Compile with ThinLTO
2023-02-06 21:33:21 +00:00
Jack Grigg 3c78835498 rust: Compile with ThinLTO
This should achieve similar performance gains to "fat" LTO (which we
were previously using) while taking substantially less time to run
(over 20s saved on a Ryzen 9 5950X).

Part of zcash/zcash#6065.
2023-02-06 18:43:51 +00:00
Daira Hopwood feec543abf
Merge pull request #6384 from daira/fix-github-deps
Change to a more recent URL format for GitHub archives
2023-02-06 14:13:09 +00:00
Jack Grigg e2cd1b761f Sleep for 200us before each ActivateBestChainStep call
This should lower the main thread's likelihood to immediately reacquire
cs_main after dropping it, which should help ThreadNotifyWallets and the
RPC methods to acquire cs_main more quickly.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-02-03 23:12:28 +00:00
Jack Grigg 9ce6753909 Retroactively enable ZIP 216 before NU5 activation
This completes the work started in zcash/zcash#6000.

Closes zcash/zcash#6396.
2023-02-02 22:48:00 +00:00
Charlie O'Keefe 251432966f
Merge pull request #6401 from nuttycom/version-5.4.0-back_merge
Back-merge version-5.4.0 changes to `master`.
2023-02-02 15:36:12 -07:00
Charlie O'Keefe b7d613b6ca
Merge pull request #6313 from str4d/6309-backport-blockassembler
Backport `BlockAssembler` class
2023-02-02 15:33:45 -07:00
Jack Grigg f789229a33 CreateNewBlock: Leave more space for Orchard shielded coinbase 2023-02-02 21:47:16 +00:00
Kris Nuttycombe bd2cabf6fd
Merge pull request #6391 from nuttycom/release-v5.4.0-rc4
Release v5.4.0-rc4
2023-02-01 19:51:10 -07:00
Charlie O'Keefe adfc721843
Merge pull request #6176 from nuttycom/metrics_docker_compose
Add a docker-compose.yml for prometheus/grafana metrics collection.
2023-02-01 18:19:37 -07:00
Kris Nuttycombe 7b28054e8b make-release.py: Updated release notes and changelog for 5.4.0-rc4. 2023-02-01 17:37:55 -07:00
Kris Nuttycombe 6abe21ba45 make-release.py: Updated manpages for 5.4.0-rc4. 2023-02-01 17:37:54 -07:00
Kris Nuttycombe 6ae749d4d9 make-release.py: Versioning changes for 5.4.0-rc4. 2023-02-01 17:35:05 -07:00
Kris Nuttycombe 582dc52b67 Add #6387 fix to v5.4.0 release notes. 2023-02-01 17:34:35 -07:00
Kris Nuttycombe 5fb4385c5a Postpone rustcxx and native_cxxbridge versions 1.0.89 2023-02-01 17:28:38 -07:00
Charlie O'Keefe e8ae3d97a1
Merge pull request #6394 from nuttycom/zmq_check_snprintf_return
Patch zeromq to check the return value of snprintf where necessary.
2023-02-01 17:19:45 -07:00
Kris Nuttycombe 141d7c29d3
Merge pull request #6236 from zcash/fix_tar_extractall
Adding tarfile member sanitization to extractall()
2023-02-01 16:33:34 -07:00
Kris Nuttycombe c6b1b98389 Apply suggestions from code review
Co-authored-by: Greg Pfeil <greg@technomadic.org>
2023-02-01 13:56:25 -07:00
Kris Nuttycombe 7024b7f5c0 Patch zeromq to check the return value of snprintf where necessary.
@daira identified an error in https://github.com/zeromq/libzmq/pull/4494
that we reproduced in zcash/zcash#6393. This adds @daira's patch from
https://github.com/zeromq/libzmq/pull/4507 to ensure we handle this
potential case of undefined behavior.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-02-01 12:31:13 -07:00
Kris Nuttycombe aef66f4845 Add a docker-compose.yml for prometheus/grafana metrics collection.
@str4d provided the zcashd-metrics dashboard.

Co-authored-by: Jack Grigg <jack@z.cash>
2023-02-01 08:51:23 -07:00
Kris Nuttycombe db0d0deef8
Merge pull request #6385 from rex4539/typos
Fix typo
2023-02-01 07:02:58 -07:00
Kris Nuttycombe 0fab09d46e
Merge pull request #6393 from nuttycom/fix/zeromq_macos_build
Patch uses of `sprintf` in `zeromq` that break the build on macOS
2023-01-31 21:26:33 -07:00
Kris Nuttycombe 9751b18207 Patch uses of `sprintf` in `zeromq` that break the build on macOS
Fixes #6006, #6296
2023-01-31 15:55:33 -07:00
Kris Nuttycombe 26dbee2c5f
Merge pull request #6387 from str4d/6004-orchard-reindex
Reset Orchard wallet state in `CWallet::ClearNoteWitnessCache`
2023-01-31 13:36:33 -07:00
str4d bb675d9799
Merge pull request #6390 from nuttycom/merge/version-5.4.0
Partial merge of v5.4.0 release content back to `master`.
2023-01-31 19:01:05 +00:00
Kris Nuttycombe 192804a081 Merge branch 'version-5.4.0' into 'master' 2023-01-30 21:19:54 -07:00
Jack Grigg 204950191c Reset Orchard wallet state in `CWallet::ClearNoteWitnessCache`
The general invariant in the wallet is that `CWallet::ChainTip` is only
called with sequential (either connecting or disconnecting) blocks. The
one exception to this is when starting `zcashd` with `-reindex`, which
creates a discontinuity: the node jumps back to the genesis block, and
`ThreadNotifyWallets` will similarly start notifying the wallet of the
entire chain again.

In Bitcoin Core, this behaviour was fine: there was no persistent cached
state that couldn't just be overwritten during the re-notification. For
Zcash however, wallets need to additionally maintain witnesses for notes
that are spendable, and these witnesses can generally only be amended by
sequential blocks.

For Sprout and Sapling, the discontinuity was handled by checking if a
reindex was occurring during `CWallet::InitLoadWallet`, and clearing the
witness caches in `CWallet::ClearNoteWitnessCache` if so. The witnesses
would then be rebuilt as the reindexed chain was re-connected during
`ActivateBestChain`.

The Orchard wallet stores its witnesses in a different structure on the
Rust side, so it wasn't being cleared at the same time. This meant that
when a full reindex was performed in one go, the sequentiality invariant
would be broken once `ThreadNotifyWallets` reached NU5 activation, and
the node would crash with a failed assertion (the issue at hand).

However, reindexing Zcash takes a long time, and has been historically
buggy for various reasons (e.g. crashing due to OOM). And due to a quirk
of how the `-rescan` behaviour is implemented, if a reindexing node is
restarted during its `ActivateBestChain` phase, on restart the node will
almost always trigger a rescan due to the wallet chain locator not
containing any hashes that match the on-start chain tip. And the first
thing that the rescan logic does is check whether the start of the
rescan is before NU5 activation, and reset the Orchard wallet if so.

We now reset the Orchard wallet unconditionally at the same time as we
clear the Sprout and Sapling witness caches. This additionally clears
spentness information that the Orchard wallet is storing, but that is
rebuilt during the reindex.

Closes zcash/zcash#5736.
Closes zcash/zcash#6004.
2023-01-31 00:28:30 +00:00
Jack Grigg 0d1e1ad438 Fix return type of `orchard_wallet_reset`
Part of zcash/zcash#6386.
2023-01-31 00:28:30 +00:00
Jack Grigg 51d62c652d qa: Add RPC test reproducing the Orchard reindex issue
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-01-31 00:28:30 +00:00
Kris Nuttycombe abda46722b
Merge pull request #6382 from nuttycom/defer_zbalance_deprecation
Defer z_getbalance and z_gettotalbalance disablement.
2023-01-30 16:57:07 -07:00
Dimitris Apostolou 4464f81061
Fix typo 2023-01-31 00:26:47 +02:00
Alex Morcos 05a1c41aac FIX: correctly measure size of priority block
(cherry picked from commit bitcoin/bitcoin@c2dd5a3c39)
2023-01-30 21:59:42 +00:00
Alex Morcos 43ce65399c FIX: Account for txs already added to block in addPriorityTxs
(cherry picked from commit bitcoin/bitcoin@a278764748)
2023-01-30 21:59:42 +00:00
Alex Morcos e6d4027888 Refactor CreateNewBlock to be a method of the BlockAssembler class
(cherry picked from commit bitcoin/bitcoin@4dc94d1036)

Zcash: Adapted to include our miner changes.
2023-01-30 21:59:42 +00:00
Kris Nuttycombe 70c9725cc3
Merge pull request #6365 from str4d/6333-cxx-orchard-frontier
rust: Migrate `OrchardMerkleFrontier` to `cxx`
2023-01-30 14:16:34 -07:00
Daira Hopwood 145f2c31ed Use a more recent URL format for GitHub release archives.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2023-01-30 20:29:04 +00:00
Kris Nuttycombe c9d6230e88 Defer z_getbalance and z_gettotalbalance disablement.
These disable-by-default changes need to be deferred until we
have a better replacement that provides a single source for
summary balance information.
2023-01-30 11:00:09 -07:00
Kris Nuttycombe f3b93f87f3
Merge pull request #6380 from zcash/release-v5.4.0-rc3
Release v5.4.0-rc3
2023-01-27 16:11:27 -07:00
Kris Nuttycombe d9a60c9d1e make-release.py: Updated release notes and changelog for 5.4.0-rc3. 2023-01-27 15:07:19 -07:00
Kris Nuttycombe 85440c7bf8 make-release.py: Updated manpages for 5.4.0-rc3. 2023-01-27 15:07:19 -07:00
Kris Nuttycombe 6e8404e9b3 make-release.py: Versioning changes for 5.4.0-rc3. 2023-01-27 15:03:29 -07:00