Commit graph

31403 commits

Author SHA1 Message Date
brunoerg
988024fe37 test: add check_node_connections in util 2021-11-18 13:40:43 -03:00
W. J. van der Laan
2efc8c0999
Merge bitcoin/bitcoin#23198: build: Parse version information in msvc-autogen.py
410f99faed build_msvc/bitcoin_config.h is generated using build_msvc/msvc-autogen.py (CallMeMisterOwl)

Pull request description:

  Added a function that parses version information from `configure.ac` into `build_msvc/bitcoin_config.h`. This is done by default in `msvc-autogen.py`, so manual changing of `build_msvc/bitcoin_config.h` is no longer required.
  In addition to that I updated the Release Process doc.

  Following values are updated:

     -**CLIENT_VERSION_BUILD**
     -**CLIENT_VERSION_IS_RELEASE**
     -**CLIENT_VERSION_MAJOR**
     -**CLIENT_VERSION_MINOR**
     -**COPYRIGHT_YEAR**
     -**PACKAGE_STRING**
     -**PACKAGE_VERSION**

  fixes #23073

ACKs for top commit:
  laanwj:
    Code review and lightly tested ACK 410f99faed

Tree-SHA512: 6b324ec8680b70c405c46a0fcd61836d1b57bb3eaef2cc36bb1e9856890f0423c201a8fdddc95ca0fb5b3dade71ff6d4d14351c606b3351eef2faa0c70bca38a
2021-11-15 15:11:44 +01:00
MarcoFalke
41a1b5f58c
Merge bitcoin/bitcoin#23046: test: Add txindex migration test
fadc4c7272 test: Add txindex migration test (MarcoFalke)

Pull request description:

  Test for #22626

ACKs for top commit:
  theStack:
    Tested ACK fadc4c7272 🌁

Tree-SHA512: fc7133ef52826bf0d4fa2ac72c3f1bed4a185ff7492396552ff2cbf6531b053238039211a710cbb949379c56875cd7715f1ed49a514dd3b3f1b46554e3d4bef5
2021-11-15 09:36:42 +01:00
MarcoFalke
8251316acb
Merge bitcoin/bitcoin#23153: Add an argparse abbreviated mode to --failfast
2198f79e87 Add an argparse abbreviated mode to --failfast (katesalazar)

Pull request description:

  Happy Hacktoberfest, Bitcoin!

  (this PR doesn't really pursue Hacktoberfest)

ACKs for top commit:
  theStack:
    Tested ACK 2198f79e87

Tree-SHA512: 9b21b2044107685514dc298b52850206faed7306a714c007f500733b632f3f8e0e64e4785313a0c305e5908ccfc87ad27cda7554ea11630acfeaf658956eeab8
2021-11-15 09:32:09 +01:00
fanquake
ffcb4374c4
Merge bitcoin/bitcoin#23498: test: remove unnecessary block rehashing prior to solving
a9872e1478 test: remove unnecessary block rehashing prior to solving (Sebastian Falbesoner)

Pull request description:

  Solving a block involves continously rehashing it,

  c9dd5c8d6e/test/functional/test_framework/messages.py (L759-L764)

  i.e. any extra `rehash` calls before are not necessary and can be dropped.

  The instances were identified by searching for all block solving calls via `git grep "solve("` in `./test/functional/`. From 95 instances of `CBlock.solve()` calls, 20 contained an unnecessary rehashing instruction before that are removed in this PR.

ACKs for top commit:
  brunoerg:
    tACK a9872e1478
  rajarshimaitra:
    tACK a9872e1478

Tree-SHA512: 160092be717d0d250778b8ab091ebd77cc6865d2754ef150cf3b4d4ac7304d4bf3d2ebb61ec6b04a55040c8895b9fb4d28653ea4b099d56d90776c9111cf173f
2021-11-15 14:13:59 +08:00
fanquake
5cc8d2e381
Merge bitcoin/bitcoin#23510: doc: Fixed dead link in build-unix.md
0bc1ce0745 Fix Arch linux dead link (0xree)

Pull request description:

  - Fixed dead link referencing an invalid link

ACKs for top commit:
  benthecarman:
    ACK 0bc1ce0745

Tree-SHA512: 330dd2f327458b10afb1ea920bf8fef459b8b2ad45cde4a0a754995fe0684e7f1e6dc8043b41c78cd83ff3b59745597873bdcd84f4b9255932f7425c0dd6a93a
2021-11-15 14:08:45 +08:00
0xree
0bc1ce0745 Fix Arch linux dead link 2021-11-14 23:50:11 +00:00
W. J. van der Laan
a85442f62b
Merge bitcoin/bitcoin#22768: script: Add commits signed with sipas expired key to allow-revsig-commits
365f35481d script: Add commits signed with sipas expired key to allow-revsig-commits (nthumann)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/22737.
  While investigating the issue above, I noticed that there are 141 commits that are signed with sipas expired key.
  To allow `./contrib/verify-commits/verify-commits.py` to succeed, this PR adds them to `allow-revsig-commits`.
  Feel free to confirm that they're indeed signed with an expired key using e.g. `git show --show-signature d8cd7b137fb075616f31d2b43b85fa2e27ea7477` :)

ACKs for top commit:
  laanwj:
    Code review ACK 365f35481d

Tree-SHA512: 860e372c5314714c6c205cd234ebec89756c9ade43a2ed65ed25575ae0a0d4d8dd7cf43692a5b267abe742f87e5cba0a3f1fb76a5fed7b1615ea2859902dfcdf
2021-11-14 15:25:39 +01:00
CallMeMisterOwl
410f99faed build_msvc/bitcoin_config.h is generated using build_msvc/msvc-autogen.py 2021-11-14 15:00:29 +01:00
MarcoFalke
9d2895157e
Merge bitcoin/bitcoin#23500: doc: fix typos
2de1ceb2e9 depends, wallet: fix typos (Dimitris Apostolou)

Pull request description:

ACKs for top commit:
  hebasto:
    ACK 2de1ceb2e9

Tree-SHA512: e33deef3ebd8cda69dd0f2c0e8d0fd5c39375eb014685318b2f131c7a700584d9b9e173e95ff290b1fe3b2dc88922583f2607750445baedf0c97a330a9ff35f2
2021-11-14 08:38:28 +01:00
fanquake
6d83b02619
Merge bitcoin/bitcoin#23493: Use c++17 in clang-format
faeb748f5b Use c++17 in clang-format (MarcoFalke)

Pull request description:

  We currently use `Cpp11`, which "is a deprecated alias for `Latest`" according to https://clang.llvm.org/docs/ClangFormatStyleOptions.html . I doubt this has any effect, but I think for clarity setting to `c++17` make sense.

  Also, remove unneeded settings:

  * `ObjC*`, as we don't write objc code
  * `Penalty`, as there is currently no line limit, so this has no effect
  * `TabWidth`, as we don't use tabs

ACKs for top commit:
  fanquake:
    ACK faeb748f5b - we do have some Objc code, but it never changes.

Tree-SHA512: 50215849b3992e5841b45b281e68d4c58184a365cbaeec0d7adad844ad21672ae1b6247262047e2d7427835ef98fa9d9f83335696448c77303dde9ab0a121639
2021-11-14 11:03:42 +08:00
fanquake
04ae20ae13
Merge bitcoin/bitcoin#23494: build: minor boost tidyups
e734847c1f build: remove duplicate -fvisibility=hidden from Boost build (fanquake)
32659e5897 build: don't install Boost cmake config files (fanquake)

Pull request description:

  Don't install CMake config files we don't use.
  Remove duplicated `-fvisibility=hidden` flag.

  Guix build:
  ```bash
  bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  e7eeffd0df31f8e319e7f099d7c3ba8429b47c8d9f888517b146b0cf079470bc  guix-build-e734847c1f50/output/aarch64-linux-gnu/SHA256SUMS.part
  516c4703e84d74b80b22a2c8ef7f971ab269332d1394841f27cdca76013689f1  guix-build-e734847c1f50/output/aarch64-linux-gnu/bitcoin-e734847c1f50-aarch64-linux-gnu-debug.tar.gz
  4f2e279584d2f46ca3bdd9e67375bfd0a8637dfd183ccdf827248729ea69e858  guix-build-e734847c1f50/output/aarch64-linux-gnu/bitcoin-e734847c1f50-aarch64-linux-gnu.tar.gz
  28298c04b7810489a3be5471435ec63955d33cf57d4dc234e539ab95ba4dfe40  guix-build-e734847c1f50/output/arm-linux-gnueabihf/SHA256SUMS.part
  1a5d3245d982797d98ecfa2325da224b0814823c858ebaf56a6f310fe099b046  guix-build-e734847c1f50/output/arm-linux-gnueabihf/bitcoin-e734847c1f50-arm-linux-gnueabihf-debug.tar.gz
  ef79e545661f8e76811df5a9d1d9299c8cb35485b729377f07e789d559d2298d  guix-build-e734847c1f50/output/arm-linux-gnueabihf/bitcoin-e734847c1f50-arm-linux-gnueabihf.tar.gz
  f92bd538bd10dd7c09644e322d8c53536fde236ac16a0f5405becb3165685e68  guix-build-e734847c1f50/output/dist-archive/bitcoin-e734847c1f50.tar.gz
  56e7934800c630e91fee389ea9c8e95469deafafd58a8fb18616db13675dc51b  guix-build-e734847c1f50/output/powerpc64-linux-gnu/SHA256SUMS.part
  f15a2e7ad3d7be3ab9ee65f7a77df902c303d561b465fb22242bcfa47344be9c  guix-build-e734847c1f50/output/powerpc64-linux-gnu/bitcoin-e734847c1f50-powerpc64-linux-gnu-debug.tar.gz
  776ee33875d9934d9d472e9e735088bb9e9cf58bc9e29102a7a019a52deb28e3  guix-build-e734847c1f50/output/powerpc64-linux-gnu/bitcoin-e734847c1f50-powerpc64-linux-gnu.tar.gz
  19758310e0e19e17d57c59ba9fc4cbb350b64de0ddc050f85136043666b63c44  guix-build-e734847c1f50/output/powerpc64le-linux-gnu/SHA256SUMS.part
  90ad4e0b948e8bf58538f40f648420230e2357c3e2ae9aa331bac44fe98b1d71  guix-build-e734847c1f50/output/powerpc64le-linux-gnu/bitcoin-e734847c1f50-powerpc64le-linux-gnu-debug.tar.gz
  809a9a95dfa84fab4f365b687e68b58195a00810d6c9f3442c5b1155630d9515  guix-build-e734847c1f50/output/powerpc64le-linux-gnu/bitcoin-e734847c1f50-powerpc64le-linux-gnu.tar.gz
  3ea0563f95f3d6a2ecbdeb4ddf06187db1fbbf1dbabe77db38218f0c13a6dd2b  guix-build-e734847c1f50/output/riscv64-linux-gnu/SHA256SUMS.part
  1730fe70782024ae1558c9065361d4dc754683c6b5fecc420cf990c8b37a5f08  guix-build-e734847c1f50/output/riscv64-linux-gnu/bitcoin-e734847c1f50-riscv64-linux-gnu-debug.tar.gz
  720b6d6625c009e54d6a8b50e0dacdf7723374d52ace6a23874db6d3e540665d  guix-build-e734847c1f50/output/riscv64-linux-gnu/bitcoin-e734847c1f50-riscv64-linux-gnu.tar.gz
  bbf89e748b089ba68c50c9c03b81cb7f4b0517939dacd2e6a72d2480713c02c4  guix-build-e734847c1f50/output/x86_64-apple-darwin19/SHA256SUMS.part
  7a47bea38f3d8c19bb411bf4ab28bc4a237865184ddcb0677b3f240f4c5a2462  guix-build-e734847c1f50/output/x86_64-apple-darwin19/bitcoin-e734847c1f50-osx-unsigned.dmg
  6e10739840f56dedf0d1dfb9a788d539b87f5e79bf5a3eaacca97126cbf1c04e  guix-build-e734847c1f50/output/x86_64-apple-darwin19/bitcoin-e734847c1f50-osx-unsigned.tar.gz
  66c31edaa776e2a07225cc202a70fa3a3a745939b8c0ad2893cb86730869f118  guix-build-e734847c1f50/output/x86_64-apple-darwin19/bitcoin-e734847c1f50-osx64.tar.gz
  41aefbeacc4a09f89fbee35446b887c7fadfd17f833b1765fc2de3bec5fe4ce3  guix-build-e734847c1f50/output/x86_64-linux-gnu/SHA256SUMS.part
  30a7bfff7be3145e24637c9ab0b605cae0d2942aa6df2a1e7ac0afb22ec18792  guix-build-e734847c1f50/output/x86_64-linux-gnu/bitcoin-e734847c1f50-x86_64-linux-gnu-debug.tar.gz
  c7d91fbf09858bc5a573f169715bb1cddb046b2a7d62de73b26a952a92f918e7  guix-build-e734847c1f50/output/x86_64-linux-gnu/bitcoin-e734847c1f50-x86_64-linux-gnu.tar.gz
  e8ac5cf5360ceb8ee4550f43a5233c27a1265050d29c3a9b3b2ad136a77c80d4  guix-build-e734847c1f50/output/x86_64-w64-mingw32/SHA256SUMS.part
  079df526644fb001fc4500222f9775d3f7c2a39960bd81274bcb941748e8fbde  guix-build-e734847c1f50/output/x86_64-w64-mingw32/bitcoin-e734847c1f50-win-unsigned.tar.gz
  3d5a9855b4c5f330006c4a4213549f4bb40323778590b3300c827616004ad6de  guix-build-e734847c1f50/output/x86_64-w64-mingw32/bitcoin-e734847c1f50-win64-debug.zip
  182e1c668784e16ce73be3175c7bf59012eeae5673b507ab58b164ef670590ab  guix-build-e734847c1f50/output/x86_64-w64-mingw32/bitcoin-e734847c1f50-win64-setup-unsigned.exe
  34dc88b5898f4dcba8215a44b6ea545f05e9d7fa623fbb966ed27aeba35d0fdf  guix-build-e734847c1f50/output/x86_64-w64-mingw32/bitcoin-e734847c1f50-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK e734847c1f, tested on Linux Mint 20.2 (x86_64) and on macOS Big Sur 11.6.1 (Intel, 20G224): `-fvisibility=hidden` is no longer duplicated in compiler invocations, and the resulted package has no the `lib/cmake/` directory.

Tree-SHA512: 2323801ce496884b2baa8e2699de74dcaefc02020c796f4185955fddeec84a9e02fdd35a6f225eea6569cb55a3dc5b11a9dcd1073073acb19a77eb4638854aff
2021-11-14 11:01:22 +08:00
Dimitris Apostolou
2de1ceb2e9
depends, wallet: fix typos 2021-11-13 20:05:56 +02:00
fanquake
5cc083cd46
Merge bitcoin/bitcoin#23473: build: boring autotools cleanup
34094aff13 build: consistently quote AC_CHECK_LIB() arguments (fanquake)
efd4fe156a build: consistently quote AC_MSG_* arguments (fanquake)
c39732694d build: consistently quote AC_CHECK_PROG() arguments (fanquake)
80762dfc45 build: consistently quote arguments in AC_ARG_VAR() (fanquake)
e6749a4f99 build: consistently quote arguments in AM_CONDITIONAL() (fanquake)
cdb47e18b7 build: consistently quote AC_DEFINE() arguments (fanquake)
a17a3f9d62 build: consistently quote AC_MSG_CHECKING() arguments (fanquake)
50d99f202d build: consistently quote AC_PATH_TOOL arguments (fanquake)
05923e7c62 build: AC_PATH_PROG(S) consistently quote arguments (fanquake)
407f3a495b build: cleanup AX_CHECK_PREPROC_FLAG() usage (fanquake)
b4dba0c6c7 build: AX_CHECK_PREPROC_FLAG() serial 6 (fanquake)
5ced925283 build: cleanup AX_CHECK_COMPILE_FLAG() usage (fanquake)
b3dd6c1d0f build: AX_CHECK_COMPILE_FLAG() serial 6 (fanquake)
5e6bc437c5 build: cleanup AX_CHECK_LINK_FLAG() usage (fanquake)
a874637bf9 build: AX_CHECK_LINK_FLAG serial 6 (fanquake)

Pull request description:

  This is mostly just being consistent with how we do things, and migrating towards a style (we have already been doing so ad-hoc) that is clearer for anyone who cares to read `.m4`. For example:

  `master`:
  ```m4
    AX_CHECK_COMPILE_FLAG(
      [-g3],
      [[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"]],
      [AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])],
      [[$CXXFLAG_WERROR]])
  ```

  This PR:
  ```m4
    AX_CHECK_COMPILE_FLAG(
      [-g3],
      [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"],
      [AX_CHECK_COMPILE_FLAG([-g], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"], [], [$CXXFLAG_WERROR])],
      [$CXXFLAG_WERROR])
  ```

  Drop unneeded double-quoting (which we use inconsistently), use `[]` for empty arguments, space things out.

  There should be no functional change, before & after binaries identical. Very boring.

  Guix build:
  ```bash
  bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  22097cd621cd88348f827b916f4b4b120b40c3515a3752595347e36d57dc9158  guix-build-34094aff1348/output/aarch64-linux-gnu/SHA256SUMS.part
  43f10bb857afa7ea52a8ed9beed36ff0e3ee02dba31100fc04c8e0b2443d94eb  guix-build-34094aff1348/output/aarch64-linux-gnu/bitcoin-34094aff1348-aarch64-linux-gnu-debug.tar.gz
  9095a8228376094065103f4adc9cdcb8189111fb9536ad88e4f8cecc3df6fc75  guix-build-34094aff1348/output/aarch64-linux-gnu/bitcoin-34094aff1348-aarch64-linux-gnu.tar.gz
  9c73179059c6fe1f7643445ec5a530003fc41187aa0a94cb1f5c106097161e5b  guix-build-34094aff1348/output/arm-linux-gnueabihf/SHA256SUMS.part
  70ddd4dd0a06c7491937084125f690c1d62fa2647c16048fc1a4a9a09d8b10b4  guix-build-34094aff1348/output/arm-linux-gnueabihf/bitcoin-34094aff1348-arm-linux-gnueabihf-debug.tar.gz
  0a338fdc9788c33a0d519b6c09fdf6271e3bd68846ee61eef0a06a2df6bab419  guix-build-34094aff1348/output/arm-linux-gnueabihf/bitcoin-34094aff1348-arm-linux-gnueabihf.tar.gz
  25eda7fae2984b9dadf47420d1dc09b0224d425144233482602bd9e6d348255c  guix-build-34094aff1348/output/dist-archive/bitcoin-34094aff1348.tar.gz
  d70d84e43ffa2d809063cda868f708539e9114b2d14edb6ddcf05fdf73f3187b  guix-build-34094aff1348/output/powerpc64-linux-gnu/SHA256SUMS.part
  8d1291e576d2b5f8f7120fe6e6ed4b23415249e22a657a350ccce68ff261e088  guix-build-34094aff1348/output/powerpc64-linux-gnu/bitcoin-34094aff1348-powerpc64-linux-gnu-debug.tar.gz
  eab448186aee18ac33c39eed4d24501208d10d257fe6e2739adf589b1d4b693a  guix-build-34094aff1348/output/powerpc64-linux-gnu/bitcoin-34094aff1348-powerpc64-linux-gnu.tar.gz
  4d28617b4d0ddb88c8b20d06ca21314ee40814043f92cabcd9ea3e3d8ee39183  guix-build-34094aff1348/output/powerpc64le-linux-gnu/SHA256SUMS.part
  dea02168e170e92600012f5806ec8b39209282c2270669f2040682f74bc3f320  guix-build-34094aff1348/output/powerpc64le-linux-gnu/bitcoin-34094aff1348-powerpc64le-linux-gnu-debug.tar.gz
  c7122e89d3186a183ac08e7f3020654722c98bf8acc8b790bb292b39f5ba8225  guix-build-34094aff1348/output/powerpc64le-linux-gnu/bitcoin-34094aff1348-powerpc64le-linux-gnu.tar.gz
  0802a52720d2bec1264dc13f6554a9da347baa3d096242b29bb524f4b121eb10  guix-build-34094aff1348/output/riscv64-linux-gnu/SHA256SUMS.part
  4aee9fc41f35d2adb2d0562902dd8584a8413a73c015ddcdcef00586779f63a7  guix-build-34094aff1348/output/riscv64-linux-gnu/bitcoin-34094aff1348-riscv64-linux-gnu-debug.tar.gz
  3f0c4d6096ac7e08389e851c2d252632c044a700ce0174473ac4d7f66290e8cc  guix-build-34094aff1348/output/riscv64-linux-gnu/bitcoin-34094aff1348-riscv64-linux-gnu.tar.gz
  c5149c46b9b7081d5715daf3e22fd30ffca23d333f664da1fabc8143ff8bf76c  guix-build-34094aff1348/output/x86_64-apple-darwin19/SHA256SUMS.part
  81848355751e55a8a60636e3ea2f03ca6abb78736a5431715cd51cebd46bb961  guix-build-34094aff1348/output/x86_64-apple-darwin19/bitcoin-34094aff1348-osx-unsigned.dmg
  d2f6f689cbedddd865f90dba9ddf21479c71c61b0350fda62804b2f233116a43  guix-build-34094aff1348/output/x86_64-apple-darwin19/bitcoin-34094aff1348-osx-unsigned.tar.gz
  99d8fe428fcb67f9975e6b8d9a63d84946215a0a6b8f94967ce96cc3af4b7772  guix-build-34094aff1348/output/x86_64-apple-darwin19/bitcoin-34094aff1348-osx64.tar.gz
  3dac13c7556d9a25ff5513bbb2638fe4fa74d8a88304bbdce52364df7832a3ab  guix-build-34094aff1348/output/x86_64-linux-gnu/SHA256SUMS.part
  e4baa7da80fdabbb50953efaaa7b4867c7e575a7a156b728e8e197142df55697  guix-build-34094aff1348/output/x86_64-linux-gnu/bitcoin-34094aff1348-x86_64-linux-gnu-debug.tar.gz
  f82f5bcc7197c1741b106f62be7b468aadbdf5b3198091582026cd450bf13b3a  guix-build-34094aff1348/output/x86_64-linux-gnu/bitcoin-34094aff1348-x86_64-linux-gnu.tar.gz
  db22b5f48783917f985920ddb26aa170b4d6cc65112406548847a883099505b8  guix-build-34094aff1348/output/x86_64-w64-mingw32/SHA256SUMS.part
  ead0809193ca1d462553a6f3f233cdbff7a3f8419100d825abfc10835508e485  guix-build-34094aff1348/output/x86_64-w64-mingw32/bitcoin-34094aff1348-win-unsigned.tar.gz
  e1006b6c114eaf33274144d8e9a20abc0cee01e26a4594063ee615bf09c1b344  guix-build-34094aff1348/output/x86_64-w64-mingw32/bitcoin-34094aff1348-win64-debug.zip
  2d3fbc593b58d353a6859e02c0dd096d453cf5f1e3150c2a1c234bdfc97b4f24  guix-build-34094aff1348/output/x86_64-w64-mingw32/bitcoin-34094aff1348-win64-setup-unsigned.exe
  25cfa8a3655727572593f100b7a70c1061fa6f3b017014ad7444059611c3ddda  guix-build-34094aff1348/output/x86_64-w64-mingw32/bitcoin-34094aff1348-win64.zip
  ```

ACKs for top commit:
  hebasto:
    re-ACK 34094aff13

Tree-SHA512: 7515e85b4dedddf430ddf0bf31f25fca8f73898cf2ba4b6a66b9f21feeaff4c2600fe24efdd2e81822f059827b5b35341b183ea8342fd689248d8c355bf5cb42
2021-11-13 07:12:30 +08:00
Sebastian Falbesoner
a9872e1478 test: remove unnecessary block rehashing prior to solving
Solving a block involves continously rehashing it, i.e. any extra
calls to rehash it before are not necessary and can be dropped.
2021-11-12 18:29:43 +01:00
MarcoFalke
c9dd5c8d6e
Merge bitcoin/bitcoin#23492: test: tidy up addrman unit tests
0000edaba3 style: Use 4 spaces for indentation, not 5 (MarcoFalke)
fab9264be5 test: Remove unused CDataStream copy (MarcoFalke)

Pull request description:

  Fix two issues:

  * Remove unneeded code, which makes test harder to read and write
  * Fix wrong indentation, which breaks some editors

ACKs for top commit:
  jnewbery:
    Code review ACK 0000edaba3
  brunoerg:
    cr/tACK 0000edaba3
  shaavan:
    ACK 0000edaba3

Tree-SHA512: babec1dfb840bd11ec89ec3d0e2529f826f5775fc7625e987480fac5251f6a6cdcf9a1051c8364d6ca2f66ce9934dcb8447a8cf7376b3952920faf2afd02be99
2021-11-12 16:06:23 +01:00
fanquake
e734847c1f
build: remove duplicate -fvisibility=hidden from Boost build
Boost already sets this by default.
2021-11-12 19:04:35 +08:00
fanquake
32659e5897
build: don't install Boost cmake config files 2021-11-12 19:04:22 +08:00
MarcoFalke
faeb748f5b
Use c++17 in clang-format 2021-11-12 11:46:34 +01:00
MarcoFalke
0000edaba3
style: Use 4 spaces for indentation, not 5
The wrong indentation breaks editor workflows.

Can be reviewed with --ignore-all-space
2021-11-12 11:41:55 +01:00
MarcoFalke
fab9264be5
test: Remove unused CDataStream copy 2021-11-12 11:40:39 +01:00
MarcoFalke
1ff265a20c
Merge bitcoin/bitcoin#23477: addrman: tidy up unit tests
36d3510303 [addrman] [tests] Remove AddrManUncorrupted subclass (John Newbery)
dfbd3a6d71 [addrman] [tests] Remove AddrManCorrupted subclass (John Newbery)
d02098d1f0 [addrman] [tests] Tidy up unused arguments in addrman test functions (John Newbery)
7784a9a374 [addrman] [tests] Remove deterministic argument and member from AddrManTest (John Newbery)
a749fa539a [addrman] Remove AddrMan friends (John Newbery)

Pull request description:

  Various tidy-ups to the addrman tests.

ACKs for top commit:
  shaavan:
    crACK 36d3510303
  promag:
    Code review ACK 36d3510303.
  theStack:
    Code-review ACK 36d3510303

Tree-SHA512: bbdb9d70863c15b023714ba3c73e816c635204f949c39678dd932a6e9a2e57b51b5d50332ec6843cf1b98a2fcbbdd5e6779f2e9c7e9cf90f4a6b3b4a7a1abe2f
2021-11-12 09:47:14 +01:00
fanquake
34094aff13
build: consistently quote AC_CHECK_LIB() arguments 2021-11-12 14:32:00 +08:00
fanquake
efd4fe156a
build: consistently quote AC_MSG_* arguments 2021-11-12 14:31:59 +08:00
fanquake
c39732694d
build: consistently quote AC_CHECK_PROG() arguments 2021-11-12 14:31:59 +08:00
fanquake
80762dfc45
build: consistently quote arguments in AC_ARG_VAR() 2021-11-12 14:31:59 +08:00
fanquake
e6749a4f99
build: consistently quote arguments in AM_CONDITIONAL() 2021-11-12 14:31:59 +08:00
fanquake
cdb47e18b7
build: consistently quote AC_DEFINE() arguments 2021-11-12 14:31:55 +08:00
fanquake
a17a3f9d62
build: consistently quote AC_MSG_CHECKING() arguments 2021-11-12 10:05:36 +08:00
fanquake
50d99f202d
build: consistently quote AC_PATH_TOOL arguments 2021-11-12 10:02:00 +08:00
fanquake
05923e7c62
build: AC_PATH_PROG(S) consistently quote arguments 2021-11-12 10:02:00 +08:00
fanquake
407f3a495b
build: cleanup AX_CHECK_PREPROC_FLAG() usage
There should be no functional change.
2021-11-12 10:02:00 +08:00
fanquake
b4dba0c6c7
build: AX_CHECK_PREPROC_FLAG() serial 6 2021-11-12 10:01:59 +08:00
fanquake
5ced925283
build: cleanup AX_CHECK_COMPILE_FLAG() usage
There should be no functional change.
2021-11-12 10:01:59 +08:00
fanquake
b3dd6c1d0f
build: AX_CHECK_COMPILE_FLAG() serial 6 2021-11-12 10:01:59 +08:00
fanquake
5e6bc437c5
build: cleanup AX_CHECK_LINK_FLAG() usage
There should be no functional change.
2021-11-12 10:01:59 +08:00
fanquake
a874637bf9
build: AX_CHECK_LINK_FLAG serial 6 2021-11-12 10:01:59 +08:00
fanquake
c1fb30633b
Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into build/test
29173d6c6c ubsan: add minisketch exceptions (Cory Fields)
54b5e1aeab Add thin Minisketch wrapper to pick best implementation (Pieter Wuille)
ee9dc71c1b Add basic minisketch tests (Pieter Wuille)
0659f12b13 Add minisketch dependency (Gleb Naumenko)
0eb7928ab8 Add MSVC build configuration for libminisketch (Pieter Wuille)
8bc166d5b1 build: add minisketch build file and include it (Cory Fields)
b2904ceb85 build: add configure checks for minisketch (Cory Fields)
b6487dc4ef Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake)

Pull request description:

  This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through.

  > This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added:
  > * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests).
  > * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use.

  Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file.

ACKs for top commit:
  naumenkogs:
    ACK 29173d6c6c

Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
2021-11-12 10:00:49 +08:00
MarcoFalke
bc03823e26
Merge bitcoin/bitcoin#23482: doc: Add a brief overview of fuzzing/Bitcoin Core fuzzing
6cac99ac07 Add a brief overview of fuzzing/Bitcoin Core fuzzing (Alex Groce)

Pull request description:

  - Google's repo
  - Our report
  - John's advice on fuzz-friendly development

ACKs for top commit:
  MarcoFalke:
    ACK 6cac99ac07
  shaavan:
    ACK 6cac99ac07

Tree-SHA512: 45d1f2f49d068ddd40c3e60cb4a3ede079276e0e09328eec04e391637e9225e195dd7ee1573aa962a2cae93a7e432f9e1d5d0b97660b879ab37ce453cc43c275
2021-11-11 14:26:46 +01:00
fanquake
d217ee25a3
Merge bitcoin/bitcoin#23420: test: Correct MyPy typing for subtest decorator
467fe5779c test: Correct MyPy typing for subtest decorator (Pavel Safronov)

Pull request description:

  This is the part of the effort to make python typing correct https://github.com/bitcoin/bitcoin/issues/19389

  The typing of the `subtest` decorator within `p2p_segwit.py` test file was incorrect.

  Since `subtest` function is defined as a member of the class, it expects `self` as a first argument, and it is not provided. Hence the typing errors (that are currently suppressed by `type: ignore`).

  ```
  (venv) vagrant@ubuntu-focal:/vagrant/test/functional$ mypy p2p_segwit.py
  p2p_segwit.py:298: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:327: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:358: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:447: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:519: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:561: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:659: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:670: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:737: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:826: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:866: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:941: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:977: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1052: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1089: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1136: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1220: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1312: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1406: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1440: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1543: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1729: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1782: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1881: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:1983: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  p2p_segwit.py:2027: error: Argument 1 to "subtest" has incompatible type "Callable[[SegWitTest], Any]"; expected "SegWitTest"
  Found 26 errors in 1 file (checked 1 source file)
  ```

  However, the tests are passing, because there is no `self` argument passed when it is called as a decorator.

  There is also suppressed pylint error `# noqa: N805` pointing to the same issue.
  ```
  N805 first argument of a method should be named 'self'
  ```

  So the solution is to move the `subtest` definition outside the class, so the `self` argument is no longer required.

  After doing so, both mypy and unittests are successfully passing:

  ```
  (venv) vagrant@ubuntu-focal:/vagrant/test/functional$ mypy p2p_segwit.py
  Success: no issues found in 1 source file
  ```

  ```
  (venv) vagrant@ubuntu-focal:/vagrant/test/functional$ ./test_runner.py p2p_segwit
  Temporary test directory at /tmp/test_runner__🏃_20211103_011449
  Running Unit Tests for Test Framework Modules
  ..........
  ----------------------------------------------------------------------
  Ran 10 tests in 0.546s

  OK
  Remaining jobs: [p2p_segwit.py]
  1/1 - p2p_segwit.py passed, Duration: 81 s

  TEST          | STATUS    | DURATION

  p2p_segwit.py | ✓ Passed  | 81 s

  ALL           | ✓ Passed  | 81 s (accumulated)
  Runtime: 81 s
  ```
  ```

ACKs for top commit:
  fanquake:
    ACK 467fe5779c

Tree-SHA512: e4c3e2d284f47a6bfbf4af22d4021123cdd9c2ea16ec90a91b466ad1a5af615bb4e15959e6cf56c788701d7e7cbda91a8ffc4347965095c3384eae3d28f261af
2021-11-11 20:33:02 +08:00
Pavel Safronov
467fe5779c test: Correct MyPy typing for subtest decorator 2021-11-11 08:06:38 +00:00
MarcoFalke
f63bf05e73
Merge bitcoin/bitcoin#22928: refactor: Remove gArgs from wallet.h and wallet.cpp (2)
2ec38bdebb Remove `gArgs` from `wallet.h` and `wallet.cpp` (Kiminuo)

Pull request description:

  This is a follow-up PR to #22183 and is related to #21005 issue.

ACKs for top commit:
  ryanofsky:
    Code review ACK 2ec38bdebb. No changes since last review, just rebase

Tree-SHA512: ae7fa1927b0a268f25697928ccaf1b3cf10ee1ccef3f9d2344001fbd7e11fe8ce768745c65e76bd7d1632c6c7650612b5b54eaf2be61093854f75a4c4dcb1784
2021-11-10 19:42:35 +01:00
Alex Groce
6cac99ac07
Add a brief overview of fuzzing/Bitcoin Core fuzzing
- Google's repo
- Our report
- John's advice on fuzz-friendly development
2021-11-10 11:10:04 -07:00
W. J. van der Laan
e7feb73f07
Merge bitcoin/bitcoin#22805: refactor: use CWallet const shared pointers in dump{privkey,wallet}
d150fe3ad5 refactor: use `CWallet` const shared pointers in dump{privkey,wallet} RPCs (Sebastian Falbesoner)
ec2792d1dc refactor: use const `LegacyScriptPubKeyMan` references in dump{privkey,wallet} RPCs (Sebastian Falbesoner)
29905c092f refactor: avoid multiple key->metadata lookups in dumpwallet RPC (Sebastian Falbesoner)

Pull request description:

  ~~This PR is based on #22787 ("refactor: actual immutable pointing"), which should be reviewed first.~~ (merged by now)

  It aims to make the CWallet shared pointers actually immutable also for the `dumpprivkey` and `dumpwallet` RPC methods. For doing that, some more preparations are needed; we need a const-counterpart to the helper `EnsureLegacyScriptPubKeyMan` that accepts a const CWallet pointer and accordingly also returns a const `LegacyScriptPubKeyMan` instance. The metadata lookup in `dumpwallet` is changed to not need a mutable `ScriptPubKeyMan` instance by avoiding using the `operator[]` in its mapKeyMetadata map, which also avoids repeated lookups.

ACKs for top commit:
  laanwj:
    Code review ACK d150fe3ad5

Tree-SHA512: 90ac05e21f40c6d0ebb479a71c545da2fd89940b9ca3409d9f932abc983bf8830d34c45086e68880d0d1e994846fbefee7534eec142ff4268e0fa28a1a411d36
2021-11-10 18:55:54 +01:00
MarcoFalke
4a8707741d
Merge bitcoin/bitcoin#22872: log: improve checkaddrman logging with duration in milliseconds
22b44fc696 p2p: improve checkaddrman logging with duration in milliseconds (Jon Atack)
ec65bed00e log, timer: add LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE macro (Jon Atack)
325da75a53 log, timer: allow not repeating log message on completion (Jon Atack)

Pull request description:

  This patch:
  - updates the `logging/timer.h::Timer` class to allow not repeating the log message on completion
  - adds a `LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE` macro that prints the descriptive message when logging the start but not when logging the completion
  - updates the checkaddrman logging to log the duration, and renames the function like the `-checkaddrman` configuration option in order to prefix every log message with `CheckAddrman` instead of the longer, less pleasant, and different-from-checkaddrman `ForceCheckAddrman` (the Doxygen documentation on the function already makes clear that it is unaffected by `m_consistency_check_ratio`).

  before
  ```
  2021-09-21T18:42:50Z [opencon] Addrman checks started: new 64864, tried 1690, total 66554
  2021-09-21T18:42:50Z [opencon] Addrman checks completed successfully
  ```

  after
  ```
  2021-09-21T18:42:50Z [opencon] CheckAddrman: new 64864, tried 1690, total 66554 started
  2021-09-21T18:42:50Z [opencon] CheckAddrman: completed (76.21ms)
  ```

  To test, build and run bitcoind with `-debug=addrman -checkaddrman=<n>` for a value of `n` in the range of, say, 10 to 40.

ACKs for top commit:
  laanwj:
    Code review ACK 22b44fc696

Tree-SHA512: 658c0dfaaa9d07092e2418f2d05007c58cc35be6593f22b3c592ce793334a885dd92dacc46bdeddc9d37939cf11174660a094c07c0fa117fbb282953aa45a94d
2021-11-10 17:38:45 +01:00
Sebastian Falbesoner
d150fe3ad5 refactor: use CWallet const shared pointers in dump{privkey,wallet} RPCs 2021-11-10 17:12:41 +01:00
Sebastian Falbesoner
ec2792d1dc refactor: use const LegacyScriptPubKeyMan references in dump{privkey,wallet} RPCs 2021-11-10 17:12:41 +01:00
Sebastian Falbesoner
29905c092f refactor: avoid multiple key->metadata lookups in dumpwallet RPC
This also enables working with a const ScriptPubKeyMan which was
previously not possible due to std::map::operator[] not being const.
2021-11-10 17:12:41 +01:00
MarcoFalke
38b2a0a3f9
Merge bitcoin/bitcoin#23173: Add ChainstateManager::ProcessTransaction
0fdb619aaf [validation] Always call mempool.check() after processing a new transaction (John Newbery)
2c64270bbe [refactor] Don't call AcceptToMemoryPool() from outside validation.cpp (John Newbery)
92a3aeecf6 [validation] Add CChainState::ProcessTransaction() (John Newbery)
36167faea9 [logging/documentation] Remove reference to AcceptToMemoryPool from error string (John Newbery)
4c24142b1e [validation] Remove comment about AcceptToMemoryPool() (John Newbery)
5759fd12b8 [test] Don't set bypass_limits to true in txvalidation_tests.cpp (John Newbery)
497c9e2964 [test] Don't set bypass_limits to true in txvalidationcache_tests.cpp (John Newbery)

Pull request description:

  Similarly to how #18698 added `ProcessNewBlock()` and `ProcessNewBlockHeaders()` methods to the `ChainstateManager` class, this PR adds a new `ProcessTransaction()` method. Code outside validation no longer calls `AcceptToMemoryPool()` directly, but calls through the higher-level `ProcessTransaction()` method. Advantages:

  - The interface is simplified. Calling code no longer needs to know about the active chainstate or mempool object, since `AcceptToMemoryPool()` can only ever be called for the active chainstate, and that chainstate knows which mempool it's using. We can also remove the `bypass_limits` argument, since that can only be used internally in validation.
  - responsibility for calling `CTxMemPool::check()` is removed from the callers, and run automatically by `ChainstateManager` every time `ProcessTransaction()` is called.

ACKs for top commit:
  lsilva01:
    tACK 0fdb619 on Ubuntu 20.04
  theStack:
    Code-review ACK 0fdb619aaf
  ryanofsky:
    Code review ACK 0fdb619aaf. Only changes since last review: splitting & joining commits, adding more explanations to commit messages, tweaking MEMPOOL_ERROR string, fixing up argument name comments.

Tree-SHA512: 0b395c2e3ef242f0d41d47174b1646b0a73aeece38f1fe29349837e6fb832f4bf8d57e1a1eaed82a97c635cfd59015a7e07f824e0d7c00b2bee4144e80608172
2021-11-10 14:35:22 +01:00
W. J. van der Laan
ed479497bd
Merge bitcoin/bitcoin#23398: rpc: add return message to savemempool RPC
aa1a4c9204 Add file validation to savemempool RPC test (lsilva01)
871e64d22f Add filename to savemempool RPC result (lsilva01)

Pull request description:

  Currently, if the user calls the `savemempool` RPC method, there is no way to know
  where the file was created (unless the user knows internal implementation details).

  This PR adds a return message stating the file name and path where the mempool was saved and changes `mempool_persist.py` to validate this new return message.

ACKs for top commit:
  laanwj:
    Code review ACK aa1a4c9204

Tree-SHA512: e8b1dd0a8976e5eb15f7476c9651e492d2c621a67e0b726721fa7a2ae0ddd272ee28b87a2d0c650bd635e07fa96bdefe77bece4deb6486ef3ee9a4f83423a840
2021-11-10 14:20:28 +01:00