Commit Graph

21146 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
d96680acd2 Merge #16338: test: Disable other targets when enable-fuzz is set
84edfc72e5eba3dde824ebd0626e97929a0b1bca Update doc and CI config (qmma)
48bcb2ac249e0e666ce638bb29124558b3283c16 Disable other targets when enable-fuzz is set (qmma)

Pull request description:

  This is to fix https://github.com/bitcoin/bitcoin/issues/16094

  When the `enable-fuzz` flag is set, disable all other binary targets.

ACKs for top commit:
  MarcoFalke:
    ACK 84edfc72e5eba3dde824ebd0626e97929a0b1bca (only checked that travis compiled this)

Tree-SHA512: f4ac80526388a67709986b22de88b00bf93ab44ae31a20bd4d8923a4982ab97e015a9f13010081d6ecf6c23ae8afeac7ca9d849d198ce6ebe239aa3127151efc
2021-11-29 23:10:31 -05:00
Holger Schinzel
ae98cd41af
Remove decomissioned mainnet seeder dnsseed.dashdot.io (#4588)
I'll switch off dnsseed.dashdot.io on 2021/12/31 - testnet seeder testnet-seed.dashdot.io will stay online until further notice.
2021-11-29 12:45:43 -05:00
PastaPastaPasta
8d2b6bb684
depends: upgrade depends Boost to 1.73 (#4576) 2021-11-29 08:28:09 +03:00
PastaPastaPasta
5cf97c1b07
refactor: Misc LLMQ refactoring (#4590)
* use unique_ptr instead of shared

Signed-off-by: pasta <pasta@dashboost.org>

* unique_ptr over shared_ptr

Signed-off-by: pasta <pasta@dashboost.org>

* remove unneeded ptr

Signed-off-by: pasta <pasta@dashboost.org>

* Adjust IsTxSafeForMining checks

Signed-off-by: pasta <pasta@dashboost.org>

* use const ref

Signed-off-by: pasta <pasta@dashboost.org>

* add a todo

Signed-off-by: pasta <pasta@dashboost.org>

* use optional instead of magic max value

fixes a hypothetical bug where myIdx is not "initialized" (ie max), and we sleep forever

Signed-off-by: pasta <pasta@dashboost.org>

* simplify relay check

Signed-off-by: pasta <pasta@dashboost.org>

* use count_if instead of a loop

Signed-off-by: pasta <pasta@dashboost.org>

* add a few vector reserves

Signed-off-by: pasta <pasta@dashboost.org>
2021-11-29 08:12:09 +03:00
PastaPastaPasta
850806e6e7
chainlocks: fix atomicity in chainlock signing scheduler (#4589)
Signed-off-by: pasta <pasta@dashboost.org>
2021-11-29 08:06:50 +03:00
PastaPastaPasta
fec2d25094
Simplify the interface for CRecoveredSig (#4587)
Signed-off-by: pasta <pasta@dashboost.org>
2021-11-29 08:00:47 +03:00
Munkybooty
b51576f7f0
test_runner: Removal of unnecessary duplicate instance of p2p_unrequested_blocks.py (#4585) 2021-11-29 07:45:50 +03:00
UdjinM6
f088d2eb9c
Merge #15186: rpc: remove duplicate solvable field from getaddressinfo (#4584)
a2a6c8f4535c0c3c5f05714d64b238fc5a839233 rpc: remove duplicate solvable field from getaddressinfo (fanquake)

Pull request description:

  Also added optional to `iscompressed`.

Tree-SHA512: 28442a9dbfb2a9992b9b57142fa13d374d39444f04ae63460cb6330d896160cfd4b9651a3e231893eac3142ce55eff597a54cbafd3b57ffa46d3711c64044acb

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-11-29 07:44:56 +03:00
Wladimir J. van der Laan
7874e7852e
Merge #16804: test: Remove unused try-block in assert_debug_log
fae91a09c453a9a95c382df765bd71e54698d5b2 test: Remove incorrect and unused try-block in assert_debug_log (MarcoFalke)

Pull request description:

  This try block has accidentally been added by me in fa3e9f7627784ee00980590e5bf044a0e1249999.
  It was unused all the time, but commit 6011c9d72d1df5c2cd09de6f85c21eb4f7eb1ba8 added a `return` in the finally block, muting all exceptions.

  This can be tested by adding an `assert False` after any `with ...assert_debug_log...:` line.

ACKs for top commit:
  laanwj:
    ACK fae91a09c453a9a95c382df765bd71e54698d5b2
  ryanofsky:
    utACK fae91a09c453a9a95c382df765bd71e54698d5b2. I didn't know returning inside a `finally` block would cancel pending exceptions or return values, but I guess this makes sense and is a good thing to be aware of.

Tree-SHA512: 47ed0165062060e9af055a3e92f1a529cd41d00476bfad64e3cd141ae084d22f926a343bb1257717e164e15459a59ab66aed198c95d18bf780d8cb0b76aa3298
2021-11-25 06:38:16 +05:30
MarcoFalke
0841836441
Merge #16656: test: fix rpc_setban.py race
6011c9d72d1df5c2cd09de6f85c21eb4f7eb1ba8 QA: fix rpc_setban.py race (Jonas Schnelli)

Pull request description:

  The new `rpc_setban.py` test failes regularly on CIs due to a race between injecting the ban and testing the log "on the other side".

  The problem is, that the test immediately after the `addnode` command on node0 checks for the `dropped (banned)` entry on node1 (without giving some time).

  Adding a 2 seconds sleep seems to solve the race (I guess there is no better event-driven delay).

  Example of a failed test: https://bitcoinbuilds.org/index.php?ansilog=bf743910-103f-4b54-9a97-960c471061bd.log#l2906

Top commit has no ACKs.

Tree-SHA512: 680f8ea3e5ddb07e93f824f1aeff4a459e25e6c14715a39fc7670e50506d7cf25925348672c5c2d8ba3e1243ccf5effbc2456bcd094fb96868349f8d26e008f1
2021-11-25 06:38:15 +05:30
Wladimir J. van der Laan
f343697869
Merge #17001: doc: Remove mention of renamed mapBlocksUnlinked
fadd6e0d2a6a5104aa215f456987ad7374bcc6ce doc: Remove mention of renamed mapBlocksUnlinked (MarcoFalke)

Pull request description:

  This has been renamed to `m_blocks_unlinked`. Instead of adjusting the internal variable name in the help text, explain the debug flag with more general terms.

ACKs for top commit:
  practicalswift:
    ACK fadd6e0d2a6a5104aa215f456987ad7374bcc6ce -- diff looks correct
  promag:
    ACK fadd6e0d2a6a5104aa215f456987ad7374bcc6ce.
  laanwj:
    ACK fadd6e0d2a6a5104aa215f456987ad7374bcc6ce (as argument help is not translated this doesn't have to wait for the split-off)

Tree-SHA512: 8ad64965ab5bbba4b92933a5adcb0c9eda5bdb0cc080840a4a97b12c67f41f9b789fd289df4932d748f5a7eebc7305a000f03ceb968a78c9b5d9f34af61f0b15
2021-11-25 06:38:15 +05:30
MarcoFalke
610f1e41d8
Merge #16912: doc: Remove Doxygen intro from src/bitcoind.cpp
dbdc758c27cfdda9d255742b6c6ff4d1b7be82df doc: Improve doxygen readme navigation section (Jon Layton)
c15ac2c0aa45c59aee6d36c2d6d5210290dc601c doc: Move doxygen intro to file for USE_MDFILE_AS_MANPAGE (Jon Layton)

Pull request description:

  With `USE_MDFILE_AS_MAINPAGE`, this moves the introductory Doxygen comment to its own file. This makes `bitcoind.cpp` cleaner.

  It also removes the `\mainpage` header text, which was smaller than the section titles, and improves the Navigation section.

ACKs for top commit:
  promag:
    ACK dbdc758c27cfdda9d255742b6c6ff4d1b7be82df.

Tree-SHA512: 9352baad655877437913b74dc8888a71d1cccf55a837657ee2630fde3f427d0f0339155b7ab3d9e63a9edb9d53512d747eafcb11987a7c26c47a6df2eca93351
2021-11-25 06:38:14 +05:30
MarcoFalke
267482876a
Merge #15763: Update bips.md for 0.18.0
65d2f5d2de Update bips.md for 0.18.0 (Pieter Wuille)

Pull request description:

  Update `doc/bips.md` for changes in 0.17 and 0.18 (BIP 61 deprecated, BIP 70 support optional, BIP 159 connection logic).

ACKs for commit 65d2f5:
  MarcoFalke:
    ACK 65d2f5d2de37fd64c9cf8d526bab0072774b7b1d
  fanquake:
    utACK 65d2f5d
  promag:
    ACK 65d2f5d, referenced pulls match.

Tree-SHA512: a261aae196c90d4fab7925e53e61cdd02e39050cb09eb5a89002f2d8304e26782ec4811f77bfc9e92a5b1b675020c324ca91c9a111ccbd3ae90b80821607c7c9
2021-11-25 06:38:13 +05:30
Wladimir J. van der Laan
d58ff4eb01 Merge #14505: test: Add linter to make sure single parameter constructors are marked explicit
c4606b84329d760d7cee144bebe05807857edaae Add Travis check for single parameter constructors not marked "explicit" (practicalswift)

Pull request description:

  Make single parameter constructors `explicit` (C++11).

  Rationale from the developer notes:

  > - By default, declare single-argument constructors `explicit`.
  >   - *Rationale*: This is a precaution to avoid unintended conversions that might
  >   arise when single-argument constructors are used as implicit conversion
  >   functions.

ACKs for top commit:
  laanwj:
    ACK c4606b84329d760d7cee144bebe05807857edaae

Tree-SHA512: 3e6fd51935fd93b2604b2188664692973d0897469f814cd745b5147d71b99ea5d73c1081cfde9f6393f51f56969e412fcda35d2d54e938a3235b8d40945f31fd
2021-11-24 14:36:20 -05:00
PastaPastaPasta
10e5ed2d5e
fix: datarace in walletmodel.cpp causing occasional segfaults in instantsend code at shutdown (#4583)
Thanks thephez
2021-11-24 15:06:26 +03:00
UdjinM6
1aefe95b02
Add missing implementations for chainlock and instantsend notifications in NotificationsHandlerImpl (#4580)
A follow-up to 10973 backport dashpay/dash@438c93bd9a merged via #4558
2021-11-24 15:04:59 +03:00
Kittywhiskers Van Gogh
9fa6dfa7b5 merge bitcoin#19959: patch qt libpng to fix powerpc build 2021-11-24 10:48:53 +05:30
Kittywhiskers Van Gogh
7dc828482b partial bitcoin#17730: remove Qt networking features 2021-11-24 10:48:53 +05:30
Kittywhiskers Van Gogh
e81cd6093b merge bitcoin#17466: Fix C{,XX} pickup 2021-11-24 10:48:53 +05:30
Kittywhiskers Van Gogh
b0e9022a5b merge bitcoin#16837: Fix {C{,XX},LD}FLAGS pickup 2021-11-24 10:48:53 +05:30
Kittywhiskers Van Gogh
a6f81f5e96 merge bitcoin#16413: Bump QT to LTS release 5.9.8 2021-11-24 10:48:53 +05:30
Kittywhiskers Van Gogh
56d04ade06 merge bitcoin#16110: Add Android NDK support 2021-11-24 10:02:59 +05:30
MarcoFalke
87960509df
Merge #15897: QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one
9f9db39041 QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one (Luke Dashjr)

Pull request description:

  While this doesn't currently trigger any problems, the network protocol does expect headers to be sent connectable in normal circumstances, and if too many are sent out of order will disconnect the peer.

ACKs for commit 9f9db3:

Tree-SHA512: 25b88718e4ba3d31aed2de7ece23fab9a0737fd6536c5e618ea8eb5a3a217dab0dffaebc4892df7993bcea7efb7c4fb5085fabebe99535b8f7fdde3c19df54ff
2021-11-21 07:13:16 +05:30
MarcoFalke
58365e5e76
partial Merge #15919: Remove unused OpenSSL includes to make it more clear where OpenSSL is used
a34081b7c3 Remove unused OpenSSL includes to make it more clear where OpenSSL is used (practicalswift)

Pull request description:

  Remove unused OpenSSL includes to make it more clear where OpenSSL is used.

  Before this patch:

  ```
  $ git grep '#include <openssl/' -- "*.cpp" "*.h"
  src/init.cpp:#include <openssl/crypto.h>
  src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h>
  src/qt/paymentrequestplus.h:#include <openssl/x509.h>
  src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h>
  src/qt/rpcconsole.cpp:#include <openssl/crypto.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/test_main.cpp:#include <openssl/ssl.h>
  src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/err.h>
  src/random.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/conf.h>
  src/test/crypto_tests.cpp:#include <openssl/aes.h>
  src/test/crypto_tests.cpp:#include <openssl/evp.h>
  ```

  After this patch:

  ```
  $ git grep '#include <openssl/' -- "*.cpp" "*.h"
  src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h>
  src/qt/paymentrequestplus.h:#include <openssl/x509.h>
  src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/test_main.cpp:#include <openssl/ssl.h>
  src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/err.h>
  src/random.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/conf.h>
  ```

  Removed:
  * `src/init.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd0 (2016))
  * `src/qt/rpcconsole.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd0 (2016))
  * `src/test/crypto_tests.cpp:#include <openssl/aes.h>` (introduced unused in daa384120a (2015))
  * `src/test/crypto_tests.cpp:#include <openssl/evp.h>` (introduced unused in daa384120a (2015))

ACKs for commit a34081:
  MarcoFalke:
    utACK a34081b7c398847c37a587029c7ad7f3a3396c8e
  real-or-random:
    utACK a34081b
  fanquake:
    utACK a34081b

Tree-SHA512: 8ab9699c063f2d0ed2d71738f20ac5c21336585f7f62fd3a4b23199a125ea3224725591d64171347465762181788fac1bc4ce13d8824090bf1a5ac71a66d6538
2021-11-21 07:13:12 +05:30
PastaPastaPasta
649273e703
Merge pull request #4564 from Munkybooty/backports-0.19-pr5
Backports 0.19 pr5
2021-11-20 15:37:35 -05:00
UdjinM6
ffb44aa76a
Merge pull request #4524 from Munkybooty/backports-0.19-pr3
Backports 0.19 pr3
2021-11-20 23:30:46 +03:00
MarcoFalke
ffb30714de Merge #15949: test_runner: Move pruning back to extended
fa08c5cb99 test_runner: Move pruning back to extended (MarcoFalke)

Pull request description:

  This reverts fafb55e2c2b257efd4e584f72adf62401c01d573, since the test is still too slow to run with asan enabled on a network hdd

ACKs for commit fa08c5:
  jnewbery:
    utACK fa08c5cb993f07fd4309f2a6bd9ef4696f07e24c
  jonasschnelli:
    utACK fa08c5cb993f07fd4309f2a6bd9ef4696f07e24c

Tree-SHA512: de16786b9d507a72210805c3e9eef360e5fc3d4bc3a81f7175b6cc70d1bc426cde7ac97bc0d1a0d4e0813067e1e251c2dd49256552cc6b52446b475251b7c32b
2021-11-18 15:57:22 -05:00
MarcoFalke
e607643bb7 Merge #15696: [qa] test_runner: Move feature_pruning to base tests
fafb55e2c2 [qa] test_runner: Move feature_pruning to base tests (MarcoFalke)
8728a66782 [tests] fix block time in feature_pruning.py (John Newbery)

Pull request description:

ACKs for commit fafb55:

Tree-SHA512: 88abef94379fbad6629da11dccb080d5f0644490d6f2cc2756a33fac34bcf72e84245cef596dfae5a40f7a99b3f4da0dd85d306d4c1b452d310d3f36eef75a8b
2021-11-18 15:57:22 -05:00
MarcoFalke
843a42d750 Merge #16063: rpc: Mention getwalletinfo where a rescan is triggered
be4efb165a rpc: Mention getwalletinfo where a rescan is triggered (João Barbosa)

Pull request description:

ACKs for commit be4efb:
  jonasschnelli:
    utACK be4efb165ab7ff5824de9a46aa06eca654b7513f
  sipa:
    utACK be4efb165ab7ff5824de9a46aa06eca654b7513f

Tree-SHA512: c9e5adda6fcb71dd64ad35cc5af89b0ed815aba440df26b61ef2018abd3b801c9e93cdbedf90db3938e88dc9af39f1577c4c7248bc77260d3afda5e2a0928e68
2021-11-18 15:57:22 -05:00
MarcoFalke
e5817f44a2 Merge #16049: depends: switch to secure download of all dependencies
d8bc47fde4 depends: switch to secure download of all dependencies (Ulrich Kempken)

Pull request description:

  Even if we potentially check the integrity of the downloaded file via hash comparison, we should make use of SSL since it is available.

ACKs for commit d8bc47:
  jonasschnelli:
    utACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50
  practicalswift:
    utACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50
  dongcarl:
    tACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50

Tree-SHA512: e47702f6d243ed7f498ca84c193244382f16f08df6a297caa224b4468f501f3da6fe542fcf3a0dd9c24ab1b0b38bbc51478068e6006a92854ded23abf90de3c8
2021-11-18 15:57:21 -05:00
MarcoFalke
07fb94ec6e Merge #16071: RPC: Hint for importmulti in help output of importpubkey and importaddress
df0e97ccb1 RPC: Hint for importmulti in help output of importpubkey and importaddress (Kristaps Kaupe)

Pull request description:

  Similar to #12702. Hint for `importmulti` also in help output of `importpubkey` and `importaddress`.

ACKs for commit df0e97:
  promag:
    utACK df0e97ccb13a28825a2731b95d2bb17f355f6920.
  jonasschnelli:
    utACK df0e97ccb13a28825a2731b95d2bb17f355f6920

Tree-SHA512: db7358d7f4d463a50874e605bbca35a1a40dbefbb1d35cf51fe2f2aa34bef90c3ca398f4ffbcb9d7d43887a03eb8d81b6ef59066a3c7eda18a7eea876f6592e7
2021-11-18 15:57:21 -05:00
Wladimir J. van der Laan
c2b9f011ce Merge #16300: util: Explain why the path is cached
fa69c3e6ca71800376761e264320c363f072dc2f util: Explain why the path is cached (MarcoFalke)

Pull request description:

  The rationale for caching the datadir is given as

  ```
      // This can be called during exceptions by LogPrintf(), so we cache the
      // value so we don't have to do memory allocations after that.
  ```

  Since 8c2d695c4a45bdd9378c7970b0fcba6e1efc01f9, the debug log location is actually cached itself in `m_file_path`.

  So explain that the caching is now only used to guard against disk access on each call. (See also #16255)

ACKs for top commit:
  promag:
    ACK fa69c3e6ca71800376761e264320c363f072dc2f.
  laanwj:
    ACK fa69c3e6ca71800376761e264320c363f072dc2f
  ryanofsky:
    utACK fa69c3e6ca71800376761e264320c363f072dc2f. Good cleanup. Previous comment was confusing, and definitely not helpful if outdated.

Tree-SHA512: 02108c90026d6d7c02843aaf59a06b4e1fa63d5d4378bb7760f50767efc340dc94c259bf7afb32fa4d47952b48a4e91798d1e0ddc1b051d770405e078636793a
2021-11-18 15:30:54 -05:00
MarcoFalke
716f124b00 Merge #16289: test: Add missing ECC_Stop() in GUI rpcnestedtests.cpp
f466c4ce846000b2f984b4759f89f3f793fa0100 Add missing ECC_Stop(); in GUI rpcnestedtests.cpp (Jonas Schnelli)

Pull request description:

  Fixes #16288

  Was probably missing in #7783

ACKs for top commit:
  Sjors:
    ACK f466c4c. Tested by comparing `make check` on master and this PR with macOS 10.14.5. I also tried with and without `--enable-debug` / `--without-gui`.
  fanquake:
    ACK f466c4ce846000b2f984b4759f89f3f793fa0100. Tested running `make check` on macOS.

Tree-SHA512: 648e10c2e35bd01fb92e63709169a6c185ac4b62c69af0109d2cd2d7db47e56ae804c788f9a1a1845746f818764799732f9e58e9dbfca3bffeea8f14683c8c7f
2021-11-18 15:30:54 -05:00
Wladimir J. van der Laan
93f168eee3 Merge #15894: Remove duplicated "Error: " prefix in logs
f724f31401b963c75bd64f5e2c5b9d9561a9a9dd Make AbortNode() aware of MSG_NOPREFIX flag (Hennadii Stepanov)
96fd4ee02f6c3be21cade729b95a85c60634b0f8 Add MSG_NOPREFIX flag for user messages (Hennadii Stepanov)
f0641f274ffe94fbe7cae43c07a9373013739df2 Prepend the error/warning prefix for GUI messages (Hennadii Stepanov)

Pull request description:

  The "Error" prefix/title is set already in the next functions:
  - `noui_ThreadSafeMessageBox()`2068f089c8/src/noui.cpp (L17)
  - `ThreadSafeMessageBox()`a720a98301/src/qt/bitcoingui.cpp (L1351)

  Currently on master:
  ![Screenshot from 2019-04-25 22-08-54](https://user-images.githubusercontent.com/32963518/56763092-25ee8280-67aa-11e9-86c8-6a029dd9ab08.png)

  With this PR:
  ![Screenshot from 2019-04-25 22-26-36](https://user-images.githubusercontent.com/32963518/56763107-30108100-67aa-11e9-9021-683cbd7e2aaa.png)

ACKs for top commit:
  laanwj:
    concept and code-review ACK f724f31401b963c75bd64f5e2c5b9d9561a9a9dd

Tree-SHA512: 218a179b81cc2ac64239d833c02b4c4d4da9b976728a2dcd645966726c4c660b6f1fe43aa28f33d1cb566785a4329e7f93bf5a502bf202316db79d2ff5fce0f8
2021-11-18 15:30:54 -05:00
Wladimir J. van der Laan
6d6630d251 Merge #16252: test: Log to debug.log in all unit tests
fabc57e07dc34c103552cb51c9277bb48ef97739 test: Log to debug.log in all tests (MarcoFalke)
fa4a04a5a942d582c62773d815c7e1e9897975d0 test: use common setup in gui tests (MarcoFalke)
fad3d2a624377de4b0311e6ddd446c36dafd1ddc test: Create data dir in BasicTestingSetup (MarcoFalke)

Pull request description:

  This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line `fs::remove_all(m_path_root);`.

  The pull is done in three commits:
  * Create a datadir for every unit test once (and only once). This requires the `SetDataDir` function to go away.
  * Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we'd have to undo some of what the testing setup did.
  * Log to the debug.log in all tests

ACKs for top commit:
  laanwj:
    ACK fabc57e07dc34c103552cb51c9277bb48ef97739

Tree-SHA512: 73444210b88172669e2cd22c2703a1e30e105185d2d5f03decbdedcfd09c64ed208d3716c59c8bebb0e44214cee5c8095e3e995d049e1572ee98f1017e413665
2021-11-18 15:30:54 -05:00
fanquake
b2f9eef0d5 Merge #16263: qt: Use qInfo() if no error occurs
a2aabfb749198bce896c9e597082acd67d3b863e Use qInfo() if no error occurs (Hennadii Stepanov)

Pull request description:

  [Warning and Debugging Messages](https://doc.qt.io/qt-5/debug.html#warning-and-debugging-messages):
  > - `qInfo()` is used for informational messages.
  > - `qWarning()` is used to report warnings and recoverable errors in your
  application.
  >
  > If the `QT_FATAL_WARNINGS` environment variable is set, `qWarning()` exits after printing the warning message. This makes it easy to obtain a backtrace in the debugger.

  [`qWarning()`](https://doc.qt.io/qt-5/qtglobal.html#qWarning):
  > Calls the message handler with the warning message message... This function does nothing if `QT_NO_WARNING_OUTPUT` was defined during compilation; it exits if at the nth warning corresponding to the counter in environment variable `QT_FATAL_WARNINGS`.

  This PR allows more productive debugging using the environment variable `QT_FATAL_WARNINGS`.

  Examples:
  - https://github.com/bitcoin/bitcoin/pull/16118#issuecomment-503184695
  - https://github.com/bitcoin/bitcoin/pull/16254#issuecomment-504223404

  The behavior, when option `-debug=qt` is set/unset, remains unchanged.

ACKs for commit a2aabf:
  promag:
    ACK a2aabfb, I also have this change locally.
  Empact:
    ACK a2aabfb749
  laanwj:
    ACK a2aabfb749198bce896c9e597082acd67d3b863e
  fanquake:
    ACK a2aabfb749198bce896c9e597082acd67d3b863e.

Tree-SHA512: b4df300c9c00a1705b0d3a10227e3deaac19a98b0a898bb60d5a88872cf450fb131eba150d9dd6c29e021566ee04b3b86b7d486bbe28bd894743c128d2309155
2021-11-18 15:30:54 -05:00
MarcoFalke
feafa02be2 Merge #16207: test: stop generating lcov coverage when functional tests fail
9218ce8d48 Failing functional tests stop lcov (Aseem Sood)

Pull request description:

  Fixes #15648

  Functional tests can fail and lcov still generates a coverage file, which is inaccurate. This change stops `make` from proceeding if functional tests fail.

  before:

  ![image](https://user-images.githubusercontent.com/6106941/59449220-a9a11480-8dd4-11e9-9eff-81c42513aafa.png)

  after:
  ![image](https://user-images.githubusercontent.com/6106941/59449234-b160b900-8dd4-11e9-9d80-6e9c7f41c241.png)

ACKs for commit 9218ce:
  laanwj:
    straightforward enough ACK 9218ce8d48e504aeaa983e82b206a386712e43e4

Tree-SHA512: 6bbba625f021471d897e911b0df7703153634ef133e295e7be8639346e11f5532bac04e9bab7d793e520fdf4b903219cacecc2ce1e25da0a6828a34a396729e2
2021-11-18 15:30:54 -05:00
Jonas Schnelli
34d1a742d4 Merge #15991: Bugfix: fix pruneblockchain returned prune height
f402012cc fixup: Fix prunning test (João Barbosa)
97f517dd8 Fix RPC/pruneblockchain returned prune height (Jonas Schnelli)

Pull request description:

  The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks).

  This fixes the return value to actually return the correct prune height.

ACKs for commit f40201:
  MarcoFalke:
    ACK f402012ccfc596d7d94851dabbf386c278ff5335

Tree-SHA512: 88c910030ffb83196663e5ebebc29d036fcdbbb2ab266e4538991867924a61bacd8361c1fbf294a0ea7e02347ae183d792f10a10b8f6187e8a4c4c6e4124d7e6
2021-11-18 15:30:54 -05:00
Wladimir J. van der Laan
9b18cc47b1 Merge #16141: build: remove GZIP export from gitian descriptors
bc8863b81922eb878519f328e9b0c7974aaa34ff depends: remove usage of TAR_OPTIONS (fanquake)
3ff1f2a319fc619954736d1e540ccbebc818ff11 build: remove export GZIP from gitian descriptors (fanquake)

Pull request description:

  The `GZIP` environment variable is [deprecated](https://www.gnu.org/software/gzip/manual/gzip.html#Environment), and everywhere that we invoke `gzip` we are already passing `-9n` directly, i.e:
  ```base
    find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
  ```

  ```bash
  GZIP="-9n" gzip -h
  gzip: warning: GZIP environment variable is deprecated; use an alias or script
  Usage: gzip [OPTION]... [FILE]...
  ```

ACKs for commit bc8863:

Tree-SHA512: 2d5277f7bf096fd5bd0dda47dfaf2dc7a31cc5d91eb8cb42db9cbe060d07dff66bf8e1122a89a3a1b597a3b39dbf8d9a8da4f02e642f58e451ce9fb24cc59769
2021-11-18 15:30:53 -05:00
Wladimir J. van der Laan
cf234c7894 Merge #15840: Contrib scripts: Filter IPv6 by ASN
316b8b2339efa131fc39f050ee0c9fe5291572b7 Filter IPv6 by ASN (Emil)

Pull request description:

  Improves IP diversity for hardcoded seednodes.

ACKs for commit 316b8b:

Tree-SHA512: ae90427efa317d59125457bf8bfd077fd115c0921e1cc13cebd855206498546a026ccc18f039d1963d64d9be9497c41f4a21214fb565d5d11a9635ad12836421
2021-11-18 12:12:55 -05:00
Wladimir J. van der Laan
d21e550b0e Merge #16021: p2p: Avoid logging transaction decode errors to stderr
fa2b52af32f6a4b9c22c270f36e92960c29ef364 Disallow extended encoding for non-witness transactions (take 3) (MarcoFalke)

Pull request description:

  (previous title "p2p: Disallow extended encoding for non-witness transactions (take 3)")

  Remote peers can send us illegally encoded txs and thus have us write to stderr. Fix that by not writing to stderr.

  This is a follow up to the previous (incomplete) attempts at this:

  *  Disallow extended encoding for non-witness transactions #14039
  *  Add test for superfluous witness record in deserialization #15893

ACKs for commit fa2b52:
  laanwj:
    utACK fa2b52af32f6a4b9c22c270f36e92960c29ef364
  ryanofsky:
    utACK fa2b52af32f6a4b9c22c270f36e92960c29ef364. Would change title to something like "Avoid logging transaction decode errors to stderr" instead of "Disallow extended encoding for non-witness transactions." The current title is confusing because this PR isn't really allowing or disallowing anything, just logging the condition differently. "Disallow" also seems to contradict the "Allow exceptions from..." comments in the actual code.

Tree-SHA512: c66990e69b432d00dc1c5510bf976a1188664d0890a32d1e5c6459094e7e27da82a5d227627afcbc203676f5540eec74b7d9b1d71d2c62d3b2069e1781824b4d
2021-11-18 12:12:55 -05:00
PastaPastaPasta
84ade683c1
Merge pull request #4535 from vijaydasmp/bp_19_3
Backport 15826, 15530, 16243, 15824, 16587, 16555, 16629, 16847, 16857, 14877
2021-11-17 15:48:33 -05:00
Kittywhiskers Van Gogh
d978259654
merge bitcoin#15638: Pull wallet code out of libbitcoin_server (#4560)
* merge 15638: Move CheckTransaction from lib_server to lib_consensus

* merge 15638: Move policy settings to new src/policy/settings unit

* merge 15638: Move rpc utility methods to rpc/util

* merge 15638: Move rpc rawtransaction util functions to rpc/rawtransaction_util.cpp

* merge 15638: Move several units into common libraries

* merge 15638: Move wallet load functions to wallet/load unit

* merge 15638: Document src subdirectories and different libraries

* [build] Add several util units (cleanup)

* build: resolve missing declarations by re-specifying headers
2021-11-16 10:19:47 -05:00
MarcoFalke
e4557b0067
Merge #14877: rpc: Document default values for optional arguments
fa0c24c96e rpc: Document default values for optional arguments (MarcoFalke)

Pull request description:

Tree-SHA512: e1f5ea67d7ac67526ae87bffaeb308a9ad68632e161fe0148cd431a340bb7a30def18f1dbc7e98c6c1c269ac8942fd5d5334c85c48e4fb1cead70a42536b6eef
2021-11-16 20:22:58 +05:30
fanquake
3c2eef8e82
Merge #16857: doc: Elaborate need to re-login on Debian-based after usermod for Tor group
706340150f3ae26fce4659f8fa0a5d57149d2fb3 Elaborate on the need to re-login on Debian-based systems to use tor following usermod (clashicly)

Pull request description:

  Starting bitcoind with `-onlynet=onion` immediately after adding bitcoind user to debian-tor group will yield the following notice on debug.log:

  	"tor: Authentication cookie /run/tor/control.authcookie could not be opened (check permissions)"

  Elaborate on the need to re-login to ensure debian-tor group has been applied to bitcoind user after:

  	sudo usermod -a -G debian-tor username

  Verification can be done via `groups` command in shell.
  Otherwise operator may not be aware at first launch they are not running a tor enabled node.

ACKs for top commit:
  fanquake:
    ACK 706340150f3ae26fce4659f8fa0a5d57149d2fb3 - Thanks for following up.

Tree-SHA512: 3473966fb43b4f1c86bd8841dd6ea8c2798256c2ca926b10bd08cd655b954a9e77f0278c4fe63160e69cc75e240a3580af00ea46bf960fde2788aa88f03510b2
2021-11-16 07:13:49 +05:30
Wladimir J. van der Laan
47714ab3b7
Merge #16847: doc: add comments clarifying how local services are advertised
82e53f37e1bfa6e34eac16b33329d70c3c0127da doc: add comments clarifying how local services are advertised (James O'Beirne)

Pull request description:

  Recent questions have come up regarding dynamic service registration
  (see https://github.com/bitcoin/bitcoin/pull/16442#discussion_r308702676
  and the assumeutxo project ~~which needs to dynamically flip NODE_NETWORK~~).

  While investigating how dynamic service registration might work, I was
  confused about how we convey local services to peers. This adds some
  documentation that hopefully clarifies this process.

ACKs for top commit:
  laanwj:
    ACK 82e53f37e1bfa6e34eac16b33329d70c3c0127da
  darosior:
    ACK 82e53f37e1bfa6e34eac16b33329d70c3c0127da

Tree-SHA512: a30c1020387d7a75b5b3cdde45f8b7f2ae46293da97e6227b2ee17e290b93deb5b16c0bbc2b1676972300e5c3c2ad74eb8b3910d6b93e028dac1ae2700468ef9
2021-11-16 07:13:49 +05:30
MarcoFalke
2c7254f133
Merge #16629: doc: Add documentation for the new whitelist permissions
66ad75472f47e219ff980f7aba249795403dd7e0 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature https://github.com/bitcoin/bitcoin/pull/16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad75472

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
2021-11-16 07:13:49 +05:30
MarcoFalke
52a577891e
Merge #16555: doc: mention whitelist is inbound, and applies to blocksonly
20ea9ef6ce9228a5258b99eeeeb40e6dfae2299f [doc] mention whitelist is inbound, and applies to blocksonly (Sjors Provoost)

Pull request description:

  * `-whitelist` only impacts inbound nodes (see #9923). This is obvious in the context of allowing those nodes to connect to you, but there are additional whitelist features where this is less obvious, such as mempool relay behavior.

  * `whitelistrelay` (on by default) explains that `-blocksonly` makes an exception for transactions from whitelisted nodes, but it wasn't documented (nor obvious imo) the other way around. See also https://github.com/bitcoin/bitcoin/pull/15984#issuecomment-490645552

Top commit has no ACKs.

Tree-SHA512: 03e363a5da5d81ad147d1c7e38bf11114df8bb89bdd66fb551520b25f810efa886ec6e649d3b435c4935e0ae4f39bb718bc7bb5778b9de6aa0b71e970a431af8
2021-11-16 07:13:48 +05:30
fanquake
4bf93d833e
Merge #16587: doc: Improve versionbits.h documentation
6576a8765f67716aa6b87a2f0296fbac5956bec0 doc: Improve versionbits.h documentation (Antoine Riard)

Pull request description:

  While reviewing burying of BIP 9 deployments, seen that versionbits.h wasn't that much documented. This is an attempt to improve it. It can be useful, given after burying this code isn't going to be used anymore and isn't straightforward at first sight.

ACKs for top commit:
  jnewbery:
    ACK 6576a8765f67716aa6b87a2f0296fbac5956bec0
  ajtowns:
    ACK 6576a8765f67716aa6b87a2f0296fbac5956bec0
  fanquake:
    ACK 6576a8765f67716aa6b87a2f0296fbac5956bec0

Tree-SHA512: 906463e0b22b988f89d77f798bf94d294f70467d29975088b87384764fb5d0dd1350be67562cc264656f61f1eada2cba20f99c0d797d1d7f90203c269e34c714
2021-11-16 07:13:48 +05:30
Wladimir J. van der Laan
22ef848f6e
Merge #15824: docs: Improve netbase comments
c7f6ce74d3a5cf2a0c5bac20eab1efd997175a72 docs: Improve netbase comments (Carl Dong)

Pull request description:

  Second in a series of PRs documenting the net stack. Contributed with sincere thanks to sipa, laanwj, and gmaxwell for providing much of the history, context, and rationale.

ACKs for top commit:
  laanwj:
    ACK c7f6ce74d3a5cf2a0c5bac20eab1efd997175a72

Tree-SHA512: ad83054d3b8d0c8c3fb55be011bcf294176e7509513bf61326866afd53e8159644e0d59bb3a2f404717f525cbf736096d4c1990e61cfd89845d51fa6b5394b7c
2021-11-16 07:13:48 +05:30