Commit Graph

14996 Commits

Author SHA1 Message Date
Homu 8c95ceba46 Auto merge of #5078 - mdr0id:add_docker_debian11_builder, r=str4d
Add Debian 11 CI-Builder

Adding in commands for upcoming builders
2021-04-22 06:01:42 +00:00
mdr0id cb756bf725 clean up ubuntu 18.04 and 20.04 commands 2021-04-21 10:39:45 -07:00
mdr0id 4bb3d492e5 Add Debian 11 ci-builder 2021-04-21 10:35:45 -07:00
Homu 05c0c7c573 Auto merge of #5064 - str4d:5048-mutex-lock-failure, r=str4d
Prevent mutex lock fail even if --enable-debug

Cherry-picked from upstream PR bitcoin/bitcoin#15233.

Closes zcash/zcash#5048.
2021-04-20 07:20:46 +00:00
Akio Nakamura e3ed38d19c Prevent mutex lock fail even if --enable-debug
This PR intends to resolve #15227.

"configure --debug-enabled" enables "#ifdef DEBUG_LOCKORDER".
Then "lockdata" (in sync.cpp) will be initialized same as other
static objects.

But unfortunately, lockdata.push_lock() was called before its
initialization (via initializing signatureCache which is declared
in script/sigcache.cpp) on macOS.

This PR apply the "Construct On First Use Idiom" to "lockdata"
to prevent it.

(cherry picked from commit b09dab0f2de37be3c96f5087ee7bd61d7262aa76)
2021-04-20 15:11:57 +12:00
Homu 0e36226271 Auto merge of #5017 - LarryRuane:upstream-locking-0.16, r=str4d
Bitcoin 0.16 locking PRs

These are locking changes from upstream (bitcoin core) release 0.16 (Aug 14, 2017, to Feb 16, 2018), oldest to newest (when merged to the master branch).

Each commit also includes a reference both to the PR and the upstream commit.

- https://github.com/bitcoin/bitcoin/pull/11126
  - Excludes changes to wallet tests that we don't have.
- https://github.com/bitcoin/bitcoin/pull/10916
  - first commit only; second commit already merged by d9fcc2b558
- https://github.com/bitcoin/bitcoin/pull/11107
  - Only the last commit.
- https://github.com/bitcoin/bitcoin/pull/11593
- https://github.com/bitcoin/bitcoin/pull/11585
- https://github.com/bitcoin/bitcoin/pull/11618
- https://github.com/bitcoin/bitcoin/pull/10286
  - Only the third and last commits.
- https://github.com/bitcoin/bitcoin/pull/11870
- https://github.com/bitcoin/bitcoin/pull/12330
- https://github.com/bitcoin/bitcoin/pull/12366
- https://github.com/bitcoin/bitcoin/pull/12368
- https://github.com/bitcoin/bitcoin/pull/12333
  - Only the first commit.
2021-04-17 03:52:26 +00:00
Homu 78de0cdf46 Auto merge of #5026 - str4d:bloom-filter-backports, r=str4d
Backport bloom filter improvements

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7113
- bitcoin/bitcoin#7818
  - Only the second commit (to resolve conflicts).
- bitcoin/bitcoin#7934
- bitcoin/bitcoin#8655
  - Partial backport to help resolve conflicts.
- bitcoin/bitcoin#9060
- bitcoin/bitcoin#9223
- bitcoin/bitcoin#9644
  - Partial backport to help resolve conflicts.
- bitcoin/bitcoin#9916
- bitcoin/bitcoin#9750
- bitcoin/bitcoin#13176
- bitcoin/bitcoin#13948
- bitcoin/bitcoin#16073
- bitcoin/bitcoin#18670
- bitcoin/bitcoin#18806
  - Reveals upstream's covert fix for CVE-2013-5700.
- bitcoin/bitcoin#19968
2021-04-15 20:40:26 +00:00
Homu 4066324ae5 Auto merge of #5061 - str4d:release-v4.4.0, r=str4d
Release v4.4.0
2021-04-15 07:20:27 +00:00
Jack Grigg ad1c30873d make-release.py: Updated release notes and changelog for 4.4.0. 2021-04-15 16:55:39 +12:00
Jack Grigg a32841d999 make-release.py: Updated manpages for 4.4.0. 2021-04-15 16:55:39 +12:00
Jack Grigg c54fdeed35 make-release.py: Versioning changes for 4.4.0. 2021-04-15 16:42:53 +12:00
Homu 5ccaf89acc Auto merge of #5060 - str4d:book-fix-metrics-example, r=str4d
book: Fix comment in metrics example, and clarify usage
2021-04-15 02:12:29 +00:00
Jack Grigg 0342eb2212 book: Fix comment in metrics example, and clarify usage 2021-04-15 12:41:18 +12:00
Homu 4c60e8d6db Auto merge of #5059 - str4d:postpone-clang-12, r=str4d
Postpone Clang 12

We won't migrate to LLVM 12 until Rust does.
2021-04-15 00:14:05 +00:00
Jack Grigg 3cdda83868 Postpone Clang 12
We won't migrate to LLVM 12 until Rust does.
2021-04-15 12:10:50 +12:00
Homu 7279efdf55 Auto merge of #5058 - str4d:minor-cleanups, r=str4d
Minor cleanups
2021-04-14 03:26:57 +00:00
Jack Grigg f92f7adba6 clean.sh: Remove secp256k1 test log
Closes zcash/zcash#5054.
2021-04-14 13:30:25 +12:00
Jack Grigg c592bf7da0 python: Use UTF-8 encodings for opened files 2021-04-14 13:19:33 +12:00
Jack Grigg 434f32151c Fix include guards 2021-04-14 12:54:12 +12:00
Jack Grigg b2f01b1e4a Remove duplicate / unused includes 2021-04-14 12:53:06 +12:00
Jack Grigg b6162e5b4f scripted-diff: Remove direct usages of boost::filesystem
These were merged in an old PR that was created before we backported
src/fs.h.

-BEGIN VERIFY SCRIPT-
sed -i 's/boost::filesystem/fs/g' ./src/addrdb.*
-END VERIFY SCRIPT-
2021-04-14 12:52:15 +12:00
João Barbosa 5b2f7a6ea7 [wallet] Make CWallet::ListCoins atomic
zcash: Not an actual locking fix; just eliminates unnecessary recursive
zcash: locking (which is a long-term goal).
zcash: cherry picked from commit 1beea7af92994dca83facb11bbef82b24b538400
zcash: https://github.com/bitcoin/bitcoin/pull/12333
2021-04-12 17:15:23 -06:00
Matt Corallo 829e801fd9 Add braces to meet code style on line-after-the-one-changed.
zcash: cherry picked from commit 02fc8863630a20e75230f8bc3ba1051c480ae560
zcash: https://github.com/bitcoin/bitcoin/pull/12368
2021-04-12 17:15:23 -06:00
Matt Corallo a4730c8a0e Hold mempool.cs for the duration of ATMP.
This resolves an issue where getrawmempool() can race mempool
notification signals. Intuitively we use mempool.cs as a "read
lock" on the mempool with cs_main being the write lock, so holding
the read lock intermittently while doing write operations is
somewhat strange.
This also avoids the introduction of cs_main in getrawmempool()
which reviewers objected to in the previous fix in #12273

zcash: cherry picked from commit 85aa8398f5d13c659299b81cdae377462b4f8316
zcash: https://github.com/bitcoin/bitcoin/pull/12368
2021-04-12 17:15:23 -06:00
Wladimir J. van der Laan cbd11135ff http: Remove numThreads and ThreadCounter
The HTTP worker thread counter, as well as the RAII object that was used
to maintain it, is unused now, so can be removed.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>

zcash: cherry picked from commit 11e01515fe0fbc7823d4111ad6e016a02c485a78
zcash: https://github.com/bitcoin/bitcoin/pull/12366
2021-04-12 17:15:23 -06:00
Wladimir J. van der Laan c733ded07d http: Remove WaitExit from WorkQueue
This function, which waits for all threads to exit, is no longer needed
now that threads are joined instead.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>

zcash: cherry picked from commit f94665466ed50e868c98b1a1c708ad5767727bb6
zcash: https://github.com/bitcoin/bitcoin/pull/12366
2021-04-12 17:15:22 -06:00
Wladimir J. van der Laan 0dcbfc9147 http: Join worker threads before deleting work queue
This prevents a potential race condition if control flow ends up in
`ShutdownHTTPServer` before the thread gets to `queue->Run()`,
deleting the work queue while workers are still going to use it.

Meant to fix #12362.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>

zcash: cherry picked from commit b1c2370dde9ade180c638e5d9a4797f085322b5b
zcash: https://github.com/bitcoin/bitcoin/pull/12366
2021-04-12 17:15:22 -06:00
João Barbosa 25b8cdce25 [rpc] Reduce scope of cs_main and cs_wallet locks in listtransactions
zcash: cherry picked from commit c409b1adac59329b78b8c48f131f8ca032988412
zcash: https://github.com/bitcoin/bitcoin/pull/12330
2021-04-12 17:15:22 -06:00
João Barbosa 3d29bb2132 wallet: Remove unnecessary mempool lock in ReacceptWalletTransactions
zcash: cherry picked from commit 5b252934362c2971e521df56c26ced56f07deb72
zcash: https://github.com/bitcoin/bitcoin/pull/11870
2021-04-12 17:15:22 -06:00
Matt Corallo 3145dce2d8 Remove redundant pwallet nullptr check
zcash: cherry picked from commit 89f03120a02690cff8399d77c979169355bf9cae
zcash: https://github.com/bitcoin/bitcoin/pull/10286
2021-04-12 17:15:22 -06:00
Matt Corallo 756a33ace4 Add ability to assert a lock is not held in DEBUG_LOCKORDER
zcash: cherry picked from commit 2b4b34503ff0ed44365d83a68ffed2736ea9cc51
zcash: https://github.com/bitcoin/bitcoin/pull/10286
2021-04-12 17:15:22 -06:00
practicalswift d8926263b7 Add missing cs_main locks when calling blockToJSON/blockheaderToJSON
zcash: cherry picked from commit a9b6ba0b7cd27a64307987afaab7f60bf9b4a15b
zcash: https://github.com/bitcoin/bitcoin/pull/11618
2021-04-12 17:15:22 -06:00
practicalswift 29eb55cc28 addrman: Add missing lock in Clear() (CAddrMan)
The variable vRandom is guarded by the mutex cs.

zcash: cherry picked from commit 3ab545d7f8e979e2cabeff6f5f6f1afe94a5c195
zcash: https://github.com/bitcoin/bitcoin/pull/11585
2021-04-12 17:15:22 -06:00
Cory Fields af7914242d rpc: further constrain the libevent workaround
The bug was introduced in 2.1.6-beta, versions before that don't need the
workaround.

zcash: currently, we build with libevent-2.1.12, so this fix is needed
zcash: cherry picked from commit 97932cd2689659addfbb58dc6148928b73af3bd0
zcash: https://github.com/bitcoin/bitcoin/pull/11593
2021-04-12 17:15:22 -06:00
Cory Fields 92d8f1d5cc rpc: work-around an upstream libevent bug
A rare race condition may trigger while awaiting the body of a message, see
upsteam commit 5ff8eb26371c4dc56f384b2de35bea2d87814779 for details.

This may fix some reported rpc hangs/crashes.

zcash: currently, we build with libevent-2.1.12, so this fix is needed
zcash: cherry picked from commit 6b58360f9b64eb0b680a662fdfd590e47f115f44
zcash: https://github.com/bitcoin/bitcoin/pull/11593
2021-04-12 17:15:22 -06:00
MeshCollider ea9bcc4774 Make fUseCrypto atomic
zcash: cherry picked from commit c626dcb50eed496462fd4ac3e05bf79164749ebe
zcash: https://github.com/bitcoin/bitcoin/pull/11107
2021-04-12 17:15:22 -06:00
Marko Bencun 2fd8809300 keystore GetKeys(): return result instead of writing to reference
Issue: #10905

By returning the result, a few useless lines can be removed.

Return-value-optimization means there should be no copy.

zcash: cherry picked from commit 5cb3da04b8882ca975b4e3d6c089c64bbaf67d0d
zcash: https://github.com/bitcoin/bitcoin/pull/10916
2021-04-12 17:15:22 -06:00
Russell Yanofsky e0a1266024 Acquire cs_main lock before cs_wallet during wallet initialization
CWallet::MarkConflicted may acquire the cs_main lock after
CWalletDB::LoadWallet acquires the cs_wallet lock during wallet initialization.
(CWalletDB::LoadWallet calls ReadKeyValue which calls CWallet::LoadToWallet
which calls CWallet::MarkConflicted). This is the opposite order that cs_main
and cs_wallet locks are acquired in the rest of the code, and so leads to
POTENTIAL DEADLOCK DETECTED errors if bitcoin is built with -DDEBUG_LOCKORDER.

This commit changes CWallet::LoadWallet (which calls CWalletDB::LoadWallet) to
acquire both locks in the standard order. It also fixes some tests that were
acquiring wallet and main locks out of order and failed with the new locking in
CWallet::LoadWallet.

Error was reported by Luke Dashjr <luke-jr@utopios.org> in
https://botbot.me/freenode/bitcoin-core-dev/msg/90244330/

zcash: cherry picked from commit de9a1db2ed14e0c75ffd82dc031f7ad30c56d195
zcash: https://github.com/bitcoin/bitcoin/pull/11126
2021-04-12 17:15:22 -06:00
Homu 3e53b40e25 Auto merge of #5055 - str4d:release-v4.4.0-rc1, r=str4d
Release v4.4.0-rc1
2021-04-09 06:43:08 +00:00
Jack Grigg 30f68da525 make-release.py: Updated release notes and changelog for 4.4.0-rc1. 2021-04-09 17:40:36 +12:00
Jack Grigg 253da68a2d make-release.py: Updated manpages for 4.4.0-rc1. 2021-04-09 17:40:36 +12:00
Jack Grigg f4d88aec20 make-release.py: Versioning changes for 4.4.0-rc1. 2021-04-09 17:32:49 +12:00
Homu 71f39c5013 Auto merge of #5047 - str4d:bump-dep-postpones, r=daira
Bump dependency postponements
2021-04-08 15:35:33 +00:00
Homu cbc475fd48 Auto merge of #4965 - str4d:secp256k1-update, r=daira
Update libsecp256k1 subtree

The first subtree merge brings us to the same commit as upstream (bitcoin/bitcoin#20257).

The second subtree merged brings us to current master, which includes most of our local changes.

After this, our remaining local changes are:
- 75f9f8f95b (the change to `secp256k1_scalar_get_b32`)
- e917cb614f (compile with C99)
2021-04-08 14:08:45 +00:00
Homu 76d3adc564 Auto merge of #5052 - daira:windows-ntdll-regression, r=daira
Link with ntdll library on Windows

This fixes a regression for builds targeting Windows introduced in #4947. It also includes a minor cleanup to fix a build warning.
closes #5051
2021-04-06 19:35:50 +00:00
Daira Hopwood 2a26a9726c Cleanup: get the definition of ENABLE_VIRTUAL_TERMINAL_PROCESSING from wincon.h.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-06 16:41:28 +01:00
Daira Hopwood f52260253c configure.ac: tidy up spacing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-06 16:40:31 +01:00
Daira Hopwood 78ab48669d configure.ac: Add check for ntdll on Windows.
This fixes #5051, which is a regression caused by the dependency on the ntapi crate
(via mio, via tokio) added by #4947.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-06 16:39:45 +01:00
Jack Grigg da77a3db73 qa: Postpone Boost 1.75.0
https://github.com/zcash/zcash/issues/4945 remains unresolved.
2021-04-03 17:26:16 +13:00
Jack Grigg c0e146d3f4 qa: Postpone updates that require CMake in the build system
We still aren't committing to that dependency yet.
2021-04-03 17:26:16 +13:00