Commit Graph

19649 Commits

Author SHA1 Message Date
UdjinM6
c5cc285d0e
Merge pull request #4191 from kittywhiskers/checkqueue
partial #15842, merge #15849, #17342, #18710: Add local thread pool to CCheckQueue
2021-06-26 16:08:02 +03:00
Wladimir J. van der Laan
8878ae64e3
Merge #12306: Docs: Improvements to UNIX documentation
ee5e896 Organise Linux build instructions to be categorised by distro (Alex Vear)
4c85517 Add NetBSD build instruction links (Alex Vear)

Pull request description:

  * Added references to the newly created [`doc/build-netbsd.md`] (#12294) instructions in the [`doc/README.md`] and the [`doc/build-unix.md`] files.
  * Organise [`doc/build-unix.md`] dependency build instructions by Linux distribution. This will help discoverability of dependency build instructions for specific distros. Future instructions will also be able to be added easier.

  I am not quite sure about the FreeBSD instructions being in the [`doc/build-unix.md`], while both the OpenBSD and NetBSD instructions are contained within separate files ([`doc/build-openbsd.md`] and [`doc/build-netbsd.md`] respectively).

  Feedback is greatly appreciated. 😄

  [`doc/build-netbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-netbsd.md
  [`doc/build-unix.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
  [`doc/build-openbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-openbsd.md
  [`doc/README.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/README.md

Tree-SHA512: ebe2604d1802795851bbfce2335f159b53ea696bc9afb309be7825c697b992cc3963270fe945ca3e449b18522046e227fde3fae1b9c01bd49c3a7a513b5bd40c
2021-06-25 20:54:46 -05:00
Wladimir J. van der Laan
ef83670bfa
Merge #14944: doc: update NetBSD build instructions for 8.0
be5ca825a38bc71c3a79ef35335e9c2e597ad225 doc: update NetBSD build instructions for 8.0 (fanquake)

Pull request description:

  Updates the NetBSD build documentation for 8.0.
  Use Python37 and add pkg-config.
  Switches to using our `contrib/install_db4.sh` script for installing bdb.

Tree-SHA512: c0ac1a89349a752d9d4d87e2d134fd402e9beaac84e471ec9a0b507ebc5e762e973c8d2821db3824dea82841e38c39b0bb0a0d97f7e58318f2b15e93e81bf654
2021-06-25 20:52:35 -05:00
Wladimir J. van der Laan
38c60bc2f5
Merge #12294: [Docs] Create NetBSD build instructions and fix compilation
11c5827 [build] Add NETBSD leveldb target to configure.ac (fanquake)
1944fa3 [doc] Create build-netbsd.md (Randolf Richardson)
336685e [build] Add db4_cxx to bitcoin_find_bdb48.m4 (Randolf Richardson)

Pull request description:

  Replaces #12125.

Tree-SHA512: 411d082ffff7198bcc1b2b6fcdf86c378baf228d8f4fee0e6c9f0688efe9c6b6dcfd5c1ab9c1dfd0c4637723b8584dbbb614634ace0e1a417b59e88a6c736dc0
2021-06-25 20:51:59 -05:00
Wladimir J. van der Laan
ae6ce01be6
Merge #15345: net: Correct comparison of addr count
107623c26c2113428446effaa24edb986a3e780c net: Correct comparison of addr count (Carl Dong)

Pull request description:

  `LOCAL_NONE` is supposed to be an enum indicating the `nScore` of a
  `LocalServiceInfo` rather than the count of an addr in `mapLocalHost`.

Tree-SHA512: a47a0859dd11c991d75b54e96b08c502e3d235f7a6522a2355053f377d05e7853483996919292f458d917a561b23951e6945d6bf0ff5a2f29513c477c640bdd2
2021-06-25 18:43:54 -05:00
UdjinM6
17f58038b4
qt|cj: Actually apply/save tx type filter when updating CJ visibility (#4210) 2021-06-25 11:49:22 +03:00
Kittywhiskers Van Gogh
c9d0d92b2d merge #18710: Add local thread pool to CCheckQueue 2021-06-25 12:25:14 +05:30
Kittywhiskers Van Gogh
03a3f6c2e6 merge #17342: Clean up nScriptCheckThreads
17342
2021-06-25 12:25:14 +05:30
Kittywhiskers Van Gogh
3f8caf00bc merge #15849: Thread names in logs and deadlock debug tools
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-06-25 12:25:10 +05:30
PastaPastaPasta
e8875967b5
Merge pull request #4199 from kittywhiskers/fstreamWrapper
merge bitcoin#14209, #13878, #14192, #17086: logging and filesystem updates
2021-06-24 20:43:42 -05:00
Wladimir J. van der Laan
6a11e06372 Merge #17086: tests: Fix fs_tests for unknown locales
d48f664440e7bb3ff7a90b6d706a3ac2cfaec95a tests: Fix fs_tests for unknown locales (Daki Carnhof)

Pull request description:

  Fix by removing "L" as suggested by meeDamian in
  https://github.com/bitcoin/bitcoin/issues/14948#issuecomment-522355441

  ```
  # all in .../bitcoin/src/test
  $ uname -m
  x86_64
  $ export LC_ALL=randomnonexistentlocale
  $ ./test_bitcoin
  Running 369 test cases...
  unknown location(0): fatal error: in "fs_tests/fsbridge_fstream": boost::system::system_error: boost::filesystem::path codecvt to string: error
  test/fs_tests.cpp(13): last checkpoint: "fsbridge_fstream" test entry

  *** 1 failure is detected in the test module "Bitcoin Core Test Suite"
  ```

  After the patch is applied, the same test under the same conditions runs fine.

  ```
  $ export LC_ALL=randomnonexistentlocale
  $ ./test_bitcoin
  Running 369 test cases...

  *** No errors detected
  ```

  Co-Authored-By: bugs@meedamian.com

ACKs for top commit:
  laanwj:
    ACK d48f664440e7bb3ff7a90b6d706a3ac2cfaec95a

Tree-SHA512: a9910252b8ce6a05cab5530874549c2999ca2c28e835fc18aa8e5468fb417bd7d245864ec71d9233dd53e02940a9f0691b247430257f27eb0d7c20745d1c846d
2021-06-24 23:43:05 +05:30
Kittywhiskers Van Gogh
94e3a5de64 bitcoin#14209: Replace LogPrint macros with regular functions 2021-06-24 23:43:02 +05:30
Kittywhiskers Van Gogh
93d7ecabf6 bitcoin#13878: Add fstream wrapper to allow to pass unicode filename on Windows 2021-06-24 23:43:00 +05:30
Wladimir J. van der Laan
82659a4eb8 Merge #12257: [wallet] Use destination groups instead of coins in coin select
232f96f5c8a3920c09db92f4dbac2ad7d10ce8cf doc: Add release notes for -avoidpartialspends (Karl-Johan Alm)
e00b4699cc6d2ee5697d38dd6607eb2631c9b77a clean-up: Remove no longer used ivars from CInputCoin (Karl-Johan Alm)
43e04d13b1ffc02b1082176e87f420198b40c7b1 wallet: Remove deprecated OutputEligibleForSpending (Karl-Johan Alm)
0128121101fb3ee82f3abd3973a967a4226ffe0e test: Add basic testing for wallet groups (Karl-Johan Alm)
59d6f7b4e2f847ec1f2ff46c84e6157655984f85 wallet: Switch to using output groups instead of coins in coin selection (Karl-Johan Alm)
87ebce25d66952f5ce565bb5130dcf5e24049872 wallet: Add output grouping (Karl-Johan Alm)
bb629cb9dc567cc819724d9f4852652926e60cbf Add -avoidpartialspends and m_avoid_partial_spends (Karl-Johan Alm)
65b3eda458221644616d0fdd6ba0fe01bdbce893 wallet: Add input bytes to CInputCoin (Karl-Johan Alm)
a443d7a0ca333b0bae63e04b5d476f9ad9c7aeac moveonly: CoinElegibilityFilter into coinselection.h (Karl-Johan Alm)
173e18a289088c6087ba6fac708e322aa63b7a94 utils: Add insert() convenience templates (Karl-Johan Alm)

Pull request description:

  This PR adds an optional (off by default) `-avoidpartialspends` flag, which changes coin select to use output groups rather than outputs, where each output group corresponds to all outputs with the same destination.

  It is a privacy improvement, as each time you spend some output, any other output that is publicly associated with the destination (address) will also be spent at the same time, at the cost of fee increase for cases where coin select without group restriction would find a more optimal set of coins (see example below).

  For regular use without address reuse, this PR should have no effect on the user experience whatsoever; it only affects users who, for some reason, have multiple outputs with the same destination (i.e. address reuse).

  Nodes with this turned off will still try to avoid partial spending, if the fee of the resulting transaction is not greater than the fee of the original transaction.

  Example: a node has four outputs linked to two addresses `A` and `B`:

  * 1.0 btc to `A`
  * 0.5 btc to `A`
  * 1.0 btc to `B`
  * 0.5 btc to `B`

  The node sends 0.2 btc to `C`. Without `-avoidpartialspends`, the following coin selection will occur:
  * 0.5 btc to `A` or `B` is picked
  * 0.2 btc is output to `C`
  * 0.3 - fee is output to (unique change address)

  With `-avoidpartialspends`, the following will instead happen:
  * Both of (0.5, 1.0) btc to `A` or `B` is picked (one or the other pair)
  * 0.2 btc is output to `C`
  * 1.3 - fee is output to (unique change address)

  As noted, the pro here is that, assuming nobody sends to the address after you spend from it, you will only ever use one address once. The con is that the transaction becomes slightly larger in this case, because it is overpicking outputs to adhere to the no partial spending rule.

  This complements #10386, in particular it addresses @luke-jr and @gmaxwell's concerns in https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-300667926 and https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-302361381.

  Together with `-avoidreuse`, this fully addresses the concerns in #10065 I believe.

Tree-SHA512: 24687a4490ba59cf4198ed90052944ff4996653a4257833bb52ed24d058b3e924800c9b3790aeb6be6385b653b49e304453e5d7ff960e64c682fc23bfc447621

# Conflicts:
#	src/Makefile.am
#	src/bench/coin_selection.cpp
#	src/wallet/coincontrol.h
#	src/wallet/coinselection.cpp
#	src/wallet/coinselection.h
#	src/wallet/init.cpp
#	src/wallet/test/coinselector_tests.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
#	test/functional/test_runner.py
2021-06-24 13:21:20 -04:00
UdjinM6
6e66592ba7
wallet: Use correct params when signing txes in CreateTransaction (#4207)
We do not sign amounts and default sighash is SIGHASH_ALL so everything still works but it would break if/when we would start to actually sign amounts.

Missed it in https://github.com/dashpay/dash/pull/3101/files#diff-1f2db0e4d5c12d109c7f0962333c245b49b696cb39ff432da048e9d6c08944d8R3914
2021-06-24 19:08:26 +03:00
UdjinM6
20659acbd7
refactor: Better CWallet isolation in rpcevo (#4206) 2021-06-24 19:07:54 +03:00
UdjinM6
347985a8a3
tests: Stop g_txindex properly (#4205) 2021-06-24 19:07:28 +03:00
UdjinM6
9fd284d637
qt: Avoid accessing PrepareShutdown directly from qt, use Node interface (#4204) 2021-06-24 19:07:08 +03:00
UdjinM6
988fa6a235
Merge pull request #4196 from kittywhiskers/override
merge bitcoin#18914, #13306, #16424, #13899, #17486, #17880, #18145, #18843, #16710: split warnings out of CXXFLAGS, add more flags
2021-06-23 10:48:28 +03:00
MarcoFalke
4e26802df7 Merge #14225: tests: Reorder tests and move most of extended tests up to normal tests
d641c29a5a travis: Run feature_dbcrash functional tests in cron job (Chun Kuan Lee)
c0d947d725 tests: Reorder tests and move most of extended tests up to normal tests (Chun Kuan Lee)

Pull request description:

  The travis should run almost all jobs unless it takes really long time, however it does not take too long for now. So it's time for moving it to normal job.

  (The test sort is to see how many conflict will this cause, will drop it if there are too many)

  The first commit can be reviewed by `git diff --color-moved=plain`

Tree-SHA512: db6bd5b1f19de2f729012adda6ed00ca989071fd40a20710c0ff2579b5bd008edcf7421c1ad56d5f0752354e7df408f58351129d35a1ab7f4a6caa9d315df2ec

# Conflicts:
#	.travis/test_06_script.sh
#	test/functional/test_runner.py
2021-06-22 12:07:23 -04:00
PastaPastaPasta
14c631691f
Merge pull request #4201 from kittywhiskers/txEpochs
merge bitcoin#17925, #16805: auxilliary backports
2021-06-21 01:10:02 -05:00
Kittywhiskers Van Gogh
b07abef88a bitcoin#16710: Enable -Wsuggest-override if available 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
638fdf25fd bitcoin#18843: warn on potentially uninitialized reads 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
49921dbdd8 bitcoin#18145: add Wreturn-type to Werror flags 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
01b0fc9763 bitcoin#17880: add -Wdate-time to Werror flags 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
52f3975cbc bitcoin#17486: make Travis catch unused variables 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
8dbe886202 bitcoin#13899: Enable -Wredundant-decls (gcc) if available 2021-06-17 19:54:51 +05:30
Kittywhiskers Van Gogh
82c9431f20 bitcoin#16424: Treat -Wswitch as error when --enable-werror 2021-06-17 19:52:12 +05:30
Kittywhiskers Van Gogh
29288dc858 bitcoin#13306: split warnings out of CXXFLAGS 2021-06-17 19:50:41 +05:30
Kittywhiskers Van Gogh
73f9fcb7e2 bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
Kittywhiskers Van Gogh
0206ca2dcb bitcoin#16805: add timing information to FlushStateToDisk() 2021-06-17 10:57:37 +05:30
Kittywhiskers Van Gogh
f3e5ca703c bitcoin#17925: Improve UpdateTransactionsFromBlock with Epochs 2021-06-16 21:44:58 +05:30
MarcoFalke
2890306a95 Merge #14108: tests: Add missing locking annotations and locks (g_cs_orphans)
b602c9b3af tests: Add missing locking annotations and locks (practicalswift)

Pull request description:

  Add missing locking annotations and locks.

  `mapOrphanTransactions` is guarded by `g_cs_orphans`.

Tree-SHA512: f95104fbef23bd385e754c6bea3c3bdddd8a9c6a68e719d761227c9be1e46ff1316ec050a15a1243218dbab4e8584da6674f4a72f949f54b0a758392f19c83f8
2021-06-15 14:49:17 -04:00
MarcoFalke
259afa077c Merge #13965: tests: Fix extended functional tests fail
a9cf5c9623 Import CInv from correct module (Chun Kuan Lee)

Pull request description:

  Fix extended tests fail

  https://travis-ci.org/bitcoin/bitcoin/builds/415574232

Tree-SHA512: 1dd8cd3854ddf4d8c2f4cb700c2b4d866c0890b57c2e0cf73a38b97fbbd13c8c6149a8914c9d03453b4625873241cc3d470f069dd1918cf360d10ad5d79d717f
2021-06-15 14:47:22 -04:00
Munkybooty
598925ffeb Merge #13861: test: Add testing of value_ret for SelectCoinsBnB
3842732 test: Add testing of value_ret for SelectCoinsBnB (Ben Woosley)

Pull request description:

  Fix that the early bailout optimization tests did not test the intended
  selection because their utxo pool was polluted by the make_hard_case test
  preceding. Note the code was tested, just not with the constructed case.

Tree-SHA512: 95f665525f5922f70f4c17708c0c09900f38d7a652b5bdd817e017ba7ff2865a6234edbd340064ffccc20d34048c45df86a4ac5f46dd8f4aab98834e71dc9d3c
2021-06-15 14:45:02 -04:00
Kittywhiskers Van Gogh
2b862b21fc bitcoin#14192: Convert fs::filesystem_error messages from local multibyte to utf-8 on Windows 2021-06-15 23:12:54 +05:30
Wladimir J. van der Laan
edac135e2d Merge #13707: tests: Add usage note to check-rpc-mappings.py
03a2d680101a9fee47c6fd818df7585cfc93ac06 Tests: add usage note to check-rpc-mappings.py (Mason Simon)

Pull request description:

  This test would previously fail without a user-friendly warning message, if invoked with no arguments.

  Test plan:
  ```
  bitcoin @_@$ python3 test/lint/check-rpc-mappings.py
  Usage: test/lint/check-rpc-mappings.py ROOT-DIR
  bitcoin @_@$ echo $?
  1
  bitcoin @_@$ python3 test/lint/check-rpc-mappings.py .
  * Checking consistency between dispatch tables and vRPCConvertParams
  bitcoin @_@$ echo $?
  0
  ```

Tree-SHA512: 0b7a94125d18ba5dbf3c3281a4af60718d2e495bf7645d7c2a3e1a2a1d80cffcea1383c90247186728037f1f2b38de75d0f59ccf7f792d69edd33884f3698c07
2021-06-15 13:15:26 -04:00
MarcoFalke
a14593b6fa Merge #14093: tests: Fix accidental trunction from int to bool
1cc58978b7 tests: Fix accidental trunction from int to bool (practicalswift)

Pull request description:

  Fix accidental trunction from `int` to `bool`.

  Context: https://github.com/bitcoin/bitcoin/pull/14086#issuecomment-416610313

Tree-SHA512: 72d209f892e580afa9c295174c206ea5ba764ff9e03613cd9bc57fd0d7118e895ee44d96db90930a29c0b4de7f51dc00101a1b32ba6b46576d34e089ff5482ba
2021-06-11 17:49:00 -04:00
Kittywhiskers Van Gogh
a612ec5087 partial #15842: Add WITH_LOCK macro: run code while locking a mutex 2021-06-11 18:09:19 +05:30
UdjinM6
a8aee57447
Merge pull request #4190 from kittywhiskers/tlocks
merge #11640, #11599, #16112, #16127, #18635, #19249: thread safety and locking improvements
2021-06-11 15:23:35 +03:00
Kittywhiskers Van Gogh
cbc6186b64 merge #19249: Add means to handle negative capabilities in thread safety annotations 2021-06-10 14:35:08 +05:30
Kittywhiskers Van Gogh
51fababb9c merge #18635: Replace -Wthread-safety-analysis with -Wthread-safety 2021-06-10 14:35:05 +05:30
Kittywhiskers Van Gogh
d559983eeb merge #16127: more thread safety annotation coverage 2021-06-09 17:36:31 +05:30
Kittywhiskers Van Gogh
8bc1cae8e2 merge #16112: Log early messages 2021-06-08 07:49:35 +05:30
PastaPastaPasta
d444752591
refactor: resolve clang tidy warnings in governance (#4194)
* refac: use .empty()

* refac: remove redundant string initialization

* refac: 'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character

* refac: use empty

* refac: access static member statically

* Update src/governance/governance-object.cpp

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-06-07 00:35:29 +03:00
PastaPastaPasta
55be0003e2
Continued refactoring in bls to resolve clang tidy warnings (#4189)
* refac/bls: use default for default constructor

* refac/bls: initialize doneCount via default member initializer

* refac/bls: initialize batchCount and verifyCount via default member initializer

* refac/bls: remove unused parameter

* refac/bls: add __attribute__((unused)) where functions are unused

* refac/bls: remove unused lambda this capture

* refac/bls: Move assignment operators should be marked noexcept

* refac/bls: Single-argument constructors must be marked explicit to avoid unintentional implicit conversions

* refac/bls: fix compilation due to explicit constructor
2021-06-06 23:43:44 +03:00
UdjinM6
eea77e9642
Merge pull request #4192 from UdjinM6/backports-0.17-pr32
Backports 0.17 pr32
2021-06-06 23:42:04 +03:00
Kittywhiskers Van Gogh
944aea8753 merge #11599: Small locking rename 2021-06-06 16:22:17 +05:30
Kittywhiskers Van Gogh
c5c3dee308 merge #11640: Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection 2021-06-06 16:22:17 +05:30
UdjinM6
11aa04e7ec
Bump MIN_STANDARD_TX_SIZE to 85 bytes 2021-06-06 12:29:23 +03:00