Commit Graph

16455 Commits

Author SHA1 Message Date
practicalswift eeba670d94 Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror)
Zcash:
- Also added it to HARDENED_CXXFLAGS so we use it by default.
- We use -Werror if --enable-werror, so don't need the second part.

(cherry picked from commit bitcoin/bitcoin@4616c825a4)
2022-05-14 01:25:08 +00:00
Matt Corallo 8164dc35d7 Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost.
Commit 1.

This code was written by @TheBlueMatt in the following branch:
* https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923

This commit message was written by me (@practicalswift) who also squashed
@TheBlueMatt's commits into one and tried to summarize the changes made.

Commit 2.

Remove boost include. Remove boost mentions in comments.

(cherry picked from commit bitcoin/bitcoin@7e319d6393)
2022-05-14 01:25:08 +00:00
João Barbosa e5d2a3a5a2 Remove unused fTry from push_lock
(cherry picked from commit bitcoin/bitcoin@92848e5058)
2022-05-14 01:25:08 +00:00
practicalswift 85fdbf3af8 Remove unused code
Zcash: Excludes code that is still in use for us.

(cherry picked from commit bitcoin/bitcoin@8dc957ae06)
2022-05-14 01:25:08 +00:00
Matt Corallo b031444591 Further-enforce lockordering by enforcing directly after TRY_LOCKs
(cherry picked from commit bitcoin/bitcoin@618ee9249b)
2022-05-14 01:25:08 +00:00
Matt Corallo 2d636a2814 Fixup style a bit by moving { to the same line as if statements
(cherry picked from commit bitcoin/bitcoin@2a962d4540)
2022-05-14 01:25:08 +00:00
Matt Corallo 709b11769d Always enforce lock strict lock ordering (try or not)
(cherry picked from commit bitcoin/bitcoin@8465631845)
2022-05-14 01:25:08 +00:00
Matt Corallo c2b5cf6e51 Lock cs_vSend and cs_inventory in a consistent order even in TRY
Zcash: We haven't removed cs_vRecv yet, so left it in between.

(cherry picked from commit bitcoin/bitcoin@fd13eca147)
2022-05-14 01:25:08 +00:00
Matt Corallo dadbb36e29 Make the cs_sendProcessing a LOCK instead of a TRY_LOCK
Technically cs_sendProcessing is entirely useless now because it
is only ever taken on the one MessageHandler thread, but because
there may be multiple of those in the future, it is left in place

(cherry picked from commit bitcoin/bitcoin@376b3c2c6e)
2022-05-14 01:25:08 +00:00
Matt Corallo 53b8b43567 Split CNode::cs_vSend: message processing and message sending
cs_vSend is used for two purposes - to lock the datastructures used
to queue messages to place on the wire and to only call
SendMessages once at a time per-node. I believe SendMessages used
to access some of the vSendMsg stuff, but it doesn't anymore, so
these locks do not need to be on the same mutex, and also make
deadlocking much more likely.

(cherry picked from commit bitcoin/bitcoin@d7c58ad514)
2022-05-14 01:25:08 +00:00
Pieter Wuille 8489f27afa Do diskspace check before import thread is started
(cherry picked from commit bitcoin/bitcoin@9d4eb9ad99)
2022-05-14 01:25:08 +00:00
Pieter Wuille 084906c845 Use a signal to continue init after genesis activation
Zcash: We set the Sprout tree root on the genesis block's index file in
InitBlockIndex because we were implicitly relying on this occurring via
ActivateBestChain previously.

(cherry picked from commit bitcoin/bitcoin@0fd2a33648)
2022-05-14 01:25:08 +00:00
Kris Nuttycombe 730d245cea
Merge pull request #5952 from str4d/fix-cargo-patch-lint
lint: Fix cargo patches linter when no patches are present
2022-05-12 07:24:32 -06:00
str4d 70af58fa9d
Merge pull request #5950 from nuttycom/fix/copyright_dates
Fix Zcash developers copyright dates.
2022-05-12 14:21:24 +01:00
Jack Grigg 7b17b6f666 lint: Fix cargo patches linter when no patches are present 2022-05-12 11:19:52 +00:00
Kris Nuttycombe c545f64356 scripted-diff: Add 2021-2022 copyright headers for files added/modified in 2021
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM a960e896dd4c0b6d96db3d5ebbb1caa6c92a9f39..dfefab2f5587b873b02c4ed22ee3441d63f8a111 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2021-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:34:50 -06:00
Kris Nuttycombe 15d1bb6ce9 scripted-diff: Add 2020-2022 copyright headers for files added/modified in 2020
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 6a08c225674df23f1c7f214bcb94732dba688d39..a960e896dd4c0b6d96db3d5ebbb1caa6c92a9f39 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2020-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:32:39 -06:00
Kris Nuttycombe 940dd0d426 scripted-diff: Add 2019-2022 copyright headers for files added/modified in 2019
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 8df7a073ce13ec057b94b5a813bb5534cdfa6809..6a08c225674df23f1c7f214bcb94732dba688d39 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2019-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:29:59 -06:00
Kris Nuttycombe 73fcef8035 scripted-diff: Add 2018-2022 copyright headers for files added/modified in 2018
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM b2a114a8c99947b66d1fbdc70278f13e7a415d2a..8df7a073ce13ec057b94b5a813bb5534cdfa6809 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2018-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:28:03 -06:00
Kris Nuttycombe d9aeefc54a scripted-diff: Add 2017-2022 copyright headers for files added/modified in 2017
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 94f427a211bb337200c29a1e19be0f5ad2f171b0..b2a114a8c99947b66d1fbdc70278f13e7a415d2a -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2017-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:25:51 -06:00
Kris Nuttycombe 28040f9ce4 scripted-diff: Add 2016-2022 copyright headers for files added/modified in 2016
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM bitcoin-v0.11.2..94f427a211bb337200c29a1e19be0f5ad2f171b0 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2016-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:23:09 -06:00
Kris Nuttycombe 5ae1772d2b scripted-diff: Update Zcash copyrights to 2022
-BEGIN VERIFY SCRIPT-
git grep "// Copyright (c) .* The Zcash developers" \
  | awk -F ':' '{print $1}' \
  | xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 16:47:12 -06:00
Kris Nuttycombe 83c1938af3 Fix inconsistent caplitalization in copyright notices. 2022-05-11 16:40:25 -06:00
Kris Nuttycombe aeea89f704
Merge pull request #5948 from nuttycom/fix/nu5_release_notes_links
Fix incorrect links in 5.0.0 release notes.
2022-05-11 16:28:55 -06:00
Kris Nuttycombe 40c2d02997 Fix incorrect links in 5.0.0 release notes. 2022-05-11 14:54:22 -06:00
Kris Nuttycombe 8764f636e5
Merge pull request #5945 from zcash/version-5.0.0
Merge 5.0.0 release branch back to master.
2022-05-11 10:25:35 -06:00
Kris Nuttycombe cc1a52e89d
Merge pull request #5944 from nuttycom/release-v5.0.0
Release v5.0.0
2022-05-10 21:47:20 -06:00
Kris Nuttycombe 16b49eadd5 Update v5.0.0 release notes to note NU5 upgrade 2022-05-10 20:14:00 -06:00
Kris Nuttycombe ca7323cc77 Set NU5 activation height & bump protocol version. 2022-05-10 19:58:35 -06:00
Kris Nuttycombe 10fb705f45 make-release.py: Updated release notes and changelog for 5.0.0. 2022-05-10 19:52:28 -06:00
Kris Nuttycombe f97d83981f make-release.py: Updated manpages for 5.0.0. 2022-05-10 19:52:28 -06:00
Kris Nuttycombe 04d0da1391 make-release.py: Versioning changes for 5.0.0. 2022-05-10 19:48:53 -06:00
Kris Nuttycombe a4518b729e Revert "Set RELEASE_TO_DEPRECATION_WEEKS to 2 weeks to provide RC EOS halt."
This reverts commit 9fe516576f.
2022-05-10 19:46:24 -06:00
str4d 6c26d08970
Merge pull request #5943 from str4d/zcash_primitives-0.6
Migrate to `zcash_primitives 0.6` et al
2022-05-11 02:21:30 +01:00
str4d 4c2e9c34ac
Merge pull request #5938 from nuttycom/test/block_auth_data_root
Add tests to check auth data commitments committing to Orchard actions.
2022-05-11 02:14:07 +01:00
str4d dd8a9e938c
Merge pull request #5942 from nuttycom/deprecate_legacy_wallet_rpcs
Deprecate legacy RPCs & update rpc docs to clarify which are transparent-only.
2022-05-11 01:36:38 +01:00
Jack Grigg 5fc38dd091 Migrate to `zcash_primitives 0.6` et al 2022-05-11 00:04:34 +00:00
Kris Nuttycombe 113cfa3ec5 Update rpcwallet help to better distinguish transparent-only APIs.
Fixes #5675
2022-05-10 16:23:15 -06:00
Kris Nuttycombe 721e5d85ab Deprecate `getrawchangeaddress` and `z_listaddresses` 2022-05-10 16:23:15 -06:00
Kris Nuttycombe 1b8a9af946 Add tests to check auth data commitments committing to Orchard actions.
In the process of adding these tests, I also found and fixed a number
of type errors in Orchard auth data root computation.

Fixes #5223
2022-05-09 21:01:11 -06:00
Kris Nuttycombe c6ceeb1646
Merge pull request #5934 from nuttycom/fix/release-notes-typos
Fix typos in release notes & Orchard wallet internal API doc.
2022-05-09 12:52:35 -06:00
Kris Nuttycombe 7defcb8341
Merge pull request #5926 from nuttycom/deprecation/z_getbalance
Add z_get(total)balance to deprecation flags.
2022-05-09 12:52:16 -06:00
Kris Nuttycombe ac1f6799c2
Merge pull request #5935 from str4d/release-v5.0.0-rc1
Release v5.0.0-rc1
2022-05-09 11:00:20 -06:00
Kris Nuttycombe 8f2c15cf6f Include getbalance in recommendations for z_getbalance and z_gettotalbalance replacements.
Co-authored-by: str4d <thestr4d@gmail.com>
2022-05-09 10:32:56 -06:00
Kris Nuttycombe 75055882d4 Add missing parenthesis to -reindex help. 2022-05-09 10:13:39 -06:00
Jack Grigg 64ccad1a89 make-release.py: Updated release notes and changelog for 5.0.0-rc1. 2022-05-09 15:35:33 +00:00
Jack Grigg e7f04c1741 make-release.py: Updated manpages for 5.0.0-rc1. 2022-05-09 15:35:33 +00:00
Kris Nuttycombe f41ccaf244 Fix typos in release notes & Orchard wallet internal API doc. 2022-05-09 09:30:02 -06:00
Jack Grigg a51cbfc78c make-release.py: Versioning changes for 5.0.0-rc1. 2022-05-09 15:29:29 +00:00
Kris Nuttycombe 731df21da7 Fix a typo in the release script. 2022-05-09 09:12:46 -06:00