Commit graph

22530 commits

Author SHA1 Message Date
Pieter Wuille
9250a087d2 Convert addrdb/addrman to new serialization 2020-01-02 11:05:36 -08:00
Pieter Wuille
ca33451535 Introduce new serialization macros without casts
This new approach uses a static method which takes the object as
a argument. This has the advantage that its constness can be a
template parameter, allowing a single implementation that sees the
object as const for serialization and non-const for deserialization,
without casts.

More boilerplate is included in the new macro as well.
2020-01-02 11:05:27 -08:00
MarcoFalke
3f8dbcd655
Merge #16658: validation: Rename CheckInputs to CheckInputScripts
3bd8db80d8 [validation] fix comments in CheckInputScripts() (John Newbery)
6f6465cefc scripted-diff: [validation] Rename CheckInputs to CheckInputScripts (John Newbery)

Pull request description:

  CheckInputs() used to check no double spends, scripts & sigs and amounts. Since
  832e074, the double spend and amount checks
  have been moved to CheckTxInputs(), and CheckInputs() now just validates
  input scripts. Rename the function to CheckInputScripts().

  Also fix incorrect comments.

ACKs for top commit:
  MarcoFalke:
    re-ACK 3bd8db80d8, did the rebase myself, checked the scripted diff 👡
  promag:
    ACK 3bd8db80d8 :trollface:

Tree-SHA512: 7b3f8597d210492798fb784ee8ea47ea6377519111190161c7cc34a967509013f4337304f52e9bedc97b7710de7b0ff8880e08cd7f867754567f82e7b02c794c
2020-01-02 11:09:00 -05:00
Wladimir J. van der Laan
0655c7a94c
Merge #17787: scripts: add MACHO PIE check to security-check.py
7c9e821c4e scripts: add MACHO NOUNDEFS check to security-check.py (fanquake)
4ca92dc6d3 scripts: add MACHO PIE check to security-check.py (fanquake)

Pull request description:

  This uses `otool -vh` to print the mach header and look for the `PIE` flag:
  ```bash
  otool -vh src/bitcoind
  Mach header
        magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
  MH_MAGIC_64  X86_64        ALL LIB64     EXECUTE    24       2544   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE
  ```

  From [`mach-o/loader.h`](https://opensource.apple.com/source/cctools/cctools-927.0.2/include/mach-o/loader.h.auto.html):
  ```c
  #define	MH_PIE 0x200000			/* When this bit is set, the OS will
  					   load the main executable at a
  					   random address.  Only used in
  					   MH_EXECUTE filetypes. */
  ```

ACKs for top commit:
  laanwj:
    code review ACK 7c9e821c4e

Tree-SHA512: 5ba2f60440d0e31c70371a355c91ca4f723d80f7287d04e2098bf5b11892cc74216ff8f1454603c4db9675d4f7983614843b992b8dcfca0309aadf2aa7ab2e4b
2020-01-02 12:48:49 +01:00
fanquake
7c9e821c4e
scripts: add MACHO NOUNDEFS check to security-check.py 2020-01-02 14:42:23 +08:00
fanquake
4ca92dc6d3
scripts: add MACHO PIE check to security-check.py 2020-01-02 14:42:21 +08:00
fanquake
35fff5be60
Merge #17825: doc: Update dependencies.md
df97e59207 doc: Update dependencies.md (Hennadii Stepanov)

Pull request description:

  Updated info about:
  - Qt-bundled FreeType library on Android
  - Qt-bundled HarfBuzz-NG library
  - Qt dependency version (5.9.7 -> 5.9.8, #16413)

ACKs for top commit:
  fanquake:
    ACK df97e59207
  promag:
    ACK df97e59207.
  elichai:
    ~ACK df97e592078a33f6bf535979e05967c563de317b~

Tree-SHA512: 8e36520026e9e59376a1128576fbddf8313f9f7ddc7155ca462a4350ed0354d423a56127d2000b80159c677b74259eaf9348519d79a215f4fb46931bea3c2c3a
2019-12-31 21:32:26 +03:00
fanquake
99813a9745
Merge #17829: scripted-diff: Bump copyright of files changed in 2019
aaaaad6ac9 scripted-diff: Bump copyright of files changed in 2019 (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK aaaaad6ac9
  promag:
    ACK aaaaad6ac9 🎉
  fanquake:
    ACK aaaaad6ac9 - going to merge this now because the year is over and conflicts are minimal.

Tree-SHA512: 58cb1f53bc4c1395b2766f36fabc7e2332e213780a802762fff0afd59468dad0c3265f553714d761c7a2c44ff90f7dc250f04458f4b2eb8eef8b94f8c9891321
2019-12-31 20:52:26 +03:00
MarcoFalke
8830cb58ab
Merge #17741: build: Included test_bitcoin-qt in msvc build
592af5ad3a Moved the include of the system projects to before the build depends on task. Otherwise it doesn't get run. (Aaron Clauson)
6e2215187e Included test_bitcoin-qt in msvc build. (Aaron Clauson)

Pull request description:

  This PR includes the `test_bitcoin-qt` project in the msvc build. The project is already in the repo but is not part of the solution and therefore does not get built.

  The test executable output from this project does not pass successfully on Windows (it may never have). This PR only builds the project and does not add a step to execute the tests.

  MarcoFalke mentioned the fact that it's missing in #17571.

Top commit has no ACKs.

Tree-SHA512: ebb8fc7710022b995e842708bbf83b9c0084dac5e1a22fa3f53d9ea472faabe96d75ad53150cc915ded5f782515a896f2b60840390bde38c1d0f80d0fd56a4ea
2019-12-31 01:09:49 +13:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
Hennadii Stepanov
df97e59207
doc: Update dependencies.md 2019-12-29 13:07:50 +02:00
MarcoFalke
b931f61b9a
Merge #17801: doc: Update license year range to 2020
8dc9aa90c3 doc: Update license year range to 2020 (Emil Engler)

Pull request description:

  See #15061
  The same procedure as every year. Happy new year to all of you :)

Top commit has no ACKs.

Tree-SHA512: f2d924a739f6becc050a22cd0e37d97653ac1ef78ec645c98b5647ae2e65b9668851e24090d3ab3585503235113e1c48ea20580c35538afac5043026589bf830
2019-12-28 20:53:33 +01:00
MarcoFalke
6cb80a068d
Merge #17806: test: Change filemode of rpc_whitelist.py
90df92206c test: Change filemode of rpc_whitelist.py (Emil Engler)

Pull request description:

  All python tests have the file mode `755`.
  Probably due to a mistake `rpc_whitelist.py` is the only test with the permission `644`.
  This PR makes it coherent with the other tests and updates it to `755` as well.

ACKs for top commit:
  practicalswift:
    ACK 90df92206c -- all tests should be executable

Tree-SHA512: b9e69cb5184a3bbee4c7b14ac35985145a9fd3403d0e449d79f15c18e9660cafec495d639f5f730e0c69dde5f4a3d7590b4e42d385e794cd02add1f4e3b785e7
2019-12-27 22:52:50 +01:00
Emil Engler
90df92206c
test: Change filemode of rpc_whitelist.py 2019-12-27 21:19:44 +01:00
Emil Engler
8dc9aa90c3
doc: Update license year range to 2020 2019-12-26 23:11:21 +01:00
fanquake
1dbf3350c6
Merge #17793: ci: Update GitHub Actions CI vcpkg cache on MSBuild update
0b5a366bd7 ci: Update vcpkg cache on MSBuild update (Hennadii Stepanov)
b6fa752bc7 ci: Update Qt binaries for GitHub Actions (Hennadii Stepanov)

Pull request description:

  On master (0cda557340) Visual Studio update in GitHub Actions CI virtual environment could break a build as the `vcpkg` cache is not updated accordingly (see #17788).

  This PR:
  - force vcpkg cache update on MSBuild update
  - is an alternative to #17789
  - fixes #17788

ACKs for top commit:
  fanquake:
    ACK 0b5a366bd7

Tree-SHA512: b9e69cb5184a3bbee4c7b14ac35985145a9fd3403d0e449d79f15c18e9660cafec495d639f5f730e0c69dde5f4a3d7590b4e42d385e794cd02add1f4e3b785e7
2019-12-23 18:38:00 -05:00
Hennadii Stepanov
0b5a366bd7
ci: Update vcpkg cache on MSBuild update 2019-12-23 20:05:18 +02:00
Hennadii Stepanov
b6fa752bc7
ci: Update Qt binaries for GitHub Actions
On 2019-12-09 Visual Studio has been upgraded to 16.4.0 in Windows
Server 2019 (windows-latest) virtual environment.
2019-12-23 20:04:24 +02:00
MarcoFalke
0cda557340
Merge #17751: doc: use recommended shebang approach in documentation code block
6094222de7 use preferred shebang approach for documentation (hackerrdave)

Pull request description:

  Documentation update to use recommended shebang approach mentioned in the [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#shebang)

ACKs for top commit:
  hebasto:
    ACK 6094222de7, I have reviewed the code, and it looks OK, I agree it can be merged.

Tree-SHA512: fc58632f0a6fa82c7abdddfac4897f082110d647426d2b468cba6fabf6b34a015fcad47e5b26be98e629b8b0417b8781e8d89da67189e20da228b97b17f1a532
2019-12-21 02:13:21 +07:00
MarcoFalke
6677be64f6
Merge #17473: refactor: Settings code cleanups
e9fd366044 refactor: Remove null setting check in GetSetting() (Russell Yanofsky)
cba2710220 scripted-diff: Remove unused ArgsManager type flags in tests (Russell Yanofsky)
425bb30725 refactor: Add util_CheckValue test (Russell Yanofsky)
0fa54358b0 refactor: Add ArgsManager::GetSettingsList method (Russell Yanofsky)
3e185522ac refactor: Get rid of ArgsManagerHelper class (Russell Yanofsky)
dc0f148074 refactor: Replace FlagsOfKnownArg with GetArgFlags (Russell Yanofsky)
57e8b7a727 refactor: Clean up includeconf comments (Russell Yanofsky)
3f7dc9b808 refactor: Clean up long lines in settings code (Russell Yanofsky)

Pull request description:

  This PR doesn't change behavior. It just implements some suggestions from #15934 and #16545 and few other small cleanups.

ACKs for top commit:
  jnewbery:
    Code review ACK e9fd366044
  MarcoFalke:
    ACK e9fd366044 🚟

Tree-SHA512: 6e100d92c72f72bc39567187ab97a3547b3c06e5fcf1a1b74023358b8bca552124ca6a53c0ab53179b7f1329c03d9a73faaef6d73d2cd1a2321568a0286525e2
2019-12-20 03:05:28 +07:00
MarcoFalke
3e94938072
Merge #17772: doc: Mention PR Club in CONTRIBUTING.md
34d826ea5f doc: Mention PR Club in CONTRIBUTING.md (Emil Engler)

Pull request description:

  As we have a ["Review Club"](https://github.com/bitcoin/bitcoin/labels/Review%20club) label it would be worth mentioning it in the CONTRIBUTING.md file for beginners.

ACKs for top commit:
  practicalswift:
    ACK 34d826ea5f -- The Bitcoin Core PR Review Club is a great effort to introduce new contributors to the project in a positive and friendly way! We need that kind of newcomer friendly on-ramps to attract and educate the next generation of contributors! Kudos to @ jnewbery for helping secure the project also in the super long-term :)

Tree-SHA512: 9c6cbe9a82e1f13db10ad19c50a55566dbe3f5ccaf5b91f75c5a743f7f4f690515274d64c132460791bd4d8e76255b5cbfb2877908459734b52e3fbdba71fbb3
2019-12-19 23:51:47 +07:00
fanquake
7f9fbb89e8
Merge #17769: build: set AC_PREREQ to 2.69
4f4ae6f97e build: set AC_PREREQ to 2.69 (fanquake)

Pull request description:

  We use build macros such as `AX_CHECK_LINK_FLAG`, that require >=2.64, so our configure should also require Autoconf >= 2.64. The build would already blow up if 2.64 wasn't available. i.e:
  ```bash
  configure.ac:320: error: Autoconf version 2.64 or higher is required
  build-aux/m4/ax_check_link_flag.m4:74: AX_CHECK_LINK_FLAG is expanded from...
  ```
  For reference, Autoconf 2.69 was released in [April of 2012](https://lists.gnu.org/archive/html/autoconf/2012-04/msg00041.html).

  See the [Autoconf Versioning docs](https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Versioning.html) for more info on `AC_PREREQ`.

ACKs for top commit:
  hebasto:
    re-ACK 4f4ae6f97e, Autoconf 2.69 seems wide available.
  laanwj:
    ACK 4f4ae6f97e

Tree-SHA512: b77de9164ae6667513d40edaf9e16c6e7734c100643297b2dbb2ff54072774fdeab7b3b15d52979b99e204c1c4dcca4725ff155d7f6fdab7a867629130e10185
2019-12-19 11:10:28 -05:00
fanquake
4f4ae6f97e build: set AC_PREREQ to 2.69
We use build macros such as AX_CHECK_LINK_FLAG, that require >=2.64, so
our configure should also require Autoconf >= 2.64. The build would
already blow up if 2.64 wasn't available. i.e:

configure.ac:320: error: Autoconf version 2.64 or higher is required
build-aux/m4/ax_check_link_flag.m4:74: AX_CHECK_LINK_FLAG is expanded from...

For reference, Autoconf 2.69 was released in April of 2012.
https://lists.gnu.org/archive/html/autoconf/2012-04/msg00041.html

See https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Versioning.html
for more info on AC_PREREQ.
2019-12-18 16:36:17 -05:00
Emil Engler
34d826ea5f
doc: Mention PR Club in CONTRIBUTING.md 2019-12-18 17:52:46 +01:00
fanquake
6fef85bfa3
Merge #17764: doc: Add formatting to the good first issue template
faede70882 doc: Add formatting to the good first issue template (MarcoFalke)

Pull request description:

  Add minor formatting to the good first issue template so that it is easier to see with one glance what the required skills are.

  Preview is here: https://github.com/MarcoFalke/bitcoin-core/issues/new/choose

ACKs for top commit:
  fanquake:
    ACK faede70882

Tree-SHA512: 0b0fcd051166981455061442e69f42c9fa726eaa228856e57434e012f7224781f4f3f12c31ce0a7a322df9999e79a8fbe63bf800b7933bc52c7cdaed90f37598
2019-12-17 17:02:01 -05:00
fanquake
47f45b6776
Merge #17686: build: add -bind_at_load to macOS hardened LDFLAGS
c78b123982 build: add -bind_at_load to hardened LDFLAGS (fanquake)

Pull request description:

  This performs the same function as `-Wl,-z,now`, except for ld on macOS.

  You can check the binaries using `otool -l`, and looking for the `LC_DYLD_INFO_ONLY` section; `lazy_bind_off` and `lazy_bind_size` should both be 0.

  This seems to be the case with our current release binaries. However we can make the check, and applying the flag explicit in configure.

  man ld:
  ```bash
  -bind_at_load
  Sets a bit in the mach header of the resulting binary which tells dyld
  to bind all symbols when the binary is loaded, rather than lazily.
  ```
  TODO:
  - [ ] Follow up with `MH_BINDATLOAD` flag.

ACKs for top commit:
  theuni:
    ACK c78b123982.

Tree-SHA512: 12259558b84f7e3d75d6fcde63b517685e42b18fcf8e8cfcf347483c5ba089d3b4b6d330e7b7f61f83a328fe4d141b771e8e52ddee9cac6da87dfc073ab1183d
2019-12-17 16:32:18 -05:00
hackerrdave
6094222de7 use preferred shebang approach for documentation 2019-12-17 12:18:13 -05:00
fanquake
ab4e6ad762
Merge #17756: build: remove WINDOWS_BITS from build system
abc147de95 build: remove WINDOWS_BITS from build system (fanquake)

Pull request description:

  We no longer build/ship 32 bit windows executables.

ACKs for top commit:
  laanwj:
    LGTM ACK abc147de95

Tree-SHA512: 7101393cddb7e578740e4c79532dac981eb963630ce63c28dfebf0f5ecde266c1836ac0efd1fd82e6010a6151755ad2cc2b09bc2f67edd7c0c77060ac046a9cd
2019-12-17 12:16:19 -05:00
fanquake
e6acd9f72c
Merge #17537: wallet: Cleanup and move opportunistic and superfluous TopUp()s
6e77a7b65c keypool: Add comment about TopUp and when to use it (Andrew Chow)
ea50e34b28 keypool: Move opportunistic TopUps from LegacyScriptPubKeyMan to CWallet and ReserveDestination (Andrew Chow)
bb2c8ce23c keypool: Remove  superfluous topup from CWallet::GetNewChangeDestination (Andrew Chow)

Pull request description:

  * The `TopUp()` in `CWallet::GetNewChangeDestination` is unnecessary as currently m_spk_man calls TopUp further down the call stack inside LegacyScriptPubKeyMan::ReserveKeyFromKeyPool (called by LegacyScriptPubKeyMan::GetReservedDestination). This also lets us prepare for future changes with multiple ScriptPubKeyMans in the wallet.
  * An opportunistic `TopUp()` is moved from `LegacyScriptPubKeyMan::GetNewDestination` to `CWallet::GetNewDestination`.
  * Another opportunistic `TopUp()` is moved from `LegacyScriptPubKeyMan::ReserveKeyFromKeyPool`

  Moving opportunistic TopUps ensures that ScriptPubKeyMans will always be topped up before requesting Destinations from them as we cannot  always rely on future ScriptPubKeyMan implementaions topping up internally.

  See also: https://github.com/bitcoin/bitcoin/pull/17373#discussion_r348598174

ACKs for top commit:
  instagibbs:
    utACK 6e77a7b65c only change is slight elaboration on comment
  ryanofsky:
    Code review ACK 6e77a7b65c. Only the comment changed since my previous review.

Tree-SHA512: bdfc8d303842c3fb7c3d40af7abfa6d9dac4ef71a24922bb92229674ee89bfe3113ebb46d3903ac48ef99f0a7d6eaac33282495844f2b31f91b8df55084c421f
2019-12-17 12:01:18 -05:00
MarcoFalke
faede70882
doc: Add formatting to the good first issue template 2019-12-17 11:58:32 -05:00
MarcoFalke
890eac8f82
Merge #17725: ci: Add valgrind run
facb416ad5 ci: Add valgrind run (MarcoFalke)

Pull request description:

  Fixes #17460

ACKs for top commit:
  practicalswift:
    ACK facb416ad5

Tree-SHA512: 55396e548a76f976d7b7170b68bc5f93cfd44656162267172f66db7eb549699a2a22d3b1bb0d5f180fe0697931939e652c8cdb86b435e81e7ce572485798009d
2019-12-17 11:46:22 -05:00
MarcoFalke
a54c16cdb6
Merge #17661: ci: use depends for s390x
e190000869 ci-s390x: Add qemu and depends support in the ci script (Elichai Turkel)

Pull request description:

  Related: #17599

  This adds qemu support just like we have in arm and compile the depends.

  other than that I also fixed some missing includes to make the depends compile.

ACKs for top commit:
  MarcoFalke:
    ACK e190000 (first commit only, didn't look at second commit)

Tree-SHA512: 2b8a39772b86408569f52cdc33832dbce7e5e9cdd710524295f3d259628cdfc017e740f6f94941307d7f8e413236814a95ba851153c617eb5fb75b4bd9a7e52f
2019-12-17 10:46:38 -05:00
Wladimir J. van der Laan
7df6a7ea98
Merge #17758: Fix CNetAddr::IsRFC2544 comment + tests
529d332fbf test: add IsRFC2544 tests (Mark Tyneway)
419ef3b7cc CNetAddr: fix IsRFC2544 comment (Mark Tyneway)

Pull request description:

  The comment describing the functionality of `CNetAddr::IsRFC2544` is incorrect.

  46d6930f8c/src/netaddress.h (L57)

  It should actually read `198.18.0.0/15` based on [RFC 3330](https://tools.ietf.org/html/rfc3330):

  ```
     198.18.0.0/15 - This block has been allocated for use in benchmark
     tests of network interconnect devices.  Its use is documented in
     [RFC2544].
  ```

  See [RFC 2544](https://tools.ietf.org/html/rfc2544) here.

  See the implementation here:

  47d981e827/src/netaddress.cpp (L142-L145)

  This PR also adds tests for the minimum and maximum values that are valid RFC 2544 addresses.

ACKs for top commit:
  practicalswift:
    ACK 529d332fbf
  laanwj:
    ACK 529d332fbf
  promag:
    ACK 529d332fbf, nit could squash.
  jonatack:
    ACK 529d332fbf

Tree-SHA512: 954a9582856d77564e0ea5fd2e3d287d0cfc4ecfe0588115692d01005e8ca7ad8ab20ff390ded867dc91af2bfb758d4e73a336e6c0b7798846c30a6d69b8ae3d
2019-12-17 16:19:29 +01:00
Mark Tyneway
529d332fbf
test: add IsRFC2544 tests 2019-12-16 19:43:15 -08:00
Mark Tyneway
419ef3b7cc
CNetAddr: fix IsRFC2544 comment 2019-12-16 19:42:18 -08:00
MarcoFalke
03dfa36641
Merge #17229: tests: Add fuzzing harnesses for various Base{32,58,64} and hex related functions
c18405732e tests: Add fuzzing harness for various hex related functions (practicalswift)
526dd78bed tests: Add fuzzing harness for various Base{32,58,64} related functions (practicalswift)
32e27129ff util: Move TrimString(...). Introduce default pattern (trims whitespace). Add NODISCARD. (practicalswift)
22d9bae36f tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)

Pull request description:

  Add fuzzing harnesses for various Base{32,58,64} and hex related functions.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/base_encode_decode
  …
  $ src/test/fuzz/hex
  …
  ```

ACKs for top commit:
  MarcoFalke:
    ACK c18405732e 🔁

Tree-SHA512: 4fcbe4f641fc553e43fd5c3c40a6beec0d2ce90c5ffc718213b37fc18aba4c055e51e26f93d01ea1248fd89473d07c9dce77db7f014b47d3abd045f61b5f1905
2019-12-16 19:10:58 -05:00
practicalswift
c18405732e tests: Add fuzzing harness for various hex related functions 2019-12-16 22:50:49 +00:00
practicalswift
526dd78bed tests: Add fuzzing harness for various Base{32,58,64} related functions 2019-12-16 22:50:49 +00:00
practicalswift
32e27129ff util: Move TrimString(...). Introduce default pattern (trims whitespace). Add NODISCARD. 2019-12-16 22:50:49 +00:00
practicalswift
22d9bae36f tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus 2019-12-16 22:50:49 +00:00
MarcoFalke
94c6f2bba4
Merge #17593: test: move more utility functions into test utility library
78e283e656 [test] move wallet helper functions into test library (Martin Zumsande)
f613e5dfda [test] move mining helper functions into test library (Martin Zumsande)
2cb4e8bdc7 [test] move string helper functions into test library (Martin Zumsande)

Pull request description:

  This disbands `test/util.h` and `test/util.cpp` and moves the content into the test utility library recently created in #17542, so that all test utility functions are in one place.

  The content of the original files are split into three modules:
  1) string helper functions go to `test/util/str`
  2) mining helper functions go to the newly created `test/util/mining`
  3) wallet helper functions go to the newly created `test/util/wallet`

ACKs for top commit:
  MarcoFalke:
    ACK 78e283e656 🔧

Tree-SHA512: f182a61e86e76c32bcb84e37f44904d3a4a9c5a321f7a8efdda5368a6623cb8b5a5384ec4f96e67f0357b0c22099f6e3ecd0ac4cb467e3fa3f3128f8d36edfb8
2019-12-16 16:08:56 -05:00
MarcoFalke
f9fd3a27fd
Merge #17750: util: change GetWarnings parameter to bool
7aab8d1024 [style] Code style fixups in GetWarnings() (John Newbery)
492c6dc1e7 util: change GetWarnings parameter to bool (John Newbery)
869b6314fd [qt] remove unused parameter from getWarnings() (John Newbery)

Pull request description:

  `GetWarnings()` changes the format of the output warning string based on a passed-in string argument that can be set to "gui" or "statusbar".

  Change the argument to a bool:

  - there are only two types of behaviour, so a bool is a more natural argument type
  - changing the name to `verbose` does not set any expectations for the how the calling code will use the returned string (currently, `statusbar` is used for RPC warnings, not a status bar)
  - removes some error-handling code for when the passed-in string is not one of the two strings expected.

ACKs for top commit:
  laanwj:
    code review ACK 7aab8d1024
  practicalswift:
    ACK 7aab8d1024 -- diff looks correct :)
  MarcoFalke:
    ACK 7aab8d1024 otherwise.
  promag:
    Code review ACK 7aab8d1024.

Tree-SHA512: 75882c6e3e44aa9586411b803149b36ba487f4eb9cac3f5c8f07cd9f586870bba4488a51e674cf8147f05718534f482836e6a4e3f66e0d4ef6821900c7dfd04e
2019-12-16 16:07:20 -05:00
MarcoFalke
48d64d73c0
Merge #17564: rpc: Use mempool from node context instead of global
fa8e650b52 rest: Use mempool from node context instead of global (MarcoFalke)
fa660d65d7 node: Use mempool from node context instead of global (MarcoFalke)
facbaf092f rpc: Use mempool from node context instead of global (MarcoFalke)

Pull request description:

  Currently they are identical, but in the future we might want to turn
  the mempool into a unique_ptr. Replacing the global with the mempool
  pointer from the node context simplifies this step.

ACKs for top commit:
  jnewbery:
    Code review ACK fa8e650b5
  ryanofsky:
    Code review ACK fa8e650b52, Only the discussed REST server changes since the last review.

Tree-SHA512: 0836f3f39cf90306455962918446e5f8612e88c32072b92afc30929aea1f17430bbda0e2b3668d36c9d6b97d63a93cf4903185194571108642b7bf5a39b89125
2019-12-16 16:05:06 -05:00
fanquake
abc147de95
build: remove WINDOWS_BITS from build system
We no longer build/ship 32 bit windows executables.
2019-12-16 13:12:29 -05:00
fanquake
988eaf2fcb
Merge #17752: doc: fix directory path for secp256k1 subtree in developer-notes
a5089f62bd fix directory path for secp256k1 subtree in developer-notes (hackerrdave)

Pull request description:

  Documentation update to fix the directory path of the `secp256k1` subtree in the developer notes

ACKs for top commit:
  laanwj:
    ACK a5089f62bd

Tree-SHA512: d0986721d7091af26edaee769db78c9aabac25bbaddb2a1bfa96c7208187226e280e9c38897b5227ee6c9e40d5a1af86bb7c58e72c6a30a94a478c4bf54c086e
2019-12-16 11:00:03 -05:00
MarcoFalke
fa8e650b52
rest: Use mempool from node context instead of global 2019-12-16 10:45:22 -05:00
MarcoFalke
806a2c602c
Merge #17071: tests: Add fuzzing harness for CheckBlock(...) and other CBlock related functions
893aa207e8 tests: Add fuzzing harness for CheckBlock(...) and other CBlock related functions (practicalswift)
ec8dcb0199 tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)

Pull request description:

  Add fuzzing harness for `CheckBlock(...)` and other `CBlock` related functions.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/block
  …
  # And to to quickly verify that the relevant code regions are triggered, that the
  # fuzzing throughput seems reasonable, etc.
  $ contrib/devtools/test_fuzzing_harnesses.sh '^block$'
  ```

  `test_fuzzing_harnesses.sh` can be found in PR #17000.

Top commit has no ACKs.

Tree-SHA512: 275abd46d8ac970b28d8176f59124988b1e07c070173e001acd55995b830333417f301c309199fc589da08a6ac4c03aa74650d5e1638f6e3023dfbd3c9f6921d
2019-12-16 10:23:22 -05:00
MarcoFalke
6b51cce65a
Merge #17753: util: Don't allow Base32/64-decoding or ParseMoney(…) on strings with embedded NUL characters. Add tests.
137c80d579 tests: Add tests for decoding/parsing of base32, base64 and money strings containing NUL characters (practicalswift)
a6fc26da55 util: Don't allow DecodeBase32(...) of strings with embedded NUL characters (practicalswift)
93cc18b0f6 util: Don't allow DecodeBase64(...) of strings with embedded NUL characters (practicalswift)
ccc53e43c5 util: Don't allow ParseMoney(...) of strings with embedded NUL characters (practicalswift)

Pull request description:

  Don't allow Base32/64-decoding or `ParseMoney(…)` on strings with embedded `NUL` characters. Add tests.

  Added tests before:

  ```
  $ src/test/test_bitcoin
  Running 385 test cases...
  test/base32_tests.cpp(31): error: in "base32_tests/base32_testvectors":
      check failure == true has failed [false != true]
  test/base64_tests.cpp(31): error: in "base64_tests/base64_testvectors":
      check failure == true has failed [false != true]
  test/util_tests.cpp(1074): error: in "util_tests/util_ParseMoney":
      check !ParseMoney(std::string("\0-1", 3), ret) has failed
  test/util_tests.cpp(1076): error: in "util_tests/util_ParseMoney":
      check !ParseMoney(std::string("1\0", 2), ret) has failed

  *** 4 failures are detected in the test module "Bitcoin Core Test Suite"
  ```

  Added tests after:

  ```
  $ src/test/test_bitcoin
  Running 385 test cases...

  *** No errors detected
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 137c80d579

Tree-SHA512: 9486a0d32b4cf686bf5a47a0778338ac571fa39c66ad6d6d6cede58ec798e87bb50a2f9b7fd79ecd1fef1ba284e4073c1b430110967073ff87bdbbde7cada447
2019-12-16 10:17:17 -05:00
Wladimir J. van der Laan
5e4912f990
Merge #17730: depends: remove Qt networking features
244501fc85 depends: disable unused qt networking features (fanquake)
29d56c62b7 depends: -optimized-qmake is now -optimized-tools (fanquake)
ccdda96804 depends: skip building qt proxies (fanquake)

Pull request description:

  Somewhat of a followup to removing BIP70 support in #17165. This removes networking features from our Qt build. This also removes the need to link against the `CFNetwork` and `SystemConfiguration` libraries on macOS.

  ```diff
  src/qt/bitcoin-qt:
   /usr/lib/libSystem.B.dylib
   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
   /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
   /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
   /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
   /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
   /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  -/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
   /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
   /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
   /usr/lib/libc++.1.dylib
  -/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
   /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
   /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
   /usr/lib/libobjc.A.dylib
  ```

  > Introduced the -optimized-tools option; supersedes -optimized-qmake.

  `optimized-qmake` became `optimized-tools` in Qt 5.6.0. While the former still works, we can use the newer flag.

  A diff of the removed symbols is available [here](https://gist.github.com/fanquake/9c8d5961c91f90a2966191367adfb391).

  We still need to actually build the network module, because we are using `QLocalServer` & `QLocalSocket` in the payment server.

ACKs for top commit:
  Sjors:
    Code review ACK 244501fc85: just a rebase (_updated since I accidentally repeated the previous hash_)
  practicalswift:
    ACK 244501fc85 -- diff looks correct
  promag:
    Code review ACK 244501fc85.

Tree-SHA512: 79734e3c96c40e7e484c86ac4cd4f738c05fcebe4771aeac443883f618a6c766e667909d5f8f14f9bd82f43206387c952458c5fa765cd0830f8beda6e6ac80ae
2019-12-16 13:28:57 +01:00
Wladimir J. van der Laan
c3628e4483
Merge #17743: doc: Add release note for RPC Whitelist
7965e0b41a doc: Add release note for RPC Whitelist (Emil Engler)

Pull request description:

  A release note for #12763

ACKs for top commit:
  laanwj:
    ACK 7965e0b41a

Tree-SHA512: 4ac3e62029a403e64e4cd3183433dc7aa071d42688b689d7cffb8f08dc4b26d2a586d32fa791d2b5679d6b95cd6e34c56e40a5592b9af446ad9429307f7267fe
2019-12-16 11:02:09 +01:00