Commit graph

24416 commits

Author SHA1 Message Date
fanquake
234fabab90
Merge #18210: test: type hints in Python tests
bd7e530f01 This PR adds initial support for type hints checking in python scripts. (Kiminuo)

Pull request description:

  This PR adds initial support for type hints checking in python scripts.

  Support for type hints was introduced in Python 3.5. Type hints make it easier to read and review code in my opinion. Also an IDE may discover a potential bug sooner. Yet, as PEP 484 says: "It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention."

  [Mypy](https://mypy.readthedocs.io/en/latest/index.html) is used in `lint-python.sh` to do the type checking. The package is standard so there is little chance that it will be abandoned. Mypy checks that type hints in source code are correct when they are not, it fails with an error.

  **Notes:**

  * [--ignore-missing-imports](https://mypy.readthedocs.io/en/latest/command_line.html#cmdoption-mypy-ignore-missing-imports) switch is passed on to `mypy` checker for now. The effect of this is that one does not need `# type: ignore` for `import zmq`. More information about import processing can be found [here](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports). This can be changed in a follow-up PR, if it is deemed useful.
  * We are stuck with Python 3.5 until 04/2021 (see https://packages.ubuntu.com/xenial/python3). When Python version is bumped to 3.6+, one can change:
      ```python
      _opcode_instances = []  # type: List[CScriptOp]
      ```
      to
      ```python
      _opcode_instances:List[CScriptOp] = []
      ```
      for type hints that are **not** function parameters and function return types.

  **Useful resources:**

  * https://docs.python.org/3.5/library/typing.html
  * https://www.python.org/dev/peps/pep-0484/

ACKs for top commit:
  fanquake:
    ACK bd7e530f01 - the type checking is not the most robust (there are things it fails to detect), but I think this is worth adopting (in a limited capacity while we maintain 3.5 compat).
  MarcoFalke:
    ACK bd7e530f01 fine with me

Tree-SHA512: 21ef213915fb1dec6012f59ef17484e6c9e0abf542a316b63d5f21a7778ad5ebabf8961ef5fc8e5414726c2ee9c6ae07c7353fb4dd337f8fcef5791199c8987a
2020-06-03 22:19:52 +08:00
fanquake
575589a62e
Merge #19041: ci: tsan with -stdlib=libc++-10
faf62e6ed0 ci: Remove unused workaround (MarcoFalke)
fa7c850915 ci: Install llvm to get llvm symbolizer (MarcoFalke)
fa563cef61 test: Add more tsan suppressions (MarcoFalke)
fa0cc02c0a ci: Mute depends logs completely (MarcoFalke)
fa906bf298 test: Extend tsan suppressions for clang stdlib (MarcoFalke)
fa10d85079 ci: Use libc++ instead of libstdc++ for tsan (MarcoFalke)
fa0d5ee112 ci: Set halt_on_error=1 for tsan (MarcoFalke)
fa2ffe87f7 ci: Deduplicate DOCKER_EXEC (MarcoFalke)
fac2eeeb9d cirrus: Remove no longer needed install step (MarcoFalke)

Pull request description:

  According to the [ThreadSanitizer docs](https://clang.llvm.org/docs/ThreadSanitizer.html#current-status):
  >  C++11 threading is supported with **llvm libc++**.

  For example, the thread sanitizer build is currently not checking for double lock of mutexes.

  Fixes (partially) https://github.com/bitcoin/bitcoin/issues/19038#issuecomment-632138003

ACKs for top commit:
  practicalswift:
    ACK faf62e6ed0
  fanquake:
    ACK faf62e6ed0
  hebasto:
    ACK faf62e6ed0, maybe re-organize commits to modify suppressions in a single one?

Tree-SHA512: 98ce5154b4736dfb811ffdb6e6f63a7bc25fe50d3b73134404a8f3715ad53626c31f9c8132dbacf85de47b9409f1e17a4399e35f78b1da30b1577167ea2982ad
2020-06-03 21:55:32 +08:00
MarcoFalke
bdedfcf076
Merge #18974: test: Check that invalid witness destinations can not be imported
facede18a4 test: Check that invalid witness destinations can not be imported (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK facede18a4 -- thanks for adding!

Tree-SHA512: 87000606fac2e6f2780ca75cdeeb2dc1f0528d9b8f13e4156e8304ce7a6b1eb014781b6f0c59d11544bf360ba3dc5f99549470b0876132e189b9107f2c6bb38d
2020-06-03 07:31:06 -04:00
MarcoFalke
0f55294cc1
Merge #18875: fuzz: Stop nodes in process_message* fuzzers
fab860aed4 fuzz: Stop nodes in process_message* fuzzers (MarcoFalke)
6666c828e0 fuzz: Give CNode ownership to ConnmanTestMsg in process_message fuzz harness (MarcoFalke)

Pull request description:

  Background is that I saw an integer overflow in net_processing

  ```
  #30629113	REDUCE cov: 25793 ft: 142917 corp: 3421/2417Kb lim: 4096 exec/s: 89 rss: 614Mb L: 1719/4096 MS: 1 EraseBytes-
  net_processing.cpp:977:25: runtime error: signed integer overflow: 2147483624 + 100 cannot be represented in type 'int'
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior net_processing.cpp:977:25 in
  net_processing.cpp:985:9: runtime error: signed integer overflow: -2147483572 - 100 cannot be represented in type 'int'
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior net_processing.cpp:985:9 in
  ```

  Telling from the line numbers, it looks like `nMisbehavior` wrapped around.

  Fix that by calling `StopNodes` after each exec, which should clear the node state and thus `nMisbehavior`.

ACKs for top commit:
  practicalswift:
    ACK fab860aed4

Tree-SHA512: 891c081d5843565d891aec028b6c27ef3fa39bc40ae78238e81d8f784b4d4b49cb870998574725a5159dd03aeeb2e0b9bc3d3bb51d57d1231ef42e3394b2d639
2020-06-03 07:23:41 -04:00
Wladimir J. van der Laan
42065518d9
Merge #19146: doc: Remove release note fragments of 0.20.1 release, Add release-notes-0.20.0
fa13c180c7 doc: Move 0.21 fragments into the main release notes (MarcoFalke)
fa1a91657f doc: Add release-notes-0.20.0.md (MarcoFalke)
faabc6e445 doc: Remove release notes of 0.20.1 release (MarcoFalke)

Pull request description:

  Remove 0.20.1 fragments from master (which will become 0.21), also add the 0.20 release notes

ACKs for top commit:
  laanwj:
    ACK fa13c180c7
  fanquake:
    ACK fa13c180c7

Tree-SHA512: d5041f405cae255e6fde8d0346909a726fe41aa096478541e0ea3a45cadbb5c761b8da693aceb83f8e112575bc7e3cf896f2bf1f7b707240c6678cc48409ee2e
2020-06-03 13:05:06 +02:00
fanquake
657b82cef0
Merge #19084: net: improve code documentation for dns seed behaviour
5cb7ee67a5 net: improve code documentation for dns seed behaviour (Anthony Towns)

Pull request description:

  Some better internal documentation post #16939

ACKs for top commit:
  hebasto:
    ACK 5cb7ee67a5
  naumenkogs:
    ACK 5cb7ee6
  ariard:
    ACK 5cb7ee6
  fanquake:
    ACK 5cb7ee67a5 - thanks for following up.

Tree-SHA512: 5a12680651cd1e0436aed1cadcbf50047ffeabfdc9f7f2f81fa176c30b10673fc960154c73ec34ed08ace1a000a81cedd44d67587883152654dee46065991b45
2020-06-03 11:04:00 +08:00
MarcoFalke
fa13c180c7
doc: Move 0.21 fragments into the main release notes 2020-06-02 19:09:39 -04:00
MarcoFalke
fa1a91657f
doc: Add release-notes-0.20.0.md 2020-06-02 18:16:51 -04:00
MarcoFalke
faabc6e445
doc: Remove release notes of 0.20.1 release 2020-06-02 18:16:07 -04:00
MarcoFalke
3657aee2d2
Merge #18982: wallet: Minimal fix to restore conflicted transaction notifications
7eaf86d3bf trivial: Suggested cleanups to surrounding code (Russell Yanofsky)
b604c5c8b5 wallet: Minimal fix to restore conflicted transaction notifications (Russell Yanofsky)

Pull request description:

  This fix is a based on the fix by Antoine Riard (ariard) in https://github.com/bitcoin/bitcoin/pull/18600.

  Unlike that PR, which implements some new behavior, this just restores previous wallet notification and status behavior for transactions removed from the mempool because they conflict with transactions in a block. The behavior was accidentally changed in two `CWallet::BlockConnected` updates: a31be09bfd and 7e89994133 from https://github.com/bitcoin/bitcoin/pull/16624, causing issue https://github.com/bitcoin/bitcoin/issues/18325.

  The change here could be improved and replaced with a more comprehensive cleanup, so it includes a detailed comment explaining future considerations.

  Fixes #18325

  Co-authored-by: Antoine Riard (ariard)

ACKs for top commit:
  jonatack:
    Re-ACK 7eaf86d3bf
  ariard:
    ACK 7eaf86d, reviewed, built and ran tests.
  MarcoFalke:
    ACK 7eaf86d3bf 🍡

Tree-SHA512: 9a1efe975969bb522a9dd73c41064a9348887cb67883cd92c6571fd2df4321b9f4568363891abdaae14a3b9b168ef8142e95c373fc04677e46289b251fb84689
2020-06-02 18:11:52 -04:00
fanquake
5879bfa9a5
Merge #18792: wallet: Remove boost from PeriodicFlush
fa1c74fd03 wallet: Remove unused boost::thread_interrupted (MarcoFalke)
fa7b885f51 walletdb: Remove unsed boost/thread (MarcoFalke)
5555d978b0 wallet: Make PeriodicFlush uninterruptible (MarcoFalke)

Pull request description:

  The `boost::this_thread::interruption_point()` in the code base currently block the replacement of `boost::thread` with `std::thread`. [1]

  Remove them from the wallet because they are either unused or useless.

  The feature to interrupt a periodic flush is useless because all wallets have just been flushed 9ccaee1d5e/src/init.cpp (L194) and another flush should be a noop. Also, they will be flushed again shortly after 9ccaee1d5e/src/init.cpp (L285), so even if repeated flushes weren't a noop, doing 3 instead of 2 shouldn't matter too much at this point. Also, the wallet is flushed every two seconds in the worst case, so if this is an expensive operation, that period should be readjusted. (Or bdb should be removed altogether #18916)

  [1] Replacement of `boost::thread` with `std::thread` should happen because:

  * The boost thread dependency is slow to compile
  * Boost thread is less maintained than the standard lib
  * Boost thread is mostly redundant to the standard lib
  * Global interruption points via exceptions are hard to keep track of during review and easy to get wrong during runtime (e.g. accidental `catch (...)`)

ACKs for top commit:
  fanquake:
    ACK fa1c74fd03

Tree-SHA512: b166619256de2ef4325480fa1367f68bc9371ad785ec503aed61eab41ba61f1a9807aab25451a24efda3db64855c9ba0025645b98bc58557bc3ec56c5b3297d0
2020-06-02 22:35:03 +08:00
MarcoFalke
9e8bd217cd
Merge #13204: Faster sigcache nonce
152e8baf08 Use salted hasher instead of nonce in sigcache (Jeremy Rubin)
5495fa5850 Add Hash Padding Microbenchmarks (Jeremy Rubin)

Pull request description:

  This PR replaces nonces in two places with pre-salted hashers.

  The nonce is chosen to be 64 bytes long so that it forces the SHA256 hasher to process the chunk. This leaves the next 64 (or 56 depending if final chunk) open for data. In the case of the script execution cache, this does not make a big performance improvement because the nonce was already properly padded to fit into one buffer, but does make the code a little simpler. In the case of the sig cache, this should reduce the hashing overhead slightly because we are less likely to need an additional processing step.

  I haven't benchmarked this, but back of the envelope it should reduce the hashing by one buffer for all combinations except compressed public keys with compact signatures.

ACKs for top commit:
  ryanofsky:
    Code review ACK 152e8baf08. No code changes, just rebase since last review and expanded commit message

Tree-SHA512: b133e902fd595cfe3b54ad8814b823f4d132cb2c358c89158842ae27daee56ab5f70cde2585078deb46f77a6e7b35b4cc6bba47b65302b7befc2cff254bad93d
2020-06-02 07:32:15 -04:00
MarcoFalke
45a1489997
Merge #19122: test: Add missing sync_blocks to wallet_hd
fa7d3a8890 test: Add missing sync_blocks to wallet_hd (MarcoFalke)
eeeed51f58 test: pep-8 wallet_hd (MarcoFalke)

Pull request description:

  This fixes the `                                   test_framework.authproxy.JSONRPCException: non-final (-26)` error when node 1 is one block behind of node 0. (height 122 vs 123)

ACKs for top commit:
  promag:
    Code review ACK fa7d3a8890.

Tree-SHA512: b549dce2e08c58b949168ed2013bfa176802c963d0d7e890f643c8792da5dade14d91441dfa74372f1f1d34d696e8900a2b60b4861c0ba2dce99f2a633ab27ff
2020-06-02 07:13:51 -04:00
MarcoFalke
fa1c74fd03
wallet: Remove unused boost::thread_interrupted
FindWalletTx is only called by zapwallet, which is never called in a
boost::thread
2020-06-02 07:11:46 -04:00
MarcoFalke
1f7fe59460
Merge #19111: Limit scope of all global std::once_flag
fa9c675591 Limit scope of all global std::once_flag (MarcoFalke)

Pull request description:

  `once_flag` is  a helper (as the name might suggest) to execute a callable only once. Thus, the scope of the flag does never need to extend beyond where the callable is called. Typically this is function scope.

  Move all the flags to function scope to
  * simplify code review
  * avoid mistakes where similarly named flags are accidentally exchanged
  * avoid polluting the global scope

ACKs for top commit:
  hebasto:
    ACK fa9c675591, tested on Linux Mint 19.3 (x86_64).
  promag:
    Code review ACK fa9c675591.

Tree-SHA512: 095a0c11d93d0ddcb82b3c71676090ecc7e3de3d5e7a2a63ab2583093be279242acac43523bbae2060b4dcfa8f92b54256a0e91fbbae78fa92d2d49e9db62e57
2020-06-02 07:04:19 -04:00
Jonas Schnelli
44307449f7
Merge #19104: gui, refactor: Register Qt meta types in application constructor
4f49d5222e gui, refactor: Register Qt meta types in application constructor (João Barbosa)

Pull request description:

  Removes a warning when running `QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt`.

ACKs for top commit:
  jonasschnelli:
    Re utACK 4f49d5222e
  hebasto:
    ACK 4f49d5222e, tested on macOS 10.15.5.

Tree-SHA512: e931a022ba83cb0ef04d82544ebd9b18242f8fc2b41443afce4d5c4222f222e8b3517bdb484a1a4f61377c5dceca067d8ccf250da3a727299448e54bec33ed6e
2020-06-02 08:48:04 +02:00
Kiminuo
bd7e530f01 This PR adds initial support for type hints checking in python scripts.
Support for type hints was introduced in Python 3.5. Type hints make it easier to read and review code in my opinion. Also an IDE may discover a potential bug sooner. Yet, as PEP 484 says: "It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention."

Mypy is used in lint-python.sh to do the type checking. The package is standard so there is little chance that it will be abandoned. Mypy checks that type hints in source code are correct when they are not, it fails with an error.

Useful resources:

* https://docs.python.org/3.5/library/typing.html
* https://www.python.org/dev/peps/pep-0484/
2020-06-02 08:03:02 +02:00
fanquake
9bc7751cad
Merge #19115: doc: Add release notes for 17219
fac0ed16ec doc: Sync "how to upgrade" with 0.20.0 release notes (MarcoFalke)
fa861794d3 doc: Add release notes for 17219 (MarcoFalke)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK fac0ed16ec - seems to match the relevant changes in 79606b56b2, 36c1d981d4 and  4c17c85c6c

Tree-SHA512: f04c2b3a1cd094d7f50e3f8db06d726873d2412d651c94bf38d17fd5ee0c47c84480d6b20ec18641888ee88012e7c59e7e794467a0eed1caf44c0569feecc4ca
2020-06-01 16:07:05 +08:00
fanquake
a8327fd71f
Merge #19072: doc: Expand section on Getting Started
facef3d413 doc: Explain that anyone can work on good first issues, move text to CONTRIBUTING.md (MarcoFalke)
fae2fb2a19 doc: Expand section on Getting Started (MarcoFalke)
100000d1b2 doc: Add headings to CONTRIBUTING.md (MarcoFalke)
fab893e0ca doc: Fix unrelated typos reported by codespell (MarcoFalke)

Pull request description:

  Some random doc changes:

  * Add sections to docs, so that they can be linked to
  * Explain that anyone (even maintainers) are allowed to work on good first issues
  * Expand section on Getting Started slightly

ACKs for top commit:
  hebasto:
    ACK facef3d413
  fanquake:
    ACK facef3d413

Tree-SHA512: 8998e273a76dbf4ca77e79374c14efe4dfcc5c6df6b7d801e1e1e436711dbe6f76b436f9cbc6cacb45a56827babdd6396f3bd376a9426ee7be3bb9b8a3b8e383
2020-06-01 15:38:57 +08:00
MarcoFalke
a65b55fa45
Merge #18994: tests: Add fuzzing harnesses for functions in script/
f898ef65c9 tests: Add fuzzing harness for functions in script/sign.h (practicalswift)
c91d2f0615 tests: Add fuzzing harness for functions in script/sigcache.h (practicalswift)
d3d8adb79f tests: Add fuzzing harness for functions in script/interpreter.h (practicalswift)
fa80117cfd tests: Add fuzzing harness for functions in script/descriptor.h (practicalswift)
43fb8f0ca3 tests: Add fuzzing harness for functions in script/bitcoinconsensus.h (practicalswift)
8de72711c6 tests: Fill fuzzing coverage gaps for functions in script/script.h, script/script_error.h and script/standard.h (practicalswift)
c571ecb071 tests: Add fuzzing helper functions ConsumeDataStream, ConsumeTxDestination and ConsumeUInt160 (practicalswift)

Pull request description:

  Add fuzzing harnesses for functions in `script/`:
  * Add fuzzing helper functions `ConsumeDataStream` and `ConsumeUInt160`
  * Fill fuzzing coverage gaps for functions in `script/script.h`, `script/script_error.h` and `script/standard.h`
  * Add fuzzing harness for functions in `script/bitcoinconsensus.h`
  * Add fuzzing harness for functions in `script/descriptor.h`
  * Add fuzzing harness for functions in `script/interpreter.h`
  * Add fuzzing harness for functions in `script/sigcache.h`
  * Add fuzzing harness for functions in `script/sign.h`

  See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets).

  Happy fuzzing :)

ACKs for top commit:
  MarcoFalke:
    ACK f898ef65c9 🔉

Tree-SHA512: f6e77b34dc79f23de5fa9e38ac06e6554b5b946ec3e9a67e2bd982e60aca37ce844f785457ef427a5e3b45e31c305456bca8587cc9f4a0b50b3852e39726eb04
2020-05-31 18:58:41 -04:00
MarcoFalke
faf62e6ed0
ci: Remove unused workaround 2020-05-31 18:37:56 -04:00
MarcoFalke
fa7c850915
ci: Install llvm to get llvm symbolizer 2020-05-31 18:37:43 -04:00
MarcoFalke
07d0e0d59f
Merge #19044: net processing: Add support for getcfilters
9e36067d8c [test] Add test for cfilters. (Jim Posen)
11106a4722 [net processing] Message handling for getcfilters. (Jim Posen)
e535670726 [indexes] Fix default [de]serialization of BlockFilter. (Jim Posen)
bb911ae7f5 [refactor] Pass CNode and CConnman by reference (John Newbery)

Pull request description:

  Support `getcfilters` requests when `-peerblockfilters` is set.

  Does not advertise compact filter support in version messages.

ACKs for top commit:
  Empact:
    re-Code Review ACK 9e36067d8c
  MarcoFalke:
    re-ACK 9e36067d8c , only change is adding commit "[refactor] Pass CNode and CConnman by reference" 🥑
  jkczyz:
    ACK 9e36067d8c
  fjahr:
    Code review ACK 9e36067d8c

Tree-SHA512: b45b42a25905ef0bd9e195029185300c86856c87f78cbe17921f4a25e159ae0f6f003e61714fa43779017eb97cd89d3568419be88e47d19dc8095562939e7887
2020-05-31 18:20:17 -04:00
MarcoFalke
091cc4b94e
Merge #16564: test: Always define the raii_event_tests test suite
9a19c9ada5 Always define the raii_event_tests test suite (Craig Andrews)

Pull request description:

  The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test.

  This improves upon 95f97f4 actually fixing https://github.com/bitcoin/bitcoin/issues/9493

ACKs for top commit:
  MarcoFalke:
    ACK 9a19c9ada5 🎹

Tree-SHA512: 3c42f17a9b5d56c8841f3aa9ac19da91c10aff210026266f31f7eb98a62528740d7c518c121452b68e8f801d6c80ecfb627d137ec6ed533289fa3beb08b4f176
2020-05-31 17:55:55 -04:00
MarcoFalke
fa563cef61
test: Add more tsan suppressions 2020-05-31 10:52:06 -04:00
MarcoFalke
fa7d3a8890
test: Add missing sync_blocks to wallet_hd 2020-05-31 07:51:44 -04:00
MarcoFalke
eeeed51f58 test: pep-8 wallet_hd 2020-05-31 07:36:22 -04:00
MarcoFalke
dec067f5a0
Merge #18965: tests: implement base58_decode
60ed33904c tests: implement base58_decode (10xcryptodev)

Pull request description:

  implements TODO: def base58_decode

ACKs for top commit:
  ryanofsky:
    Code review ACK 60ed33904c. Just suggested changes since last review. Thank you for taking suggestions!

Tree-SHA512: b3c06b4df041a6d88033cd077a093813a688e42d0b9aa777c715e5fd69cfba7b1bf984428bd98417d3c15232d3d48bc9c163317564f9e1d562db6611c21e2c10
2020-05-30 12:33:49 -04:00
MarcoFalke
fac0ed16ec
doc: Sync "how to upgrade" with 0.20.0 release notes 2020-05-30 12:31:36 -04:00
MarcoFalke
fa861794d3
doc: Add release notes for 17219 2020-05-30 12:28:07 -04:00
MarcoFalke
826fe9c667
Merge #18807: [doc / test / mempool] unbroadcast follow-ups
9e1cb1adf1 [trivial/doc] Fix comment type (Amiti Uttarwar)
8f30260a67 [doc] Update unbroadcast description in RPC results (Amiti Uttarwar)
750456d6f2 [trivial] Remove misleading 'const' (Amiti Uttarwar)
fa32e676e5 [test] Manage node connections better in mempool persist test (Amiti Uttarwar)
1f94bb0c74 [doc] Provide rationale for randomization in scheduling. (Amiti Uttarwar)
9c8a55d9cb [mempool] Don't throw expected error message when upgrading (Amiti Uttarwar)
ba54983182 [test] Test that wallet transactions aren't rebroadcast before 12 hours (Amiti Uttarwar)
00d44a534b [test] P2P connection behavior should meet expectations (Amiti Uttarwar)
bd093ca15d [test] updates to unbroadcast test (Amiti Uttarwar)
dab298d9ab [docs] add release notes (Amiti Uttarwar)

Pull request description:

  This PR is a follow up to #18038 which introduced the idea of an unbroadcast set & focuses mostly on documentation updates and test fixes. One small functionality update to not throw an expected error in `LoadMempool` when you upgrade software versions.

  #18895 is another follow up to that addresses other functionality updates.

  Background context:
  The unbroadcast set is a mechanism for the mempool to track locally submitted transactions (via wallet or RPC). The node does a best-effort of delivering the transactions to the network via retries every 10-15 minutes until either a `GETDATA` is received or the transaction is removed from the mempool.

ACKs for top commit:
  MarcoFalke:
    ACK 9e1cb1adf1 👁
  gzhao408:
    ACK [`9e1cb1a`](9e1cb1adf1)

Tree-SHA512: 0cd51c4ca368b9dce92d50d73ec6e9df278a259e609eef2858f24cb8595ad07acc3db781d9eb0c351715f18fca5a2b4526838981fdb34a522427e9dc868bdaa6
2020-05-30 12:22:09 -04:00
MarcoFalke
fa0cc02c0a
ci: Mute depends logs completely 2020-05-30 08:33:44 -04:00
MarcoFalke
fa906bf298
test: Extend tsan suppressions for clang stdlib 2020-05-30 08:33:06 -04:00
MarcoFalke
fa10d85079
ci: Use libc++ instead of libstdc++ for tsan 2020-05-30 08:33:02 -04:00
MarcoFalke
fa0d5ee112
ci: Set halt_on_error=1 for tsan 2020-05-30 08:32:58 -04:00
MarcoFalke
fa2ffe87f7
ci: Deduplicate DOCKER_EXEC 2020-05-30 08:32:33 -04:00
MarcoFalke
fac2eeeb9d
cirrus: Remove no longer needed install step 2020-05-30 08:32:29 -04:00
MarcoFalke
e478b11db0
Merge #19110: test: Explain that a bug should be filed when the tests fail
fad21a1a7a test: Explain that a bug should be filed when the test fail (MarcoFalke)

Pull request description:

  Without a bug report it is harder to fix the issue

ACKs for top commit:
  hebasto:
    ACK fad21a1a7a, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.
  fanquake:
    ACK fad21a1a7a

Tree-SHA512: db194e8f8c0f07b2f4c9ef27e456510959f89da69435cee71605d720e0ad06f18700973f5af25ea31a190b933eb35f2743f014878aa3f8293500e06b4907ebbd
2020-05-30 06:49:27 -04:00
practicalswift
f898ef65c9 tests: Add fuzzing harness for functions in script/sign.h 2020-05-30 10:37:01 +00:00
practicalswift
c91d2f0615 tests: Add fuzzing harness for functions in script/sigcache.h 2020-05-30 10:37:01 +00:00
practicalswift
d3d8adb79f tests: Add fuzzing harness for functions in script/interpreter.h 2020-05-30 10:37:01 +00:00
practicalswift
fa80117cfd tests: Add fuzzing harness for functions in script/descriptor.h 2020-05-30 10:37:01 +00:00
practicalswift
43fb8f0ca3 tests: Add fuzzing harness for functions in script/bitcoinconsensus.h 2020-05-30 10:37:01 +00:00
practicalswift
8de72711c6 tests: Fill fuzzing coverage gaps for functions in script/script.h, script/script_error.h and script/standard.h 2020-05-30 10:37:01 +00:00
fanquake
98ebe7896d
Merge #18820: build: Propagate well-known vars into depends
f0d7ed10b4 depends: Propagate only specific CLI variables to sub-makes (Carl Dong)
0a33803f1c depends: boost: Use clang toolset if clang in CXX (Carl Dong)
1ce74bcde3 depends: boost: Split target-os from toolset (Carl Dong)
2d4e480813 depends: boost: Specify toolset to bootstrap.sh (Carl Dong)
3d6603e340 depends: Propagate well-known vars into depends (Carl Dong)

Pull request description:

  From: https://github.com/bitcoin/bitcoin/pull/18308#issuecomment-598301117

  The following monstrosity is quite useful when invoked inside `depends`, and reviewers can use it to compare the behaviour of this change against master.
  ```bash
  make print-{{,{host,{,{i686,x86_64,riscv64}_}linux}_}{CC,CXX},boost_{cc,cxx}}
  ```

  It would also be helpful to make sure that setting `HOST`, `CC`, and `CXX` does the right thing. The 3 hosts I found offered good coverage were: `{x86_64,i686,riscv64}-linux-gnu`. As we special-case the `x86_64` and `i686` hosts in `depends/hosts/linux.mk`, and `riscv64` is a sanity check for a non-special-cased host.

ACKs for top commit:
  hebasto:
    ACK f0d7ed10b4, tested on Linux Mint 19.3 (x86_64):
  practicalswift:
    ACK f0d7ed10b4 -- patch looks correct
  laanwj:
    Code review and concept ACK f0d7ed10b4
  ryanofsky:
    Code review ACK f0d7ed10b4. Changes since last review: adding comment explaining check for predefined make variables, dropping freetype commit, adding commit whitelisting overrides for recursive makes

Tree-SHA512: b6b8e76f713c26a0add6cd685824e2f5639109236ee9f89338f7c79cb1b1f2c3897bfb62b80b023d6d1943b5a6eb282a2f827f1f499c5e556eca015d6635fa65
2020-05-30 11:15:10 +08:00
MarcoFalke
fa9c675591
Limit scope of all global std::once_flag 2020-05-29 17:22:07 -04:00
MarcoFalke
fad21a1a7a
test: Explain that a bug should be filed when the test fail 2020-05-29 15:33:54 -04:00
MarcoFalke
cb88de3e3d
Merge #18926: test: Pass ArgsManager into getarg_tests
f871f15c9d scripted-diff: replace gArgs with argsman (glowang)
357f02bf29 Create a local class inherited from BasicTestingSetup with a localized args manager and put it into the getarg_tests namespace (glowang)

Pull request description:

  Replaced the global argsManager gArgs with a locally defined one in getarg_tests. This is to avoid confusion in arg settings between the test's ArgsManager and the   #18804

ACKs for top commit:
  MarcoFalke:
    ACK f871f15c9d
  ryanofsky:
    Code review ACK f871f15c9d. Changes look good and thanks for updating. In future would recommend using clang-format-diff and following [coding style](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-c) notes, because it's atypical to indent namespace content, or indent protected keywords or put spaces around ::. Also it's fragile to define test setup class in a namespace, but test setup methods outside of the namespace and inside the test fixture instead. Would be simpler to just define the testing setup completely before using it without a namespace like: 8ad5f1c376/src/test/rpc_tests.cpp (L23) and it would have been a slightly smaller change too.

Tree-SHA512: 016594639396d60667fadec8ea80ef7af634fbb2014c704f02406fe3251c5362757c21f1763d8bdb94ca4a3026ab9dc786a92a9a934efc8cd807655d9deee779
2020-05-29 14:23:43 -04:00
Jonas Schnelli
8ad5f1c376
Merge #19106: util: simplify the interface of serviceFlagToStr()
189ae0c38b util: dedup code in callers of serviceFlagToStr() (Vasil Dimov)
fbacad1880 util: simplify the interface of serviceFlagToStr() (Vasil Dimov)

Pull request description:

  Don't take two redundant arguments in `serviceFlagToStr()`.

  Introduce `serviceFlagsToStr()` which takes a mask (with more than one
  bit set) and returns a vector of strings.

  As a side effect this fixes an issue introduced in
  https://github.com/bitcoin/bitcoin/pull/18165 due to which the GUI could
  print something like `UNKNOWN[1033] & UNKNOWN[1033] & UNKNOWN[2^10]`
  instead of `NETWORK & WITNESS`.

ACKs for top commit:
  MarcoFalke:
    ACK 189ae0c38b
  jonasschnelli:
    Tested ACK 189ae0c38b

Tree-SHA512: 000c490f16ebbba04458c62ca4ce743abffd344d375d95f5bbd5008742012032787655db2874b168df0270743266261dccf1693761906567502dcbac902bda50
2020-05-29 19:43:08 +02:00
Vasil Dimov
189ae0c38b
util: dedup code in callers of serviceFlagToStr()
Introduce `serviceFlagsToStr()` which hides the internals of the bitmask
and simplifies callers of `serviceFlagToStr()`.
2020-05-29 18:59:37 +02:00