Commit Graph

27975 Commits

Author SHA1 Message Date
MarcoFalke
ed25cb58f6
Merge bitcoin-core/gui#217: qt: Make warning label look clickable
67c59ae479 qt: Make warning label look clickable (Jarol Rodriguez)

Pull request description:

  The warning icon on the overview page indicates that there is something important the user should know about, but a user may not be aware that they can click it because, on `master`, the warning label does not look clickable. As detailed in issue #23, the reason to make it look clickable is that it if they "had a more clickable-appearance (borders or beveled button edges) it could help users more quickly understand what they are being alerted to."

  This PR removes the `flat` property from both `QPushButton`'s to make them look like a button, and therefore clickable. Furthermore, it updates the `Maximum Width` to `45` to fix the small hit-box issue outlined in issue #215.

  Below are screenshots showing how the warning icon looks under `master` and this `PR`:

  **macOS 11.1: Qt 5.15**
  | Master        | PR               |
  | ----------- | ----------- |
  |  <img width="754" alt="Screen Shot 2021-02-22 at 5 00 40 PM" src="https://user-images.githubusercontent.com/23396902/108776135-f6d50380-752f-11eb-9f96-25163c6a2a02.png"> | <img width="754" alt="Screen Shot 2021-02-22 at 3 08 40 PM" src="https://user-images.githubusercontent.com/23396902/108776068-e0c74300-752f-11eb-9545-3580e2b8f187.png"> |

  **Ubuntu 20.04: Qt 5.12**

  | Master        | PR               |
  | ----------- | ----------- |
  | <img width="783" alt="Screen Shot 2021-02-22 at 4 57 32 PM" src="https://user-images.githubusercontent.com/23396902/108776249-284dcf00-7530-11eb-8325-7fe13a9243a7.png"> |   ![Screen Shot 2021-02-22 at 4 12 54 PM](https://user-images.githubusercontent.com/23396902/108776428-60eda880-7530-11eb-8999-59ddd70de85f.png) |

  Closes #23
  Closes #215

ACKs for top commit:
  Talkless:
    tACK 67c59ae479, tested on Debian Sid. Does look as expected.

Tree-SHA512: 2b7302fb990ea49e2f01df6f4a23e2bc3de0797da89deaeb299742e6b285a0c21ea80d8259dc0222640cccc2bccc4ea09df443b9a11bf8b88a828e5fb2aec12c
2021-03-05 08:20:44 +01:00
MarcoFalke
f7653eb5ae
Merge #21345: test: bring p2p_leak.py up to date
a061a29970 test: bring p2p_leak.py up to date. (Martin Zumsande)

Pull request description:

  After the introduction of wtxidrelay and sendaddrv2 messages during version handshake, extend p2p_leak.py test to reflect this.
  Also, some minor fixes and doc improvements.

  I also added a test that peers not completing the version handshake will be disconnected for timeout, as suggested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/19723#issuecomment-699540294.

ACKs for top commit:
  brunoerg:
    Tested ACK a061a29970
  theStack:
    Tested ACK a061a29970

Tree-SHA512: 26c601491fa8710fc972d1b8f15da6b387a95b42bbfb629ec4c668769ad3824b6dd6a33d97363bca2171e403d8d1ce08abf3e5c9cab34f98d53e0109b1c7a0e5
2021-03-05 08:18:42 +01:00
fanquake
da8c7edffe
Merge #21364: fuzz: Avoid -Wreturn-type warnings
3f3646855c fuzz: Avoid -Wreturn-type warnings (practicalswift)

Pull request description:

  Avoid `-Wreturn-type` warnings.

  Closes #21355.

ACKs for top commit:
  MarcoFalke:
    cr ACK 3f3646855c
  fanquake:
    ACK 3f3646855c - thanks for cleaning this up.

Tree-SHA512: 6fa2640a26e64d2bea60e016ad14b5c434137fedc0b3bf2ac244f02f9b1cd303d1ebac4ac4e6791534560f8311c4cbe9395c2ce94d7ec022d3b192f1ea070809
2021-03-05 10:42:38 +08:00
fanquake
fbf5d16238
Merge #21246: doc: Correction for VerifyTaprootCommitment comments
6a0a6e7d05 Correction for VerifyTaprootCommitment comments (Russell O'Connor)

Pull request description:

  According to BIP-341, 'p' is called the taproot *internal* key, not inner key.

ACKs for top commit:
  sipa:
    ACK 6a0a6e7d05
  benthecarman:
    ACK 6a0a6e7d05
  theStack:
    ACK 6a0a6e7d05

Tree-SHA512: 94f553476a8404bff4b2d5724a1a54c5f530b987a616cd00a3800095f245c06e3c7a9066c729976f32069a56029406859a70ba523151d333dc1ed874f242bce8
2021-03-05 10:30:33 +08:00
fanquake
2620ac4ec3
Merge #21354: build, doc: Drop no longer required packages from macOS cross-compiling dependencies
f7f3829a68 build, doc: Drop libbz2-dev from macOS cross-compiling dependencies (Hennadii Stepanov)
d8239362e2 build, doc: Drop libcap-dev from macOS cross-compiling dependencies (Hennadii Stepanov)

Pull request description:

  The `libcap-dev` and `libbz2-dev` packages are no longer required when cross-compiling for macOS.

ACKs for top commit:
  fanquake:
    ACK f7f3829a68

Tree-SHA512: 820cdc2724f3346c0942d4d4115fc7206f7bf02889d9fa6cbdbd1d9e3afa03a067c1c3fa64dff596aefdc74898178b7c7d64027a6501486e3b606f4760de04ae
2021-03-05 09:41:33 +08:00
practicalswift
3f3646855c fuzz: Avoid -Wreturn-type warnings 2021-03-04 20:29:28 +00:00
Wladimir J. van der Laan
b4d22654fe
Merge #21337: guix: Update darwin native packages dependencies
c967fb7fb9 guix: Remove libcap from manifest (Hennadii Stepanov)
7bbb409314 guix: Update darwin native packages dependencies (Hennadii Stepanov)

Pull request description:

  It is a #20470 follow up.

ACKs for top commit:
  fanquake:
    ACK c967fb7fb9

Tree-SHA512: 66ce05770f578ba61a44c58747c5a2669f425a989ed987838058bd86e3b49e342ac5a4f8852fc49f2b3a86b58fb6a340fdf3e34c1fc19bdab910729febba4bc7
2021-03-04 16:01:25 +01:00
Wladimir J. van der Laan
702cfc8c53
Merge #21055: [Bundle 3/n] Prune remaining g_chainman usage in validation functions
e11b649650 validation: CVerifyDB::VerifyDB: Use locking annotation (Carl Dong)
03f75c42e1 validation: Use existing chain member in CChainState::LoadGenesisBlock (Carl Dong)
5e4af77380 validation: Use existing chain member in CChainState::AcceptBlock (Carl Dong)
fee73347c0 validation: Pass in chain to FindBlockPos+SaveBlockToDisk (Carl Dong)
a9d28bcd8d validation: Use *this in CChainState::ActivateBestChainStep (Carl Dong)
4744efc9ba validation: Pass in chainstate to CTxMemPool::check (Carl Dong)
1fb7b2c595 validation: Use *this in CChainState::InvalidateBlock (Carl Dong)
8cdb2f7e58 validation: Move LoadBlockIndexDB to CChainState (Carl Dong)
8b99efbcc0 validation: Move invalid block handling to CChainState (Carl Dong)
2bdf37fe18 validation: Pass in chainstate to CVerifyDB::VerifyDB (Carl Dong)
31eac50c72 validation: Remove global ::VersionBitsTip{State,SinceHeight,Statistics} (Carl Dong)
63e4c7316a validation: Pass in chainstate to ::PruneBlockFilesManual (Carl Dong)
4bada76237 validation: Pass in chainstate to UpdateTip (Carl Dong)
a3ba08ba7d validation: Remove global ::{{Precious,Invalidate}Block,ResetBlockFailureFlags} (Carl Dong)
4927c9e699 validation: Remove global ::LoadGenesisBlock (Carl Dong)
9da106be4d validation: Check chain tip is non-null in CheckFinalTx (Carl Dong)

Pull request description:

  Overall PR: #20158 (tree-wide: De-globalize ChainstateManager)

  Based on:
  - [x] #20750 | [Bundle 2/n] Prune g_chainman usage in mempool-related validation functions

  Note to reviewers:
  1. This bundle may _apparently_ introduce usage of `g_chainman` or `::Chain(state|)Active()` globals, but these are resolved later on in the overall PR. [Commits of overall PR](https://github.com/bitcoin/bitcoin/pull/20158/commits)
  2. There may be seemingly obvious local references to `ChainstateManager` or other validation objects which are not being used in callers of the current function in question, this is done intentionally to **_keep each commit centered around one function/method_** to ease review and to make the overall change systematic. We don't assume anything about our callers. Rest assured that once we are considering that particular caller in later commits, we will use the obvious local references. [Commits of overall PR](https://github.com/bitcoin/bitcoin/pull/20158/commits)
  3. When changing a function/method that has many callers (e.g. `LookupBlockIndex` with 55 callers), it is sometimes easier (and less error-prone) to use a scripted-diff. When doing so, there will be 3 commits in sequence so that every commit compiles like so:
  1. Add `new_function`, make `old_function` a wrapper of `new_function`, divert all calls to `old_function` to `new_function` **in the local module only**
  2. Scripted-diff to divert all calls to `old_function` to `new_function` **in the rest of the codebase**
  3. Remove `old_function`

  Note to self:
  - [x] Address: https://github.com/bitcoin/bitcoin/pull/20750#discussion_r579400663

ACKs for top commit:
  laanwj:
    Code review ACK e11b649650

Tree-SHA512: 205a451a741e32f17d5966de289f2f5a3f0817738c0087b70ff4755ddd217b53d01050ed396669bda2b1d216a88d927b9778777f9ff95ab1fe20e59c5f341776
2021-03-04 14:55:47 +01:00
fanquake
83bdbbd300
Merge #21003: test: Move MakeNoLogFileContext to libtest_util, and use it in bench
fa576b4532 Move MakeNoLogFileContext to common libtest_util, and use it in bench (MarcoFalke)

Pull request description:

  To avoid verbose code duplication, which may lead to accidental mishaps https://github.com/bitcoin/bitcoin/pull/20998/files#r563624041.

  Also fix a nit I found in https://github.com/bitcoin/bitcoin/pull/20946#discussion_r561949731.

ACKs for top commit:
  dongcarl:
    Light Code-Review ACK fa576b4532
  fanquake:
    ACK fa576b4532

Tree-SHA512: d39ac9c0957813ebb20ed13bd25a8ef8469377ce2651245638bd761c796feac2a17e30dd16f1e5c8db57737fb918c81d56a3d784c33258275e426a1b11e69eb2
2021-03-04 20:29:09 +08:00
fanquake
7450a01691
Merge #21358: fuzz: Add missing include (test/util/setup_common.h)
fa59ad5130 fuzz: Add missing include (test/util/setup_common.h) (MarcoFalke)

Pull request description:

  `src/test/fuzz/socks5.cpp` is using the symbol `BasicTestingSetup`, which is defined in `src/test/util/setup_common.h`.

  Currently compilation happens to succeed because the needed dependency is indirectly included. Compilation will break as soon as the indirect dependency is broken. According to the dev notes, everything that is used must be included.

  Fix the issue by including the missing include.

ACKs for top commit:
  fanquake:
    ACK fa59ad5130

Tree-SHA512: 9359d5d288ebc5a53d753ebed1ee8d49ddcfe12aeb56054ea43654c0d915337bb0dce7c8a7178e94711ff8dacd1b3ea0a2871b21b1709cd9786efc0c1ef532b3
2021-03-04 20:20:43 +08:00
fanquake
33921379b6
Merge #21015: Make all of net_processing (and some of net) use std::chrono types
0eaea66e8b Make tx relay data structure use std::chrono types (Pieter Wuille)
55e82881a1 Make all Poisson delays use std::chrono types (Pieter Wuille)
c733ac4d8a Convert block/header sync timeouts to std::chrono types (Pieter Wuille)
4d98b401fb Change all ping times to std::chrono types (Pieter Wuille)

Pull request description:

  (Picking up #20044. Rebased against master.)

  This changes various uses of integers to represent timestamps and durations to `std::chrono` duration types with type-safe conversions, getting rid of various `.count()`, constructors, and conversion factors.

ACKs for top commit:
  jnewbery:
    utACK 0eaea66e8b
  vasild:
    ACK 0eaea66e8b
  MarcoFalke:
    re-ACK 0eaea66e8b, only changes: minor rename, using C++11 member initializer, using 2min chrono literal, rebase 🤚
  ajtowns:
    utACK 0eaea66e8b

Tree-SHA512: 2dbd8d53bf82e98f9b4611e61dc14c448e8957d1a02575b837fadfd59f80e98614d0ccf890fc351f960ade76a6fb8051b282e252e81675a8ee753dba8b1d7f57
2021-03-04 20:13:43 +08:00
Wladimir J. van der Laan
92b7efcf54
Merge #21148: Split orphan handling from net_processing into txorphanage
5e50e2d1b9 txorphanage: comment improvements (Anthony Towns)
eeeafb324e net_processing: move AddToCompactExtraTransactions into PeerManagerImpl (Anthony Towns)
f8c0688b94 scripted-diff: Update txorphanage naming convention (Anthony Towns)
6bd4963c06 txorphanage: Move functions and data into class (Anthony Towns)
03257b832d txorphanage: Extract EraseOrphansForBlock (Anthony Towns)
3c4c3c2fdd net_processing: drop AddOrphanTx (Anthony Towns)
26d1a6ccd5 denialofservices_tests: check txorphanage's AddTx (Anthony Towns)
1041616d7e txorphanage: Extract OrphanageAddTx (Anthony Towns)
f294da7274 txorphanage: Extract GetOrphanTx (Anthony Towns)
83679ffc60 txorphanage: Extract HaveOrphanTx (Anthony Towns)
ee135c8d5b txorphanage: Extract AddChildrenToWorkSet (Anthony Towns)
38a11c355a txorphanage: Add lock annotations (Anthony Towns)
81dd57e5b1 txorphanage: Pass uint256 by reference instead of value (Anthony Towns)
9d5313df7e move-only: Add txorphanage module (Anthony Towns)

Pull request description:

  Splits orphan handling into its own module and reduces global usage.

ACKs for top commit:
  jnewbery:
    utACK 5e50e2d1b9
  amitiuttarwar:
    utACK 5e50e2d1b9
  glozow:
    re ACK 5e50e2d1b9, comment updates
  laanwj:
    Code review ACK 5e50e2d1b9

Tree-SHA512: 92a959bb5dd414c96f78cb8dcaa68adb85faf16b8b843a2cbe0bb2aa08df13ad6bd9424d29b98f57a82ec29c942fbdbea3011883d00bf0b0feb643e295174e46
2021-03-04 10:16:38 +01:00
MarcoFalke
fa59ad5130
fuzz: Add missing include (test/util/setup_common.h) 2021-03-04 08:39:27 +01:00
MarcoFalke
d099894ec1
Merge #20969: test: check that getblockfilter RPC fails without block filter index
233a886b42 test: check that getblockfilter RPC fails without block filter index (Sebastian Falbesoner)

Pull request description:

  If a node was started without compact block filter index (parameter `--blockfilterindex=0`), the `getblockfilter` RPC call should fail.

ACKs for top commit:
  MarcoFalke:
    review ACK 233a886b42

Tree-SHA512: c8824373fad7d1de2dcb43c1d9541d736b478235be243080d2b7479c2588eac0e5722337ec1307394b331e0002fbcabb368e4955c2dc98dd5fce76d8c089e8a1
2021-03-04 08:37:10 +01:00
Hennadii Stepanov
f7f3829a68
build, doc: Drop libbz2-dev from macOS cross-compiling dependencies 2021-03-03 22:43:08 +02:00
Hennadii Stepanov
d8239362e2
build, doc: Drop libcap-dev from macOS cross-compiling dependencies 2021-03-03 22:38:45 +02:00
Carl Dong
e11b649650 validation: CVerifyDB::VerifyDB: Use locking annotation
...instead of recursively locking unconditionally
2021-03-03 14:56:26 -05:00
Hennadii Stepanov
c967fb7fb9
guix: Remove libcap from manifest 2021-03-03 21:50:15 +02:00
Carl Dong
03f75c42e1 validation: Use existing chain member in CChainState::LoadGenesisBlock 2021-03-03 14:49:30 -05:00
Carl Dong
5e4af77380 validation: Use existing chain member in CChainState::AcceptBlock 2021-03-03 14:49:30 -05:00
Carl Dong
fee73347c0 validation: Pass in chain to FindBlockPos+SaveBlockToDisk 2021-03-03 14:49:30 -05:00
Carl Dong
a9d28bcd8d validation: Use *this in CChainState::ActivateBestChainStep 2021-03-03 14:49:30 -05:00
Carl Dong
4744efc9ba validation: Pass in chainstate to CTxMemPool::check
This is the only instance where validation reaches for something outside
of it.
2021-03-03 14:49:29 -05:00
Wladimir J. van der Laan
47b99ab1a9
Merge #20406: util: Avoid invalid integer negation in FormatMoney and ValueFromAmount
1f05dbd06d util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() (practicalswift)
7cc75c9ba3 util: Avoid invalid integer negation in FormatMoney: make FormatMoney(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() (practicalswift)

Pull request description:

  Avoid invalid integer negation in `FormatMoney` and `ValueFromAmount`.

  Fixes #20402.

  Before this patch:

  ```
  $ CC=clang CXX=clang++ ./configure --with-sanitizers=undefined
  $ make -C src/ test/test_bitcoin
  $ src/test/test_bitcoin -t rpc_tests/rpc_format_monetary_values -t util_tests/util_FormatMoney
  core_write.cpp:21:29: runtime error: negation of -9223372036854775808 cannot be represented in type 'CAmount'
    (aka 'long'); cast to an unsigned type to negate this value to itself
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior core_write.cpp:21:29 in
  test/rpc_tests.cpp(186): error: in "rpc_tests/rpc_format_monetary_values":
    check ValueFromAmount(std::numeric_limits<CAmount>::min()).write() == "-92233720368.54775808" has failed
    [--92233720368.-54775808 != -92233720368.54775808]
  util/moneystr.cpp:16:34: runtime error: negation of -9223372036854775808 cannot be represented in type 'CAmount'
    (aka 'long'); cast to an unsigned type to negate this value to itself
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior util/moneystr.cpp:16:34 in
  test/util_tests.cpp(1188): error: in "util_tests/util_FormatMoney":
    check FormatMoney(std::numeric_limits<CAmount>::min()) == "-92233720368.54775808" has failed
    [--92233720368.-54775808 != -92233720368.54775808]
  ```

  After this patch:

  ```
  $ CC=clang CXX=clang++ ./configure --with-sanitizers=undefined
  $ make -C src/ test/test_bitcoin
  $ src/test/test_bitcoin -t rpc_tests/rpc_format_monetary_values -t util_tests/util_FormatMoney
  ```

ACKs for top commit:
  laanwj:
    re-ACK 1f05dbd06d

Tree-SHA512: 5aaeb8e2178f1597921f53c12bdfc2f3d5993d10c41658dcd25943e54e8cc2116a411bc71d928f890b33bc0b3761a8ee4449b0532bce41125b6c60692808c8c3
2021-03-03 19:04:36 +01:00
Pieter Wuille
0eaea66e8b Make tx relay data structure use std::chrono types 2021-03-03 09:48:07 -08:00
Pieter Wuille
55e82881a1 Make all Poisson delays use std::chrono types 2021-03-03 09:48:07 -08:00
Pieter Wuille
c733ac4d8a Convert block/header sync timeouts to std::chrono types 2021-03-03 09:48:07 -08:00
Pieter Wuille
4d98b401fb Change all ping times to std::chrono types 2021-03-03 09:48:07 -08:00
Wladimir J. van der Laan
cabe63759c
Merge #20877: netinfo: user help and argument parsing improvements
7d3343fb8e cli: update -netinfo help doc following the merge of 882ce251 (Jon Atack)
ef614bb408 cli: small -netinfo simplification and performance improvement (Jon Atack)
6b45ef3233 cli: improve -netinfo invalid argument error message (Jon Atack)
3732404afa cli: warn in help that -netinfo is not intended to be a stable API (Jon Atack)
7afdd72258 cli: enable -netinfo help to run without a remote server (Jon Atack)

Pull request description:

  A few updates, some per IRC discussion today at http://www.erisian.com.au/bitcoin-core-dev/log-2021-01-07.html#l-87 with respect to -netinfo:

  - enable `-netinfo help` to run without a remote server
  - warn in `-netinfo help` that -netinfo is not intended to be a stable API
  - improve the -netinfo invalid argument error message
  - make a performance improvement and simplification I noticed after the merge of #20764
  - update the -netinfo help doc following the merge of #21192
  -----

  How to test manually:  🔬 🧪  📈

  1. check out and build this branch locally; if you need help, don't hesitate to refer to https://jonatack.github.io/articles/how-to-review-pull-requests-in-bitcoin-core#pull-down-the-code-locally or https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests
  2. while it is compiling, look at the code changes
  3. stop signet (if it is running) with `./src/bitcoin-cli -signet stop`
  4. once the build is completed, run `./src/bitcoin-cli -signet -netinfo help`
  5. the help should be printed even though the signet server is not running
  6. near the top you should see the new warning, "This human-readable interface will change regularly and is not intended to be a stable API" as well as a bit more description about the integer argument values.
  7. start signet with `./src/bitcoind -signet`
  8. test the improved invalid argument error message if you run `./src/bitcoin-cli -signet -netinfo 256` or `./src/bitcoin-cli -signet -netinfo a` (valid values are from 0 to 255)
  9. leave review feedback or `ACK <commit hash>` -- done 🍻

ACKs for top commit:
  michaelfolkson:
    Re-ACK 7d3343fb8e
  pinheadmz:
    RE-ACK 7d3343fb8e

Tree-SHA512: 28c5e9f295ffccba5c2a70faac4987d45f35d4758cf8f10daa767e83212316c4cfc65930e4066f7ad627e9d15b92d43439d1ba9c2f755dfde61885c6a70aa155
2021-03-03 15:19:35 +01:00
MarcoFalke
ebd8d66454
Merge #19203: net: Add regression fuzz harness for CVE-2017-18350. Add FuzzedSocket.
366e3e1f89 fuzz: Add FUZZED_SOCKET_FAKE_LATENCY mode to FuzzedSock to allow for fuzzing timeout logic (practicalswift)
b22d4c1607 fuzz: Add fuzzing harness for Socks5(...) (practicalswift)

Pull request description:

  Add [regression fuzz harness](https://twitter.com/kayseesee/status/1205287895923212289) for CVE-2017-18350. This fuzzing harness would have found CVE-2017-18350 within a minute of fuzzing :)

  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:
  vasild:
    ACK 366e3e1f89

Tree-SHA512: 5d8e1863b635efd10ccb11678b71472ba1523c3ef16affa7f9cd638635c1a9c307e28f432d5b87eb0c9cd1c3c1aeafbb24fa7ae86fe4e5090fda2e20d542b6ca
2021-03-03 14:41:05 +01:00
fanquake
97a35f3ae5
Merge #21320: build: fix libnatpmp macos cross compile
bd49ac4168 build: fix libnatpmp macos cross compile (fanquake)

Pull request description:

  Currently, our cross-compile of libnatpmp for macOS doesn't work at all.
  The wrong archiver is used, which produces an archive the linker doesn't like.
  This becomes clear when configuring:
  ```bash
  configure:25722: checking for initnatpmp in -lnatpmp
  configure:25747: env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/ubuntu/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang++ --target=x86_64-apple-darwin18 <trim>  -Wl,-headerpad_max_install_names -Wl,-dead_strip -Wl,-dead_strip_dylibs conftest.cpp -lnatpmp   >&5
  ld: archive has no table of contents for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  ```

  Fix this by using the right `ar` (we do the same for upnp).

  While we're at it, fix the build so that we are using our c/ppflags.
  In practice this basically means building with `-O2` rather than `-Os`.

  Note that this fixes an issue that is also fixed by #21209. However, given there are reservations about updating to use a newer libnatpmp source, we should just fix this for now.

ACKs for top commit:
  hebasto:
    ACK bd49ac4168, tested:

Tree-SHA512: 2efc2c788ef3ebebfbf564ef07b6cf63a72d8a0bccc22b0ba36537216aa575436b7e87088477e85f6d9191ad34f0b13f1c22cf88c90e1cb81641bfee5dc3058a
2021-03-03 19:58:25 +08:00
Wladimir J. van der Laan
b1a457ab1d
Merge #21324: doc: Update build instructions for Fedora
4899fa3abd doc: Update build instructions for Fedora (Hennadii Stepanov)

Pull request description:

  This PR updates build instructions for Fedora, as Fedora 33 has no `libdb4-devel` and `libdb4-cxx-devel` packages in its default repos.

ACKs for top commit:
  practicalswift:
    ACK 4899fa3abd

Tree-SHA512: 0c23e2ce0ea690ed5eeaa56514d4246e0057a77b7c71f28af4ee1e480521d465122f81cea37cc773ce2db4fc189d5ab3c8f8ffdd65f150cc006390aa1e2a4ac8
2021-03-03 12:49:59 +01:00
Wladimir J. van der Laan
dd8f474d52
Merge #19288: fuzz: Add fuzzing harness for TorController
10d4477dae tests: Add fuzzing harness for TorController (practicalswift)
64219c01dc torcontrol: Move TorControlReply, TorControlConnection and TorController to improve testability (practicalswift)

Pull request description:

  Add fuzzing harness for `TorController`.

  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:
  laanwj:
    ACK 10d4477dae

Tree-SHA512: 2da4b1000afe0e65a234636b8fbf6a26fe9e257852bd837168ca73aa3575959e9aded19054620439e4ed0b2787c70cad4541a8c2d210f5238d7f5e9e0545b734
2021-03-03 11:50:00 +01:00
MarcoFalke
9212e67463
Merge #21346: doc: install qt5 when building on macOS
bec7f2caf7 doc: install qt5 when building on macOS (fanquake)

Pull request description:

  Brew has updated such that qt now refers to [Qt 6.0.1](https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt.rb). If builders
  install this, configure will not pick up qt. For now, install
  [qt@5 (5.15.2)](https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt@5.rb), until required build system and likely source changes
  are made.

ACKs for top commit:
  hebasto:
    ACK bec7f2caf7, tested on Tested on macOS Big Sur 11.2.2 (20D80).

Tree-SHA512: 86663cfbc68c8c6f5d608d60cd59b37d3faf1e7f33ae17ec2e1a7c076e835eb8200181a17575f121929ea6ecded74b1619096fe5a763106f56de0bdbea9ae4fa
2021-03-03 10:08:01 +01:00
MarcoFalke
fa576b4532
Move MakeNoLogFileContext to common libtest_util, and use it in bench
Can be reviewed with --color-moved=dimmed-zebra
2021-03-03 09:17:37 +01:00
fanquake
fca3e98f64
Merge #18298: build: Fix Qt processing of configure script for depends with DEBUG=1
76f52e3da3 build: Fix Qt processing of configure script for depends with DEBUG=1 (Hennadii Stepanov)

Pull request description:

  This PR:
  - makes the `configure` script correctly pickup Qt if depends is built with `DEBUG=1`:
      - for Windows -- fix #19266
      - for macOS -- fix #16391
  - is an alternative to #18117 (without downsides)

ACKs for top commit:
  fanquake:
    ACK 76f52e3da3. Tested native darwin, and darwin/win cross compile with `DEBUG=1`.

Tree-SHA512: 8fde99302b4b06faf109315bddba9e3063b156c50f8f9863c2bd51718538c719429a63fdced071730c18022f2e559d3b25c1dcec3efa81fe79f657253680956a
2021-03-03 15:48:11 +08:00
Hennadii Stepanov
7bbb409314
guix: Update darwin native packages dependencies 2021-03-03 08:44:49 +02:00
fanquake
bec7f2caf7
doc: install qt5 when building on macOS
Brew has updated such that qt now refers to Qt 6.0.1. If builders
install this, configure will not work pick up qt. For now, install
qt@5 (5.15.2), until required build system and likely source changes
are made.
2021-03-03 12:00:06 +08:00
fanquake
4f223e93e9
Merge #21339: build: Make AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER]) unconditional
a4128138b4 build: Make AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER]) unconditional (Hennadii Stepanov)
9fef209945 build, refactor: Fix indentation for if..then..fi (Hennadii Stepanov)

Pull request description:

  #16546 introduced a regression in the `configure`:

  ```
  $ ./autogen.sh
  $ ./configure --disable-wallet --without-utils --without-daemon --without-gui --disable-tests --disable-bench
  ...
  checking whether to build test_bitcoin... no
  checking whether to reduce exports... no
  checking that generated files are newer than configure... done
  configure: error: conditional "ENABLE_EXTERNAL_SIGNER" was never defined.
  Usually this means the macro was only invoked conditionally.
  ```

  This PR fixes this bug, and refactors indentation to make easier to spot similar bugs in the future.

ACKs for top commit:
  Sjors:
    utACK a4128138b4
  fanquake:
    ACK a4128138b4 - this fixes the bug described, and improves readability.

Tree-SHA512: 4469dcc006690f38f93c3cdf8d15b76f5fc8ea76e87a1b5db5ee891dc9851f6ec539f2a6fd02a361aa76baa4f4b2b9fe8289137f5d9734ee5984f265cb131ef5
2021-03-03 10:54:38 +08:00
fanquake
3a8fc51a56
Merge #21333: build: set Unicode true for NSIS installer
9086e0dd3c build: set Unicode true for NSIS installer (fanquake)

Pull request description:

  Now that we are using Focal for gitian builds, and have [NSIS 3.0+ available](https://packages.ubuntu.com/focal/nsis) (also in Guix), we can create installers that [support unicode](https://nsis.sourceforge.io/Docs/Chapter4.html#aunicodetarget).

  Unicode is only becoming the NSIS default [beginning with the 3.07 release](https://nsis.sourceforge.io/Docs/AppendixF.html#v3.07-cl), so we need to set this attribute to get support.

  Should close: #13817

  Gitian builds:
  ```bash
  b8553615b6b4be5e4459e03796e700b30b5d198a7f184f27be6983ff901b5592  bitcoin-9086e0dd3c92-win-unsigned.tar.gz
  a6b024a5a68e0196e8e118168c918285e820f2d0ffe9c38db680580459da8bf3  bitcoin-9086e0dd3c92-win64-debug.zip
  ff4003d4f61127c707e44b5235eaf924b30351f20cde27e775131982a1b4cf92  bitcoin-9086e0dd3c92-win64-setup-unsigned.exe
  1876bee55fa9ea99b91203975c13d0ad8a046b4b58068bde41c977fd1d12de13  bitcoin-9086e0dd3c92-win64.zip
  000f2778f8f166a89b4ab35f155156c1c34800be6e47d29b5308043c50128392  src/bitcoin-9086e0dd3c92.tar.gz
  d650a9b8f2dd1df777bf42439dfcbcf6bc358e30ec148b9992a18b39f76b1ecf  bitcoin-core-win-22-res.yml
  ```

ACKs for top commit:
  laanwj:
    ACK 9086e0dd3c
  hebasto:
    ACK 9086e0dd3c, tested on Windows 10 Pro (20H2, build 19042.804):

Tree-SHA512: cc7b7ca05877571d0a29a7d36e40279f54d886d8ab27facfa722c2ee95a1fc06c2bad8ef1eb1980d283ae981659d737021a46c8f4618e24d510b5ab384990e09
2021-03-03 09:57:52 +08:00
fanquake
0459e7abba
Merge #21336: Make .gitignore ignore src/test/fuzz/fuzz.exe
35da623574 Make .gitignore ignore src/test/fuzz/fuzz.exe (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  MarcoFalke:
    cr ACK 35da623574
  practicalswift:
    cr ACK 35da623574

Tree-SHA512: 7e88f4f3ad409b38269fcc7b81c075567aa8a5c2365ff8d3e5b148309e6110722eb84d5732a19f90b81e778bf134d93a886287da70dda708c15477f124e87b03
2021-03-03 08:07:54 +08:00
fanquake
0b294c0ba8
Merge #21342: doc: Remove outdated comment
f1f63ac3f8 doc: Remove outdated comment (Hennadii Stepanov)

Pull request description:

  The removed commit has been wrong [since v0.20.0](https://github.com/bitcoin/bitcoin/pull/18331).

ACKs for top commit:
  fanquake:
    ACK - f1f63ac3f8

Tree-SHA512: ef6191fef389fa0ee5e6cf224e4990a1804aeefd1c3e9d9a4870cf46e1833fbb8701c379b6ce4e13caa02ae2f4f86778fa2c1e994c89392c08fcf01701482d7a
2021-03-03 07:20:41 +08:00
Martin Zumsande
a061a29970 test: bring p2p_leak.py up to date.
After the introduction of wtxidrelay and sendaddrv2 messages during
version handshake, extend p2p_leak.py test to reflect this.
Also, some minor fixes and doc improvements.
2021-03-03 00:16:16 +01:00
practicalswift
366e3e1f89 fuzz: Add FUZZED_SOCKET_FAKE_LATENCY mode to FuzzedSock to allow for fuzzing timeout logic 2021-03-02 21:44:51 +00:00
practicalswift
b22d4c1607 fuzz: Add fuzzing harness for Socks5(...) 2021-03-02 21:43:42 +00:00
Hennadii Stepanov
f1f63ac3f8
doc: Remove outdated comment
The removed commit is wrong since v0.21.0.
2021-03-02 22:14:18 +02:00
Hennadii Stepanov
a4128138b4
build: Make AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER]) unconditional
This change fixes an error when the value of the "use_boost" variable is
equal to "no".
2021-03-02 19:07:31 +02:00
Hennadii Stepanov
9fef209945
build, refactor: Fix indentation for if..then..fi
This makes easier to spot conditional macros.
2021-03-02 18:55:07 +02:00
practicalswift
1f05dbd06d util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() 2021-03-02 16:05:28 +00:00
practicalswift
7cc75c9ba3 util: Avoid invalid integer negation in FormatMoney: make FormatMoney(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() 2021-03-02 16:05:28 +00:00