Commit graph

33426 commits

Author SHA1 Message Date
Pavol Rusnak
abcb8769bf
doc: add more info to dependencies.md 2022-04-20 15:21:50 +02:00
laanwj
333a41882c
Merge bitcoin/bitcoin#24172: doc: Add pre-splitoff translation update to release-process.md
6e328ff8d0 doc: Add pre-splitoff translation update to release-process.md (Hennadii Stepanov)

Pull request description:

  This step is required to keep translations in the master branch updated.

  Branches:
  - 0.20 -- bitcoin/bitcoin#18492
  - 0.21 -- bitcoin/bitcoin#20058, bitcoin/bitcoin#20256
  - 22.x -- accidentally missed

ACKs for top commit:
  laanwj:
    ACK 6e328ff8d0

Tree-SHA512: d9131a6841b2077783b8be4086aa1c87c45978f0c18b141c5e4c62c84ea3e699d666e3c7c446cf0d6d88cc2967139201155d13a71e829039871e8dc424e5c931
2022-04-15 10:33:48 +02:00
laanwj
7da4f65a00
Merge bitcoin/bitcoin#24818: net: improve and address issues in makeseeds.py
c457fb144c improve clarity and up max ipv6 ASNs (Baas)

Pull request description:

  This PR attempts to address some of the areas of improvement raised in #17020 . Concretely, my proposed change is fairly minor but addresses the following changes to [`makeseeds.py`](https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/makeseeds.py):

  - Increase max seeds per ASN for IPv6 to 10 as recommended [here](https://github.com/bitcoin/bitcoin/pull/16999#issuecomment-536999544), while keeping max seeds per ASN for IPv4 at 2.
  - Bump `MIN_BLOCKS` to 730000.
  - Improved script clarity: added function types and more docs to functions, added progress indicator when performing ASN lookup, and change string formatting to better align with [bitcoin python style guidelines](https://github.com/bitcoin/bitcoin/blob/master/test/functional/README.md#style-guidelines)

  With the different ASN limits for IPv4 and IPv6, and the new minimum block requirement, the current stats look look like:
  ```
    IPv4   IPv6  Onion Pass
  470689  73238      0 Initial
  470689  73238      0 Skip entries with invalid address
  470689  73238      0 After removing duplicates
  470688  73238      0 Skip entries from suspicious hosts
    6098   1676      0 Enforce minimal number of blocks
    5252   1443      0 Require service bit 1
    3812    898      0 Require minimum uptime
    3738    877      0 Require a known and recent user agent
    3715    869      0 Filter out hosts with multiple bitcoin ports
     512    512      0 Look up ASNs and limit results per ASN and per net
  ```
  The new ASN max seeds of 10 allows for 512 IPv6 addresses to be included, up from the ~150 that was filtered by the previous version.

  While there is more to do for #17020 , these changes I think are fairly isolated from the rest and should make it a bit easier for others to get up to speed with what the functions in the script do.

ACKs for top commit:
  laanwj:
    Concept and code review ACK c457fb144c

Tree-SHA512: 3ed67868443cc50544e23b27e2341758c3a8866997b0dba47b137032d5e1a13428855daaeed682626ed471542b44435635178d54848a2cd6fe73777679428032
2022-04-15 10:31:02 +02:00
Baas
c457fb144c improve clarity and up max ipv6 ASNs 2022-04-14 23:07:17 +02:00
laanwj
e14f0fa6a3
Merge bitcoin/bitcoin#19952: build, ci: Add file-based logging for individual packages
86c2889518 ci: Make log verbose in error case only (Hennadii Stepanov)
7f650883b7 depends: Add file-based logging for individual packages (Hennadii Stepanov)

Pull request description:

  This PR adds file-based logging for individual packages in depends. To use this feature one should provide `LOG=1`.

  A log file is printed out automatically in case of a build error. After successful build log files are being moved along with package archives:
  ```
  $ make -C depends HOST=x86_64-w64-mingw32 LOG=1
  $ find ./depends/built/x86_64-w64-mingw32 -name '*.log' | sort
  ./depends/built/x86_64-w64-mingw32/bdb/bdb-4.8.30-5100a099801.log
  ./depends/built/x86_64-w64-mingw32/boost/boost-1_71_0-313f82dc7de.log
  ./depends/built/x86_64-w64-mingw32/libevent/libevent-2.1.12-stable-3fa27048d5e.log
  ./depends/built/x86_64-w64-mingw32/libnatpmp/libnatpmp-4536032ae32268a45c073a4d5e91bbab4534773a-9db4850dd32.log
  ./depends/built/x86_64-w64-mingw32/miniupnpc/miniupnpc-2.2.2-75d9a1807e0.log
  ./depends/built/x86_64-w64-mingw32/native_b2/native_b2-1_71_0-3bf253c19bf.log
  ./depends/built/x86_64-w64-mingw32/qrencode/qrencode-3.4.4-dfac87af599.log
  ./depends/built/x86_64-w64-mingw32/qt/qt-5.15.2-9304e03d3ac.log
  ./depends/built/x86_64-w64-mingw32/sqlite/sqlite-3320100-455acafa7be.log
  ./depends/built/x86_64-w64-mingw32/zeromq/zeromq-4.3.1-5ff627ec84a.log
  ```

  An example of CI tasks with package build errors -- https://cirrus-ci.com/task/5275741788045312

  Closes #16368.

ACKs for top commit:
  laanwj:
    Tested ACK 86c2889518

Tree-SHA512: 497f2146fd2e38c952124aecfd80ebb42be22bbc5dc59521491545f4465fc38f23da7787a0caea5686b7c30aa862f2b0c02092ae3fe863e80a5ddd14b3d324b9
2022-04-14 19:38:22 +02:00
laanwj
cf0a8b9c48
Merge bitcoin/bitcoin#24559: test: add test for signet miner script
038d2a607f test: add test for signet miner script (Sebastian Falbesoner)
449b96ed97 test: add `is_bitcoin_util_compiled` helper (Sebastian Falbesoner)
dde33eca63 test: determine path to `bitcoin-util` in test framework (Sebastian Falbesoner)

Pull request description:

  This PR adds a very basic test for the signet miner script (contrib/signet/miner). ~~It was based on #24553 (merged by now) which fixes a bug (and was also the motivation to write this test).~~

  The test roughly follows the steps from https://en.bitcoin.it/wiki/Signet#Custom_Signet, except that the challenge key-pair is created solely with the test framework. Calibration is also skipped, the difficulty is simply set to the first mainnet target `0x1d00ffff` (see also https://bitcoin.stackexchange.com/a/57186).

ACKs for top commit:
  laanwj:
    re-ACK 038d2a607f

Tree-SHA512: 150698a3c0cda3679661b47688e3b932c9761e777fdd284776b867b485db6a8895960177bd02a53f838a4c9b9bbe6a9beea8d7a5b14825b38e4e43b3177821b3
2022-04-14 19:28:04 +02:00
Hennadii Stepanov
86c2889518
ci: Make log verbose in error case only
This change silences depends build using LOG=1.
2022-04-14 13:44:29 +02:00
Hennadii Stepanov
7f650883b7
depends: Add file-based logging for individual packages 2022-04-14 13:44:28 +02:00
laanwj
b69fd5eaa9
Merge bitcoin/bitcoin#22052: net: remove non-blocking bool from interface
c71117fcb0 net: remove non-blocking bool from interface (Bushstar)

Pull request description:

  SetSocketNonBlocking was added in 0.11 in the PR below with a second argument to toggle non-blocking mode for the socket. That argument has always been set to true in all subsequent releases and I'm not sure why it is present.

  https://github.com/bitcoin/bitcoin/pull/4491

ACKs for top commit:
  promag:
    Code review ACK c71117fcb0.
  lsilva01:
    Code review ACK c71117fcb0
  vasild:
    ACK c71117fcb0

Tree-SHA512: feebfcfa75d997460a0ba42ffe1e0c25a7e0bfcad12510ad73ea4942cc1c653f9ad429adbbb00b9288fe319009552906fcb635a14dfd7dcbde3853baab6be065
2022-04-14 10:16:01 +02:00
laanwj
1e3ed01faa
Merge bitcoin/bitcoin#23416: doc: Remove fee delta TODO from txmempool.cpp
fa32cc0682 doc: Remove fee delta TODO from txmempool.cpp (MarcoFalke)

Pull request description:

  This refactor request was added in commit eb306664e7, though it didn't explain why the refactor is needed and what the goal is. Given that this wasn't touched for more than 5 years, it doesn't seem critical. Generally, non-trivial `TODO`s make more sense as GitHub issues, so that they can be discussed and triaged more easily.

ACKs for top commit:
  laanwj:
    Code review ACK fa32cc0682

Tree-SHA512: 6629fef543e815136c82c38aa8ba2c4de68a5fe94c6954f2559e468f7e59052e02dd7c221d3b159be0314eaf0dbb18f74814297c58f76e2289c47e8d4f49be4e
2022-04-14 09:42:22 +02:00
laanwj
6c9bc14a3f
Merge bitcoin/bitcoin#24842: guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues
457148a803 guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues (fanquake)

Pull request description:

  This commit backports [a patch](https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e8d1ca7d2c344a411779892616c423e157f4aea8) to the GCC 10.3.0 we build for Windows
  cross-compilation in Guix. The commit has been [backported to the GCC
  releases/gcc-10 branch](https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e3abcc56d2604b9d2652b615ff9e68981cb7f79e), but hasn't yet made it into a 10.x release.

  The patch corrects a regression from an earlier GCC commit, see:
  https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=357c4350680bf29f0c7a115424e3da11c53b5582
  and
  https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=074226d5aa86cd3de517014acfe34c7f69a2ccc7,
  related to the way newer versions of mingw-w64 implement setjmp/longjmp.

  Ultimately this was causing a crash for us when Windows users were
  viewing the network traffic tab inside the GUI. After some period, long
  enough that a buffer would need reallocating, a call into FreeTypes
  [`gray_record_cell()`](a18906091c/src/smooth/ftgrays.c (L526)) would result in a call to [`ft_longjmp` (longjmp)](a18906091c/src/smooth/ftgrays.c (L165)), which
  would then trigger a crash.

  Fixes: https://github.com/bitcoin-core/gui/issues/582.

  See also:
  https://bugreports.qt.io/browse/QTBUG-93476 - very similar issue reported to Qt.

  Guix Build (on x86_64):
  ```bash
  62172df3089e7bca3fd00f63acc9c8d3678a35bfb2bb5a0af905e61e9d8def52  guix-build-457148a803ce/output/dist-archive/bitcoin-457148a803ce.tar.gz
  f8318d16d0418e0e790efd94527a5be374ac50f51df53e05a6d54cc8c08a8633  guix-build-457148a803ce/output/x86_64-w64-mingw32/SHA256SUMS.part
  72076e6896297a36beec6c62065b3d8aeeeb87fed407df947261cefdc81cdb93  guix-build-457148a803ce/output/x86_64-w64-mingw32/bitcoin-457148a803ce-win64-debug.zip
  c617d2347f50d2706bbdcc2b3b97f2ecaf59243747f4c81d7747a22e64cb9d76  guix-build-457148a803ce/output/x86_64-w64-mingw32/bitcoin-457148a803ce-win64-setup-unsigned.exe
  8b1e7821e495121bea8a70f09ea6a0b703503b054d831b0dd86a0fe29cece457  guix-build-457148a803ce/output/x86_64-w64-mingw32/bitcoin-457148a803ce-win64-unsigned.tar.gz
  c8d2c0e68e3bf21ed7cfe08df64925bfa54ce6225c6d29bb710f9d9d4474caee  guix-build-457148a803ce/output/x86_64-w64-mingw32/bitcoin-457148a803ce-win64.zip
  ```

ACKs for top commit:
  jonatack:
    Approach and review-only ACK 457148a803
  laanwj:
    Concept and code review ACK 457148a803
  gruve-p:
    ACK 457148a803
  hebasto:
    ACK 457148a803, tested `bitcoin-457148a803ce-win64.zip` on Windows 11 Pro 21H2. Confirming that bitcoin-core/gui#582 is fixed.
  jarolrod:
    ACK 457148a803

Tree-SHA512: dfb832ce93d72827009458cebbbdd408175b90b98d3eb546f9bbd21efe7bdd4ceca6ed13f5f6ce8e8e15d1c5d613f3a10399847a3589e4e7cc113ac0196d4010
2022-04-14 09:18:16 +02:00
laanwj
8e3c266a4f
Merge bitcoin/bitcoin#24077: util: Make base_uint::GetHex() and base_uint::SetHex() not depend on uint256
a4f4f89815 Replace uint256 specific implementations of base_uint::GetHex() and base_uint::SetHex() with proper ones that don't depend on uint256 and replace template methods instantiations of base_uint with template class instantiation (Samer Afach)

Pull request description:

  The current implementations of `SetHex()` and `GetHex()` in `base_uint` use `arith_uint256`'s implementations. Which means, any attempt to create anything other than `arith_uint256` (say `arith_uint512`) and using any of these functions (which is what I needed in my application) will just not work and will cause compilation errors (besides the immediate linking errors due to templates being in source files instantiated only for 256) because there's no viable conversion from `arith_uint256` and any of the other possible types. Besides that these function will yield wrong results even if the conversion is possible depending on the size. This is fixed in this PR.

ACKs for top commit:
  laanwj:
    re-ACK a4f4f89815

Tree-SHA512: 92a930fb7ddec5a5565deae2386f7d2d84645f9e8532f8d0c0178367ae081019b32eedcb59cc11028bac0cb15d9883228e016a466b1ee8fc3c6377b4df1d4180
2022-04-14 07:15:22 +02:00
Sebastian Falbesoner
038d2a607f test: add test for signet miner script 2022-04-14 00:28:37 +02:00
laanwj
decde9bba6
Merge bitcoin/bitcoin#24355: util, refactor: Add UNIQUE_NAME helper macro
1633f5ec88 util, refactor: Add UNIQUE_NAME helper macro (Hennadii Stepanov)

Pull request description:

  This PR replaces repetitive code with a helper macro.

ACKs for top commit:
  laanwj:
    Tested ACK 1633f5ec88

Tree-SHA512: 5f04e472c5f3184c0a9df75395377c6744bfb2cd8f95f8427c1c5e20daa7d6a9b29e45424b88391fc6326d365907a750ab50fda534b49d1df80dccf0e18467a4
2022-04-13 22:59:33 +02:00
laanwj
9b7eb584ad
Merge bitcoin/bitcoin#24285: build, refactor: Drop useless call Make function
e644591426 build, refactor: Drop useless `call` Make function (Hennadii Stepanov)

Pull request description:

  Using the [`call`](https://www.gnu.org/software/make/manual/html_node/Call-Function.html) function with `$(package)_*_cmds` is effectively noop because the latter, which could be found in `<package>.mk` files, do not use temporary `$(1)` variable at all.

  This PR removes useless calls of the `call` function, and makes code more readable and easier to reason about.

  No change in resulted dependency binaries could be easy verified with bitcoin/bitcoin/#21995.

ACKs for top commit:
  laanwj:
    Code review ACK e644591426
  shaavan:
    Code review ACK e644591426

Tree-SHA512: 8481fa0dc5bbf7dd6a180f7fae5a2ccc07f85b50c7a966bceb2d7e010e07e5f211ee3f74f8ac79bc5acfde5f0764264d599d959ff3ebb8511b1b4a33f79509bd
2022-04-13 22:27:41 +02:00
laanwj
3bbc46ddaf
Merge bitcoin/bitcoin#24632: add (none) in -getinfo Warnings: if no warning returned
0cea7b10f1 print `(none)` if no warnings in -getinfo (/dev/fd0)

Pull request description:

  Adds `(none)` in warnings when no warnings returned by -getinfo

  Reviewers can test this by making the following change in `/src/warnings.cpp`:

  ```diff
  bilingual_str GetWarnings(bool verbose)
  {
      bilingual_str warnings_concise;
      std::vector<bilingual_str> warnings_verbose;

      LOCK(g_warnings_mutex);

      // Pre-release build warning
      if (!CLIENT_VERSION_IS_RELEASE) {
  -        warnings_concise = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");;
  +        warnings_concise = _("");;
  ```

  Before this pull request:

  ```
  $ bitcoin-cli -getinfo
  Chain: regtest
  Blocks: 0
  Headers: 0
  Verification progress: 100.0000%
  Difficulty: 4.656542373906925e-10

  Network: in 0, out 0, total 0
  Version: 239900
  Time offset (s): 0
  Proxies: n/a
  Min tx relay fee rate (BTC/kvB): 0.00001000

  Warnings:
  ```

  After this pull request:

  ```diff
  $ bitcoin-cli -getinfo
  Chain: regtest
  Blocks: 0
  Headers: 0
  Verification progress: 100.0000%
  Difficulty: 4.656542373906925e-10

  Network: in 0, out 0, total 0
  Version: 239900
  Time offset (s): 0
  Proxies: n/a
  Min tx relay fee rate (BTC/kvB): 0.00001000

  Warnings: (none)
  ```

ACKs for top commit:
  jonatack:
    ACK 0cea7b10f1
  laanwj:
    Tested ACK 0cea7b10f1

Tree-SHA512: a12499d11ff84bc954db354f968eb1f5ee4999d8b80581fe0bdf604732b2e2f608cb5c35c4ca8cb5a430f3991954a6207f0758302618662e6b9505044cf2dc95
2022-04-13 21:49:22 +02:00
fanquake
457148a803
guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues
This commit backports a patch to the GCC 10.3.0 we build for Windows
cross-compilation in Guix. The commit has been backported to the GCC
releases/gcc-10 branch, but hasn't yet made it into a release.

The patch corrects a regression from an earlier GCC commit, see:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=357c4350680bf29f0c7a115424e3da11c53b5582
and
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=074226d5aa86cd3de517014acfe34c7f69a2ccc7,
related to the way newer versions of mingw-w64 implement setjmp/longjmp.

Ultimately this was causing a crash for us when Windows users were
viewing the network traffic tab inside the GUI. After some period, long
enough that a buffer would need reallocating, a call into FreeTypes
gray_record_cell() would result in a call to ft_longjmp (longjmp), which
would then trigger a crash.

Fixes: https://github.com/bitcoin-core/gui/issues/582.

See also:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e8d1ca7d2c344a411779892616c423e157f4aea8.
https://bugreports.qt.io/browse/QTBUG-93476.
2022-04-13 13:10:03 +01:00
Hennadii Stepanov
f60a63cc5f
Merge bitcoin-core/gui#577: Getting ready to Qt 6 (1/n)
63125752a9 qt: Update deprecated enum value (Hennadii Stepanov)
c7add881a6 qt: Use `|` instead of `+` for key modifiers (Hennadii Stepanov)
6f1e162fe1 qt: Fix headers (Hennadii Stepanov)

Pull request description:

  For Qt 5 all changes in this PR are refactoring. But for [Qt 6](https://github.com/bitcoin/bitcoin/pull/24798) they are real bugfixes :)

  As I do not provide anyway way to build `bitcoin-qt` against Qt 6.2.4 fir now, suggesting to reviewers to verify changes for Qt 5 only.

ACKs for top commit:
  shaavan:
    ACK 63125752a9
  jarolrod:
    tACK 63125752a9

Tree-SHA512: ceee983192ddf62f09c1305458af3447ff0e3bd90311fa6328b139673bcaed3407dc0ce0b275028d4e0ca251d6b54dad40b48049211aeb251f65cbb4f5330834
2022-04-13 01:27:16 +02:00
Hennadii Stepanov
f509760026
Merge bitcoin-core/gui#576: Add qt unit test runner summary
d025d7f025 gui, refactor: rename fInvalid to num_test_failures in test_main.cpp (Jon Atack)
2489b6fe9c gui: count test failures in test runner summary (Jon Atack)
ba44aae768 gui: add test runner summary (Jon Atack)

Pull request description:

  Append a one-line summary to the output of running `./src/qt/test/test_bitcoin-qt` indicating that all tests passed or showing the number of failing tests. It's currently a bit inconvenient to see this result by eyeballing all of the output.

ACKs for top commit:
  shaavan:
    ACK d025d7f025
  jarolrod:
    tACK d025d7f025

Tree-SHA512: 981c5daa13db127d38167bcf78b296b1a7e5b2d12e65f364ec6382b24f1008a223521d3b6c56e920bcd037479da5414e43758794688019d09e9aa696f3964746
2022-04-13 01:17:30 +02:00
Hennadii Stepanov
0f46e73c74
Merge bitcoin-core/gui#543: peers-tab: add connection duration column to tableview
51708c4516 gui: peersWidget - ResizeToContents Age and IP/Netmask columns (randymcmillan)
209301a442 gui: add Age column to peers tab (randymcmillan)
127de22c5f gui: add FormatPeerAge() utility helper (Jon Atack)

Pull request description:

  This change adds an "Age" column to the peers table view,
  which displays the duration of each peer's connection.

ACKs for top commit:
  jonatack:
    re-ACK  51708c4516
  Jamewood:
    > re-ACK 51708c4
  shaavan:
    reACK 51708c4516
  hebasto:
    ACK 51708c4516, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 27323f7080ec0d3fcdbf1b190fba1cd2d7406840ab6607c221cf8af950db9134e22721cc5a88f4fc4f390d8b05e98bc4b7521661a31fadad9e2c6c6390e71788
2022-04-13 01:11:55 +02:00
Sebastian Falbesoner
449b96ed97 test: add is_bitcoin_util_compiled helper 2022-04-11 21:54:49 +02:00
Sebastian Falbesoner
dde33eca63 test: determine path to bitcoin-util in test framework
The path is stored in `self.options.bitcoinutil`, points to
`src/bitcoin-util` by default and can be overrided with the
`BITCOINUTIL` environment variable.
2022-04-11 21:54:24 +02:00
fanquake
2b5a741e98
Merge bitcoin/bitcoin#24826: builder-keys: Add will8clark
795dd7024d builder-keys: Add will8clark (willcl-ark)

Pull request description:

  Add PGP key for will8clark a.k.a willcl-ark on GitHub to builders

ACKs for top commit:
  laanwj:
    Code review ACK 795dd7024d

Tree-SHA512: 455443a9244b69cd35b200e956822015fcafaa4e7dfefa27baa69764b5ebfd39b824db3fcb50078f7332db17e116ad15940d37a6b4af406de0060973133033d3
2022-04-11 17:22:50 +01:00
willcl-ark
795dd7024d
builder-keys: Add will8clark 2022-04-11 16:07:17 +01:00
fanquake
7626e547b8
Merge bitcoin/bitcoin#24337: build: Do not define PROVIDE_FUZZ_MAIN_FUNCTION macro unconditionally
c9c4e6cadd build: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Hennadii Stepanov)

Pull request description:

  No need to define the `PROVIDE_FUZZ_MAIN_FUNCTION` macro when the build system has been configured with the `--disable-fuzz-binary` option.

  See https://github.com/bitcoin/bitcoin/pull/24336#pullrequestreview-881368272.

ACKs for top commit:
  MarcoFalke:
    Approach ACK c9c4e6cadd did not review or test 🐤
  fanquake:
    ACK c9c4e6cadd Checked that `PROVIDE_FUZZ_MAIN_FUNCTION` isn't defined when configuring with `--disable-fuzz-binary`.

Tree-SHA512: 54fbf02ba9f5ecc61b176b8ea7d05e308788d4de3f97ed40913e731300d9dc0edfdfcbf8e0a6e74cf1b2e2ae63f6208a34e03b9c8d203d070c457c4a7d9b5f2c
2022-04-11 14:29:07 +01:00
MarcoFalke
22e3b6f4d5
Merge bitcoin/bitcoin#24800: lint: convert lint-python-mutable-default-parameters.sh to Python
e8e48fa82b Converted lint-python-mutable-default-parameters.sh to python (TakeshiMusgrave)

Pull request description:

  This converts one of the linter scripts to Python. Reference issue: https://github.com/bitcoin/bitcoin/issues/24783

  The approach is to just call git grep using subprocess.run.

  Alternative approaches could be to use Python instead of git grep (I'm not sure how) or use ```pylint --disable=all --enable=W0102```, though that requires installation of pylint.

ACKs for top commit:
  MarcoFalke:
    review ACK e8e48fa82b

Tree-SHA512: 7f6f4887dee02c9751b225a6a131fb705868859c4a9af25bb3485cda2358650486b110f17adf89d96a20f212d7d94899922a07aab12c8dc11984cfd5feb7a076
2022-04-11 11:48:25 +02:00
MarcoFalke
cd110cdd0e
Merge bitcoin/bitcoin#24817: test: use MiniWallet for feature_fee_estimation.py
494455f8a5 test: use MiniWallet for feature_fee_estimation.py (Sebastian Falbesoner)

Pull request description:

  This PR enables one more of the non-wallet functional tests (feature_fee_estimation.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. It takes use of the recently introduced methods `{create,send}_self_transfer_multi` (#24637) which allows to specify multiple UTXOs to be spent rather than only one. Very likely the test can still be simplified (e.g. coin selection in `small_txpuzzle_randfee`), but this is a first step.

ACKs for top commit:
  ayush933:
    tACK 494455f8 . The test runs successfully with the wallet disabled.
  vincenzopalazzo:
    tACK 494455f8a5

Tree-SHA512: 89789fc34a4374c79c4b90acd926ac69153aad655dab50450ed796f03c770bd675ad872e906f516f90e8d4cb40b83b55f3c78a94b13bfb8fe8f5e27624937748
2022-04-11 11:18:03 +02:00
MarcoFalke
4a58b6acd2
Merge bitcoin/bitcoin#24797: test: compare /chaininfo response with getblockchaininfo RPC
0f7dc893ea test: compare `/chaininfo` response with `getblockchaininfo` RPC (brunoerg)

Pull request description:

  The `/chaininfo` REST endpoint gets its infos from `getblockchaininfo` RPC, so this PR adds an `assert_equal` (in `interface_rest`) to ensure both responses are the same. Obs: other endpoints do the same for their respective RPC.

ACKs for top commit:
  0xB10C:
    Concept and Code Review ACK 0f7dc893ea. Belts-and-spenders.

Tree-SHA512: 51cbcf988090272e406a47dc869710740b74e2222af29c05ddcbf53bd49765cdc59efb525e970867f091b3d2efec4fb13371a342d9e484e51144b760265bc5b8
2022-04-11 11:04:21 +02:00
Sebastian Falbesoner
494455f8a5 test: use MiniWallet for feature_fee_estimation.py
This test can now be run even with the Bitcoin Core wallet disabled.
2022-04-10 02:11:38 +02:00
fanquake
747cdf1d65
Merge bitcoin/bitcoin#24792: Update libsecp256k1 subtree to current master
404c53062b key: use secp256k1_schnorrsig_sign32 over deprecated secp256k1_schnorrsig_sign (fanquake)
ee30bf7c01 build: remove some no-longer-needed var unexporting from configure (fanquake)
2656629767 build: remove --enable-experimental from libsecp256k1 configure (fanquake)
d960d4fd3a build: fix MSVC build after subtree update (dhruv)
afb7a6fe06 Squashed 'src/secp256k1/' changes from 0559fc6e41..8746600eec (fanquake)

Pull request description:

  The motivation for this bump is some small build cleanups, including [dropping the `--enable-experimental`](80cf4eea5f) flag from the libsecp configure  invocation, as well as some [now-redundant](https://github.com/bitcoin-core/secp256k1/pull/1090) `pkg-config` variable exporting from our own configure. We also get the benefit of a slightly more efficient libsecp configure due to https://github.com/bitcoin-core/secp256k1/pull/1088.

  This also includes a change in our code to migrate from using the [now deprecated](99e6568fc6) `secp256k1_schnorrsig_sign` to `secp256k1_schnorrsig_sign32`.

  Guix Build (on x86_64):
  ```bash
  b9f6ad90c75f7edd7c4444c6c3401d8b6ab29a8da22ae22ddaedd94688227b5d  guix-build-404c53062bb8/output/aarch64-linux-gnu/SHA256SUMS.part
  250d47ae299d8385d5590518fa2adaabde76e2566fd27e12bf36b62663d13e13  guix-build-404c53062bb8/output/aarch64-linux-gnu/bitcoin-404c53062bb8-aarch64-linux-gnu-debug.tar.gz
  48d610dc6f5169f925f782571dac2f082695f89008beadad4adef4c1b583a612  guix-build-404c53062bb8/output/aarch64-linux-gnu/bitcoin-404c53062bb8-aarch64-linux-gnu.tar.gz
  8f04ee26e4079719e3935bd0e4287cc11a2a16875bf01e2a63d67492a1fa5367  guix-build-404c53062bb8/output/arm-linux-gnueabihf/SHA256SUMS.part
  7d7d7fcfb032bda92e53abd8d608257f0ef17b1e3e52a1414260b896786fb2dc  guix-build-404c53062bb8/output/arm-linux-gnueabihf/bitcoin-404c53062bb8-arm-linux-gnueabihf-debug.tar.gz
  30bae2ff3d044f4e39f992a68f6b296b7be2aea350bca4a0415c739a32c20bd9  guix-build-404c53062bb8/output/arm-linux-gnueabihf/bitcoin-404c53062bb8-arm-linux-gnueabihf.tar.gz
  5f550fb0b950250eeffce3480ec6403530b0880570a5860ef6c32a3e92eac92f  guix-build-404c53062bb8/output/arm64-apple-darwin/SHA256SUMS.part
  c10664d13aeec8c860bf72be833c738973ae18e4d28cdf08b2f9bee960ebff1d  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin-unsigned.dmg
  becab75b11cf4ca6f559f8eef835f3574629f6eb932ac716ed4f8c044a85831f  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin-unsigned.tar.gz
  bc86433652fe3552f6a13088191364ae7514c9fe3a244da86a6db096bb4922fc  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin.tar.gz
  1f585cb9a1356343df4b2726ecfe2598c9903304afb047c047c2cef318555dd3  guix-build-404c53062bb8/output/dist-archive/bitcoin-404c53062bb8.tar.gz
  9ede534ba2c6cecb550473eead195627327e826ebb0118e23d60ab482d40e241  guix-build-404c53062bb8/output/powerpc64-linux-gnu/SHA256SUMS.part
  77ddb7d7d639b1dd4508468a8ef27e45b35c8b2f8624584a70e6b64798a4ea7a  guix-build-404c53062bb8/output/powerpc64-linux-gnu/bitcoin-404c53062bb8-powerpc64-linux-gnu-debug.tar.gz
  36178c1f1c12942ff05275daa3570f8b45419ee8d9f391d750afb405219986f0  guix-build-404c53062bb8/output/powerpc64-linux-gnu/bitcoin-404c53062bb8-powerpc64-linux-gnu.tar.gz
  8a15a4da7a9a5e00c49d9aeedf3c6fc666c0d230be1369eac7caf4571d5905e0  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/SHA256SUMS.part
  400c58113f2d07c87e03c8528b292c6aca808a2bccae4b041cad3a26a05b6aad  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/bitcoin-404c53062bb8-powerpc64le-linux-gnu-debug.tar.gz
  3b9f9d8614ac3a27416e53354b2b0a64d364f91493e9d0f41583a6f492546824  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/bitcoin-404c53062bb8-powerpc64le-linux-gnu.tar.gz
  98506b23ee08ad8af958f816da2e4518d661e88d5c6308de1f5e3b2fc787b86c  guix-build-404c53062bb8/output/riscv64-linux-gnu/SHA256SUMS.part
  c701a7b77cea4fdc2588b511f1b2c71b89c83bfba19fdb2ac113a5a4b14ac392  guix-build-404c53062bb8/output/riscv64-linux-gnu/bitcoin-404c53062bb8-riscv64-linux-gnu-debug.tar.gz
  34d58e6392cd58b3c76e30cd8600c0dbefba7e9c6d5df78c3ef23e81c4e4d26a  guix-build-404c53062bb8/output/riscv64-linux-gnu/bitcoin-404c53062bb8-riscv64-linux-gnu.tar.gz
  92fa30e9c6d81dd1e1514b65d3e1abe68ded897237cd99f66aa760d445109c04  guix-build-404c53062bb8/output/x86_64-apple-darwin/SHA256SUMS.part
  bee180b02f178ae9980ef159f65913a71cbd037c4aff5f2906af5f174a677da3  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin-unsigned.dmg
  ad7d18d779ab7a7944817d1f368d0a6bdd174bf1211b0f90180c8ccf04ec4062  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin-unsigned.tar.gz
  7489d1d5d48ad95cf58bb11b5fdeccadac6fa758784fb498529fca2330abe069  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin.tar.gz
  74660fb0ebce2a08b03980a57bffcad62e078dc967a74d2395660ff51c019640  guix-build-404c53062bb8/output/x86_64-linux-gnu/SHA256SUMS.part
  cd377fa6b46276c2f8a32e199e6f9adf6aa67315688656709d6dc0744d54a837  guix-build-404c53062bb8/output/x86_64-linux-gnu/bitcoin-404c53062bb8-x86_64-linux-gnu-debug.tar.gz
  919c521950369d8ad46db2d15b00abb488abfb080d157a41b2db429122a428ed  guix-build-404c53062bb8/output/x86_64-linux-gnu/bitcoin-404c53062bb8-x86_64-linux-gnu.tar.gz
  2debca995d432965a8786b6ff74aed42e9e2f1cb0fecbe2d9fc5b850c192fcff  guix-build-404c53062bb8/output/x86_64-w64-mingw32/SHA256SUMS.part
  e33169f684fb031ec18ed39812617d3eb263257f6c7564b8f4c974ad05fe672c  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-debug.zip
  029d0a4180cb908d517fcf689dcf46d42fbf383e11dc609711617066ae039ab0  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-setup-unsigned.exe
  7e349c688cac66436562c4805f420b0536db5a3b3abf54d0e8c7752f59874a5c  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-unsigned.tar.gz
  1bff98e82e95c93d6060227408502f5e2d8597d526b912cb6dc0a90ae3094a8f  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 404c53062b, I checked the changes to our tree thoroughly but didn't review all upstream secp256k1 changes in detail.
  gruve-p:
    ACK 404c53062b
  real-or-random:
    utACK 404c53062b I reviewed the diff to Core, I'm with updating to libsecp256k1 master, but I haven't verified that the libsecp256k1 tree here has been updated correctly

Tree-SHA512: e6a6db93ea60ed500df5065178784a915da94adfa7bd45fdbd7b19d701154987ff38c1df7f318119e6c2cb98e28e1ea2eb725bef93d4088403e14537ebffb032
2022-04-09 20:18:54 +01:00
MarcoFalke
87c7dcc60d
Merge bitcoin/bitcoin#24808: doc: update RPC argument and field naming guideline in developer notes
8b3f1e30f0 Update RPC argument and field naming guideline in developer notes (Jon Atack)

Pull request description:

  Clarify the doc per the IRC discussion today at https://www.erisian.com.au/bitcoin-core-dev/log-2022-04-08.html#l-229.

ACKs for top commit:
  mzumsande:
    Code Review ACK 8b3f1e30f0 - I agree with the added guideline.

Tree-SHA512: d0d06bc8d9587c0dc72545843097e48a4e27a9437ceca03c71d0aa4a9b8434971014687d8d2dd012b71e92b26d4ad116697365be3f2a8ed14daecfdb1d0982ef
2022-04-09 15:06:08 +02:00
Hennadii Stepanov
63125752a9
qt: Update deprecated enum value
This change is preparation for Qt 6, and it fixes an experimental build
with Qt 6.2.4.
The `Qt::ItemIsTristate` value has been deprecated since 5.6.0 (see
ae8406d82f541f6d9112bdac192e5e4e114d56aa upstream commit).
2022-04-09 01:13:35 +02:00
Hennadii Stepanov
c7add881a6
qt: Use | instead of + for key modifiers
This change is preparation for Qt 6 where `+` has been deprecated, and
it fixes an experimental build with Qt 6.2.4.
2022-04-09 01:12:06 +02:00
Hennadii Stepanov
6f1e162fe1
qt: Fix headers
This change is preparation for Qt 6, and it fixes an experimental build
with Qt 6.2.4.
2022-04-09 01:11:02 +02:00
TakeshiMusgrave
e8e48fa82b Converted lint-python-mutable-default-parameters.sh to python
Change permission

Change argument so that it's compatiable with python 3.6

Change comment to docstring

Remove .split, .append, .extend calls. Remove 'output' variable assignment
2022-04-08 11:53:47 -04:00
/dev/fd0
0cea7b10f1 print (none) if no warnings in -getinfo 2022-04-08 20:33:07 +05:30
Jon Atack
8b3f1e30f0
Update RPC argument and field naming guideline in developer notes
Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-04-08 15:46:05 +02:00
fanquake
e0680bbce8
Merge bitcoin/bitcoin#24806: RPC: Switch getblockfrompeer back to standard param name blockhash
88917f93cc RPC: Switch getblockfrompeer back to standard param name blockhash (Luke Dashjr)

Pull request description:

  This commit partially reverts 923312fbf6.

  Portion of #24294.

ACKs for top commit:
  MarcoFalke:
    review ACK 88917f93cc
  ajtowns:
    ACK 88917f93cc
  jonatack:
    Review-and-grep-only ACK 88917f93cc

Tree-SHA512: e42497ea6162623e449c5e60b83a5abbef568f226edc022aa14bbc1f1921618255d593968cf43f7a6d2c0bfd84cdd4b05fbce5c724759b20035e6eead758d443
2022-04-08 13:43:18 +01:00
fanquake
c1059c9fef
Merge bitcoin/bitcoin#24770: Put lock logging behind DEBUG_LOCKCONTENTION preprocessor directive
4394733331 Add DEBUG_LOCKCONTENTION documentation to the developer notes (Jon Atack)
39a34b6877 Put lock logging behind DEBUG_LOCKCONTENTION preprocessor directive (Jon Atack)

Pull request description:

  This is a more minimal, no-frills version of #24734 for backport. The other fixes and improvements in that pull can be done after.

  *Copy of the PR 24734 description:*

  PRs #22736, #22904 and #23223 changed lock contention logging from a `DEBUG_LOCKCONTENTION` compile-time preprocessor directive to a runtime `lock` log category and improved the logging output. This changed the locking from using `lock()` to `try_lock()`:

  - `void Mutex::UniqueLock::lock()` acquires the mutex and blocks until it gains access to it

  - `bool Mutex::UniqueLock::try_lock()` doesn't block but instead immediately returns whether it acquired the mutex; it may be used by `lock()` internally as part of the deadlock-avoidance algorithm

  In theory the cost of `try_lock` might be essentially the [same](https://www.erisian.com.au/bitcoin-core-dev/log-2022-03-31.html#l-697) relative to `lock`. The test-and-set logic of these calls is purported to be ~ constant time, optimised and light/quick if used carefully (i.e. no mutex convoying), compared to system calls, memory/cache coherency and fences, wait queues, and (particularly) lock contentions. See the discussion around https://github.com/bitcoin/bitcoin/pull/22736#issuecomment-902851054 and after with respect to performance/cost aspects.  However, there are reasonable concerns (see [here](https://github.com/bitcoin/bitcoin/pull/22736#discussion_r691277896) and [here](https://www.erisian.com.au/bitcoin-core-dev/log-2022-03-31.html#l-620)) that `Base::try_lock()` may be potentially [costly](https://www.erisian.com.au/bitcoin-core-dev/log-2022-03-31.html#l-700) or [risky](https://github.com/bitcoin/bitcoin/pull/22904#issuecomment-930484001) compared to `Base::lock()` in this very frequently called code.

  One alternative to keep the run-time lock logging would be to gate the `try_lock` call behind the logging conditional, for example as proposed in ccd73de1dd and ACKed [here](https://github.com/bitcoin/bitcoin/pull/22736#issuecomment-901980815). However, this would add the [cost](https://github.com/bitcoin/bitcoin/pull/22736#issuecomment-910102353) of `if (LogAcceptCategory(BCLog::LOCK))` to the hotspot, instead of replacing `lock` with `try_lock`, for the most frequent happy path (non-contention).

  It turns out we can keep the advantages of the runtime lock contention logging (the ability to turn it on/off at runtime) while out of prudence putting the `try_lock()` call and `lock` logging category behind a  `DEBUG_LOCKCONTENTION` compile-time preprocessor directive, and also still retain the lock logging enhancements of the mentioned PRs, as suggested in https://github.com/bitcoin/bitcoin/pull/24734#issuecomment-1085785480 by W. J. van der Laan, in https://github.com/bitcoin/bitcoin/pull/22736#discussion_r691280693, and in the linked IRC discussion.

  Proposed here and for backport to v23.

ACKs for top commit:
  laanwj:
    Code review ACK 4394733331

Tree-SHA512: 89b1271cae1dca0eb251914b1a60fc5b68320aab4a3939c57eec3a33a3c8f01688f05d95dfc31f91d71a6ed80cfe2d67b77ff14742611cc206175e47b2e5d3b1
2022-04-08 13:30:24 +01:00
Luke Dashjr
88917f93cc
RPC: Switch getblockfrompeer back to standard param name blockhash
This commit partially reverts 923312fbf6.
2022-04-08 13:22:46 +01:00
fanquake
404c53062b
key: use secp256k1_schnorrsig_sign32 over deprecated secp256k1_schnorrsig_sign
The renaming occured in
https://github.com/bitcoin-core/secp256k1/pull/1089.
2022-04-07 22:24:44 +01:00
fanquake
ee30bf7c01
build: remove some no-longer-needed var unexporting from configure 2022-04-07 22:24:44 +01:00
fanquake
2656629767
build: remove --enable-experimental from libsecp256k1 configure 2022-04-07 22:24:43 +01:00
dhruv
d960d4fd3a
build: fix MSVC build after subtree update
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: Aaron Clauson <aaron@sipsorcery.com>
2022-04-07 22:24:43 +01:00
MarcoFalke
38d3d0bfc4
Merge bitcoin/bitcoin#24796: lint: misc updates & fixes
f87f25948a refactor: fixup named args in txpackage tests (fanquake)
864772c4f7 lint: mypy 0.942 (fanquake)
38031adee8 lint: flake8 4.0.1 (fanquake)
eaf712c801 lint: codespell 2.1.0 (fanquake)

Pull request description:

  Use newer versions of our lint packages.
  Fix all the outstanding typos.
  Fix the failing CI.

ACKs for top commit:
  MarcoFalke:
    review ACK f87f25948a

Tree-SHA512: 2c1471c13e088d5b9cdd436ebde40180516ae1dd2a2ea4d2f54214762a0712557d899e73c4cfd32992fe45fce6fdba50ba39254f2c79cd5d1180e873a79b9b22
2022-04-07 14:31:21 +02:00
fanquake
f87f25948a
refactor: fixup named args in txpackage tests
Regression in #24152.
2022-04-07 12:50:54 +01:00
fanquake
864772c4f7
lint: mypy 0.942 2022-04-07 12:50:54 +01:00
fanquake
38031adee8
lint: flake8 4.0.1 2022-04-07 12:50:10 +01:00
fanquake
eaf712c801
lint: codespell 2.1.0 2022-04-07 12:49:51 +01:00
MarcoFalke
323d4c09c0
Merge bitcoin/bitcoin#24784: refactor: deduplicate integer serialization in RollingBloom benchmark
fff91418ff refactor: Remove deduplication of data in rollingbloom bench (phyBrackets)

Pull request description:

  Fixed up #24088.

ACKs for top commit:
  vincenzopalazzo:
    ACK fff91418ff

Tree-SHA512: 9fef617bceb74a1aec4f4a1e7c4732c4764af3e8ac2fc02b84ce370e8b97431957ca17ee8f44fb96765f7304f8d7e5bfb951440db98ba40f240612f2232d215e
2022-04-07 11:53:20 +02:00