Commit graph

41069 commits

Author SHA1 Message Date
Hennadii Stepanov
85f50a46c5
refactor: Fix "error C2248: cannot access private member" on MSVC 2024-04-28 07:11:24 +01:00
merge-script
3aaf7328eb
Merge bitcoin/bitcoin#29774: build: Enable fuzz binary in MSVC
18fd522ca9 ci, msvc: Add "Run fuzz binaries" step (Hennadii Stepanov)
52933d7283 fuzz: Pass `SystemRoot` environment variable to subprocess (Hennadii Stepanov)
23cb8207cd ci, msvc: Add "Clone fuzz corpus" step (Hennadii Stepanov)
19dceddf4b build, msvc: Build `fuzz.exe` binary (Hennadii Stepanov)
4c078d7bd2 build, msvc: Enable preprocessor conformance mode (Hennadii Stepanov)
09f5a74198 fuzz: Re-implement `read_stdin` in portable way (Hennadii Stepanov)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/29760.

  Suggested in https://github.com/bitcoin/bitcoin/pull/29758#issuecomment-2025593572.

ACKs for top commit:
  maflcko:
    lgtm ACK 18fd522ca9 🔍
  sipsorcery:
    tACK 18fd522ca9
  sipa:
    utACK 18fd522ca9

Tree-SHA512: 672ed6926ee9091f68f13780e77b60fc1d48731f16e847d849374f8426ffe1dafd9bcab06a27af62e8052ba345bb57f20f40579d6be8540c12ef85c23a6eec8b
2024-04-28 10:55:01 +08:00
MarcoFalke
fa1964c5b8
build: Bump clang minimum supported version to 15 2024-04-27 14:54:00 +02:00
merge-script
7fee0ca014
Merge bitcoin/bitcoin#29976: build, msvc: Drop duplicated common\url.cpp source file
97a4ad5713 build, msvc: Drop duplicated `common\url.cpp` source file (Hennadii Stepanov)

Pull request description:

  After https://github.com/bitcoin/bitcoin/pull/29904, the `common\url.cpp` source file is included into the `SOURCE_FILES` by the `msvc-autogen.py` script.

  Removes a compiler [warning](https://github.com/bitcoin/bitcoin/actions/runs/8853698173/job/24315127236#step:20:1776):
  ```
  url.obj : warning LNK4006: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl UrlDecode(class std::basic_string_view<char,struct std::char_traits<char> >)" (?UrlDecode@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@DU?$char_traits@D@std@@@2@@Z) already defined in common_url.obj; second definition ignored [D:\a\bitcoin\bitcoin\build_msvc\libbitcoin_common\libbitcoin_common.vcxproj]
  ```

ACKs for top commit:
  fanquake:
    ACK 97a4ad5713

Tree-SHA512: 294955d6e6940b48a429e2302fb456706a5c62515d479398036b40716ee6b722535876adeb9b988ddb8fc942fabc39fe358c50eff0baaae92bd24bbeb4362885
2024-04-27 14:48:54 +08:00
Hennadii Stepanov
97a4ad5713
build, msvc: Drop duplicated common\url.cpp source file
It has been a part of SOURCE_FILES since https://github.com/bitcoin/bitcoin/pull/29904
2024-04-26 22:47:00 +01:00
Ava Chow
1ffbd96349
Merge bitcoin/bitcoin#29771: test: Run framework unit tests in parallel
f19f0a2e5a test: Run framework unit tests in parallel (tdb3)

Pull request description:

  Functional test framework unit tests are currently run prior to all other functional tests.

  This PR enables execution of the test framework unit tests in parallel with the functional tests, rather than before the functional tests, saving runtime and more efficiently using available cores.

  This is a follow up to  https://github.com/bitcoin/bitcoin/pull/29470#issuecomment-1962313977

  ### New behavior:
  1) When running all tests, the framework unit tests are run in parallel with the other tests (unless explicitly skipped with `--exclude`).  This parallelization introduces marginal time savings when running all tests, depending on the machine used.  As an example, a 2-3% time savings (9 seconds) was observed on a machine using `--jobs=18` (with 18 available cores).
  2) When running specific functional tests, framework unit tests are now skipped by default.  Framework unit tests can be added by including `feature_framework_unit_tests.py` in the list of specific tests being executed.  The rationale for skipping by default is that if the tester is running specific functional tests, there is a conscious decision to focus testing, and choosing to run all tests (where unit tests are run by default) would be a next step.
  3) The `--skipunit` option is now removed since unit tests are parallelized (they no longer delay other tests).  Unit tests are treated equally as functional tests.

  ### Implementation notes:
  Since `TextTestRunner` can be noisy (even with verbosity=0, and therefore trigger job failure through the presence of non-failure stderr output), the approach taken was to send output to stdout, and forward test result (as determined by `TestResult` returned).  This aligns with the previous check for unit test failure (`if not result.wasSuccessful():`).

  This approach was tested by inserting `self.assertEquals(True, False)` into test_framework/address.py and seeing specifics of the failure reported.

  ```
  135/302 - feature_framework_unit_tests.py failed, Duration: 0 s

  stdout:
  .F
  ======================================================================
  FAIL: test_bech32_decode (test_framework.address.TestFrameworkScript.test_bech32_decode)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/dev/myrepos/bitcoin/test/functional/test_framework/address.py", line 228, in test_bech32_decode
      self.assertEqual(True, False)
  AssertionError: True != False

  ----------------------------------------------------------------------
  Ran 2 tests in 0.003s

  FAILED (failures=1)

  stderr:
  ```

  There was an initial thought to parallelize the execution of the unit tests themselves (i.e. run the 12 unit test files in parallel), however, this is not anticipated to further reduce runtime meaningfully and is anticipated to add unnecessary complexity.

ACKs for top commit:
  maflcko:
    ACK f19f0a2e5a 🌽
  achow101:
    ACK f19f0a2e5a
  kevkevinpal:
    Approach ACK f19f0a2e5a

Tree-SHA512: ab9f82c30371b2242bc7a263ea0e25d35e68e2ddf223d2a55498ad940d1e5b73bba76cce8b264d71e2ed31b753430d8ef8d57efc1e4fd9ced7fb845e27f4f47e
2024-04-26 16:06:37 -04:00
Sergi Delgado Segura
d53d848347 test: adds outbound eviction tests for non outbound-full-relay peers
Peer protection is only given to outbound-full-relay peers. Add a negative
test to check that other type of outbound peers are not given protection under
the circumstances that outbound-full-relay would
2024-04-26 11:15:22 -04:00
Sergi Delgado Segura
a8d9a0edc7 test: adds outbound eviction functional tests, updates comment in ConsiderEviction 2024-04-26 11:14:20 -04:00
Alfonso Roman Zubeldia
b259b0e8d3 [Test] Assumeutxo: ensure failure when importing a snapshot twice 2024-04-26 10:50:00 -03:00
glozow
e518a8bf8a [functional test] opportunistic 1p1c package submission 2024-04-26 11:27:37 +01:00
glozow
87c5c524d6 [p2p] opportunistically accept 1-parent-1-child packages 2024-04-26 11:27:37 +01:00
glozow
6c51e1d7d0 [p2p] add separate rejections cache for reconsiderable txns 2024-04-26 10:28:27 +01:00
glozow
410ebd6efa [fuzz] break out parent functions and add GetChildrenFrom* coverage
It's very hard to randomly construct a transaction that would be the
parent of an existing orphanage tx. For functions like
AddChildrenToWorkSet and GetChildren that take orphan parents, use a tx
that was previously constructed.
2024-04-26 10:28:27 +01:00
glozow
d095316c1c [unit test] TxOrphanage::GetChildrenFrom* 2024-04-26 10:28:27 +01:00
glozow
2f51cd680f [txorphanage] add method to get all orphans spending a tx 2024-04-26 10:28:27 +01:00
glozow
092c978a42 [txpackages] add canonical way to get hash of package 2024-04-26 10:28:27 +01:00
merge-script
7973a67091
Merge bitcoin/bitcoin#29967: test: Add two more urlDecode tests
fa55972a75 test: Add two more urlDecode tests (MarcoFalke)

Pull request description:

  Trivial follow-up after https://github.com/bitcoin/bitcoin/pull/29904#discussion_r1579216072

ACKs for top commit:
  laanwj:
    Code review ACK fa55972a75
  fjahr:
    ACK fa55972a75
  stickies-v:
    ACK fa55972a75
  Sjors:
    utACK fa55972a75

Tree-SHA512: 99916feebb35b5670a365120f962fd6c28cb124635c99ac3ee3520dfc130bd1672f43b06b05b7b0b9e563d223bd009f8d6622817a2d2b4ee24596af40e2cdfaf
2024-04-26 16:40:04 +08:00
MarcoFalke
fa55972a75
test: Add two more urlDecode tests 2024-04-26 08:33:56 +02:00
Ryan Ofsky
6a8b2befea refactor: Avoid copying util::Result values
Copying util::Result values is less efficient than moving them because they
allocate memory and contain strings. Also this is needed to avoid compile
errors in https://github.com/bitcoin/bitcoin/pull/25722 which adds a
std::unique_ptr member to util::Result which implicity disables copying.
2024-04-25 16:08:24 -04:00
Ava Chow
2eff198f49
Merge bitcoin/bitcoin#28834: net: attempts to connect to all resolved addresses when connecting to a node
fd81a37239 net: attempts to connect to all resolved addresses when connecting to a node (Sergi Delgado Segura)

Pull request description:

  This is a follow-up of #28155 motivated by https://github.com/bitcoin/bitcoin/pull/28155#discussion_r1362677038

  ## Rationale

  Prior to this, when establishing a network connection via `CConnman::ConnectNode`, if the connection needed address resolution, a single address would be picked at random from the resolved addresses and our node would try to connect to it. However, this would lead to the behavior of `ConnectNode` being unpredictable when the address was resolved to various ips (e.g. the address resolving to IPv4 and IPv6, but we only support one of them).

  This patches the aforementioned behavior by going over all resolved IPs until a valid one is found or until we
  exhaust them.

ACKs for top commit:
  mzumsande:
    re-ACK fd81a37239 (just looked at diff, only small logging change)
  achow101:
    ACK fd81a37239
  vasild:
    ACK fd81a37239

Tree-SHA512: fa1ebc5c84fe61dd0a7fe1113ae2d594a75ad661c43ed8984a31fc9bc50f166b2759b0d8d84ee5dc247691eff78c8156fac970af797bbcbf67492eec0353fb58
2024-04-25 16:08:24 -04:00
Ryan Ofsky
834f65e824 refactor: Drop util::Result operator=
`util::Result` objects are aggregates that can hold multiple fields with
different information. Currently Result objects can only hold a success value
of an arbitrary type or a single bilingual_str error message. In followup PR
https://github.com/bitcoin/bitcoin/pull/25722, Result objects may be able to
hold both success and failure values of different types, plus error and warning
messages.

Having a Result::operator= assignment operator that completely erases all
existing Result information before assigning new information is potentially
dangerous in this case. For example, code that looks like it is assigning a
warning value could erase previously-assigned success or failure values.
Conversely, code that looks like it is just assigning a success or failure
value could erase previously assigned error and warning messages.

To prevent potential bugs like this, disable Result::operator= assignment
operator.

It is possible in the future we may want to re-enable operator= in limited
cases (such as when implicit conversions are not used) or add a Replace() or
Reset() method that mimicks default operator= behavior. Followup PR
https://github.com/bitcoin/bitcoin/pull/25722 also adds a Result::Update()
method providing another way to update an existing Result object.

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2024-04-25 16:08:24 -04:00
Ava Chow
0e2e7d1a35
Merge bitcoin/bitcoin#29867: index: race fix, lock cs_main while 'm_synced' is subject to change
65951e0418 index: race fix, lock cs_main while 'm_synced' is subject to change (Ryan Ofsky)

Pull request description:

  Fixes #29831 and #29863. Thanks to Marko for the detailed description of the issue.

  The race occurs because a block could be connected and its event signaled in-between reading the 'next block' and setting `m_synced` during the index initial synchronization. This is because `cs_main` is not locked through the process of determining the final index sync state.
  To address the issue, the `m_synced` flag set has been moved under `cs_main` guard.

ACKs for top commit:
  fjahr:
    Code review ACK 65951e0418
  achow101:
    ACK 65951e0418
  ryanofsky:
    Code review ACK 65951e0418

Tree-SHA512: 77286e22de164a27939d2681b7baa6552eb75e99c541d3b9631f4340d7dd01742667c86899b6987fd2d97799d959e0a913a7749b2b69d9e50505128cd3ae0e69
2024-04-25 14:12:13 -04:00
Ava Chow
2066295172
Merge bitcoin/bitcoin#29433: contrib: rpcauth.py - Add new option (-json) to output text in json format
9adf949d2a contrib: rpcauth.py - Add new option (-j/--json) to output text in json format (bstin)

Pull request description:

  This is a simple change to rpcauth.py utility in order to output as json instead raw text.

  This is beneficial because integrating json output is simpler with multiple different forms of automation and tooling

ACKs for top commit:
  maflcko:
    ACK 9adf949d2a
  achow101:
    ACK 9adf949d2a
  willcl-ark:
    tACK 9adf949d2a
  tdb3:
    ACK for 9adf949d2a

Tree-SHA512: 2cdc3b2071fbe4fb32a84ce42ee8ad216cff96ed82aaef58daeb3991953ac137ae42d6898a7fdb6cbd1800e1f61ff8d292f0b150eaebdd2a3fd9d37ed7450787
2024-04-25 13:55:47 -04:00
Ava Chow
50b09e8173
Merge bitcoin/bitcoin#29615: test: fix accurate multisig sigop count (BIP16), add unit test
3e9c736a26 test: fix accurate multisig sigop count (BIP16), add unit test (Sebastian Falbesoner)

Pull request description:

  In the course of reviewing #29589 I noticed the following buggy call-site of `CScriptOp.decode_op_n` in the CScript's `GetSigOpCount` method:
  4cc99df44a/test/functional/test_framework/script.py (L591-L593)
  This should be `lastOpcode` rather than `opcode`. The latter is either OP_CHECKMULTISIG or OP_CHECKMULTISIGVERIFY at this point, so `decode_op_n` would result in an error. Also, in `CScript.raw_iter`, we have to return the op as `CScriptOp` type instead of a bare integer, otherwise we can't call the decode method on it. To prevent this in the future, add some simple unit tests for `GetSigOpCount`.

  Note that this was unnoticed, as the code part was never hit so far in the test framework.

ACKs for top commit:
  achow101:
    ACK 3e9c736a26
  Christewart:
    ACK 3e9c736a26
  rkrux:
    tACK [3e9c736](3e9c736a26)
  hernanmarino:
    tACK 3e9c736a26

Tree-SHA512: 51647bb6d462fbd101effd851afdbd6ad198c0567888cd4fdcac389a9fb4bd3d7e648095c6944fd8875d36272107ebaabdc62d0e2423289055588c12294d05a7
2024-04-25 13:51:39 -04:00
Ava Chow
3c88eac28e
Merge bitcoin/bitcoin#29736: test: Extends wait_for_getheaders so a specific block hash can be checked
c4f857cc30 test: Extends wait_for_getheaders so a specific block hash can be checked (Sergi Delgado Segura)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/18614

  Previously, `wait_for_getheaders` would check whether a node had received **any** getheaders message. This implied that, if a test needed to check for a specific block hash within a headers message, it had to make sure that it was checking the desired message. This normally involved having to manually clear `last_message`. This method, apart from being too verbose, was error-prone, given an undesired `getheaders` would make tests pass.

  This adds the ability to check for a specific block_hash within the last `getheaders` message.

ACKs for top commit:
  achow101:
    ACK c4f857cc30
  BrandonOdiwuor:
    crACK c4f857cc30
  cbergqvist:
    ACK c4f857cc30
  stratospher:
    tested ACK c4f857c. went through all getheaders messages sent in the tests and checked that it's the one we want.

Tree-SHA512: afc9a31673344dfaaefcf692ec2ab65958c3d4c005f5f3af525e9960f0622d8246d5311e59aba06cfd5c9e0ef9eb90a7fc8e210f030bfbe67b897c061efdeed1
2024-04-25 13:26:21 -04:00
Ryan Ofsky
16a6174613
Merge bitcoin/bitcoin#29904: refactor: Use our own implementation of urlDecode
992c714451 common: Don't terminate on null character in UrlDecode (Fabian Jahr)
099fa57151 scripted-diff: Modernize name of urlDecode function and param (Fabian Jahr)
8f39aaae41 refactor: Remove hooking code for urlDecode (Fabian Jahr)
650d43ec15 refactor: Replace libevent use in urlDecode with our own code (Fabian Jahr)
46bc6c2aaa test: Add unit tests for urlDecode (Fabian Jahr)

Pull request description:

  Fixes #29654 (as a side-effect)

  Removing dependencies is a general goal of the project and the xz backdoor has been an additional wake up call recently. Libevent shows many of the same symptoms, few maintainers and slow releases. While libevent can not be removed completely over night we should start removing it’s usage where it's possible, ideally with the end goal to removing it completely.

  This is a pretty easy win in that direction. The [`evhttp_uridecode` function from libevent](e0a4574ba2/http.c (L3542)) we were using in `urlDecode` could be easily emulated in fewer LOC. This also ports the [applicable test vectors over from libevent](https://github.com/libevent/libevent/blob/master/test/regress_http.c#L3430).

ACKs for top commit:
  achow101:
    ACK 992c714451
  theStack:
    Code-review ACK 992c714451
  maflcko:
    ACK 992c714451 👈
  stickies-v:
    ACK 992c714451

Tree-SHA512: 78f76ae7ab3b6710eab2aaac20f55eb0da7803e057eaa6220e865f328666a5399ef1a479702aaf630b2f974ad3aa15e2b6adac9c11bc8c3d4be21e8af1667fea
2024-04-25 13:02:43 -04:00
Ava Chow
a9011781fc
Merge bitcoin/bitcoin#29689: lint: scripted-diff verification also requires GNU grep
3bf4f8db66 lint: scripted-diff verification also requires GNU grep (Sjors Provoost)

Pull request description:

  I noticed while trying to verify all historical `scripted-diff:` commits on macOS that some scripts require GNU sed.

  For example 0d6d2b650d uses `git grep --perl-regexp`.

ACKs for top commit:
  hernanmarino:
    cr ACK 3bf4f8db66
  maflcko:
    utACK 3bf4f8db66
  achow101:
    ACK 3bf4f8db66
  alfonsoromanz:
    Tested ACK 3bf4f8db66
  kristapsk:
    cr utACK 3bf4f8db66

Tree-SHA512: 09a060ab1bafad03df60d0f20c3dd1451850868dbd66ea38b18178b6230c1f06cf48622db82d9c51422d5689962ee0cd7aae0a31f84bd6d878215e6d73c1d47e
2024-04-25 12:34:50 -04:00
Sebastian Falbesoner
908c51fe4a remove commented out code in cpp-subprocess 2024-04-25 17:44:39 +02:00
Fabian Jahr
6abe772a17
contrib: Add asmap-tool
Co-authored-by: Pieter Wuille <pieter@wuille.net>
2024-04-25 17:27:08 +02:00
bstin
9adf949d2a contrib: rpcauth.py - Add new option (-j/--json) to output text in json format
-j/--json update and remove un-needed parens

Update README to reflect new -j/--json options
2024-04-25 08:32:28 -05:00
Brandon Odiwuor
e504b1fa1f test: Add test case for spending bare multisig
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2024-04-25 16:22:58 +03:00
merge-script
0eb1459efa
Merge bitcoin/bitcoin#29953: doc: Bash is needed in gen_id and is not installed on FreeBSD by default
9381052194 doc: Bash is needed in gen_id and is not installed on FreeBSD by default (Hennadii Stepanov)

Pull request description:

  On FreeBSD 14.0, in the `depends` directory:

  - without `bash`:
  ```
  $ gmake print-bdb_build_id_long
  env: bash: No such file or directory
  env: bash: No such file or directory
  bdb_build_id_long=bdb-4.8.30-4b0c6f8e95251b9c6731844fc34111c04b75fd9f15c671d6e34f2a4d014ec1be-release
  $ gmake print-final_build_id
  env: bash: No such file or directory
  env: bash: No such file or directory
  final_build_id=722b2d3e264
  ```

  - with `bash`:
  ```
  $ gmake print-bdb_build_id_long
  bdb_build_id_long=bdb-4.8.30-4b0c6f8e95251b9c6731844fc34111c04b75fd9f15c671d6e34f2a4d014ec1be-release  1ed47cefe468014c79dedb275cf921f44ab28d91dd56bf94712409b81326d765
  $ gmake print-final_build_id
  final_build_id=7b4f9aaa683
  ```

ACKs for top commit:
  vasild:
    ACK 9381052194
  kristapsk:
    ACK 9381052194
  alfonsoromanz:
    ACK 9381052194

Tree-SHA512: da3f3469ac416518180194f09fb054fb352a2793848fb9a7982439de08244ff6149a7f449ad21fcdf0e9bd79b6949a91751f9cc35833953d2b6a35cea5c6ae21
2024-04-25 21:22:45 +08:00
merge-script
d48d55e0d3
Merge bitcoin/bitcoin#29890: deploy: remove some tools when cross-compiling for macOS
1a9aa8d4ee build: better scope usage of -Wl,-headerpad_max_install_names (fanquake)
3bee51427a build: don't use install_name_tool for macOS deploy when cross-compiling (fanquake)
78b6b5c485 build: don't pass strip to macOS deploy if cross-compiling (fanquake)

Pull request description:

  Neither of these tools are actually used when we are cross-compiling for macOS. They are used when we have to adjust non-static libs during a deploy after building on a macOS machine. Simplies #29739 (will be rebased on top).

  Guix (aarch64):
  ```bash
  8f29bce75d7f574306a0e38d793e0e4e145b547a4b9e5a755a54976121d8ac41  guix-build-5afd3c302051/output/arm64-apple-darwin/SHA256SUMS.part
  9ba01fe46be715adcbe80f39dc7dbe449f32ca9d9b660da698f933aef3e6d80b  guix-build-5afd3c302051/output/arm64-apple-darwin/bitcoin-5afd3c302051-arm64-apple-darwin-unsigned.tar.gz
  37719437e951449341d0e10dcc4afe93e955d59de5312ce6351e1fa01b4927ac  guix-build-5afd3c302051/output/arm64-apple-darwin/bitcoin-5afd3c302051-arm64-apple-darwin-unsigned.zip
  06a79fc871dcd4290f5f7e7e9de19a5a535203d20279f4555d1c319d07abe2d0  guix-build-5afd3c302051/output/arm64-apple-darwin/bitcoin-5afd3c302051-arm64-apple-darwin.tar.gz
  98d2b8b37197dcad36a04eb2f3ff2130b859220a17b83a4186a78dcf0af4eafd  guix-build-5afd3c302051/output/dist-archive/bitcoin-5afd3c302051.tar.gz
  df63ff44ef41565ff13ce6dde5485173a18d5866ebc316df86f9ebd91fda18f5  guix-build-5afd3c302051/output/x86_64-apple-darwin/SHA256SUMS.part
  28362ce9e80d5e78db198efa5f89434fbe76ca91df5fde7455da4d50ceb8523a  guix-build-5afd3c302051/output/x86_64-apple-darwin/bitcoin-5afd3c302051-x86_64-apple-darwin-unsigned.tar.gz
  534745b679eb9e8e408dd251a6bf0829e62e12f7a41772b8a57a044ded14208c  guix-build-5afd3c302051/output/x86_64-apple-darwin/bitcoin-5afd3c302051-x86_64-apple-darwin-unsigned.zip
  f53d0c9a1bb83d548c7d274c7d39653a3989fb1b4efec49e73dd1cac7c92074c  guix-build-5afd3c302051/output/x86_64-apple-darwin/bitcoin-5afd3c302051-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  TheCharlatan:
    ACK 1a9aa8d4ee

Tree-SHA512: 0aa77ea4d6dc45c226806bb1758b6aa7e8ca17f91045bab4fc6891af7b9de476211cd5692c11cb9d5bcf59744fd86a2534812a77fe304ae10c3518e08fc412be
2024-04-25 21:21:42 +08:00
merge-script
ee1c975f80
Merge bitcoin/bitcoin#29938: Fix typos in description.md and wallet_util.py
03e36b3da0 Fix typos in description.md and wallet_util.py (hanmz)

Pull request description:

  Fix typos in description.md.
  `digestable` => `digestible`
  `lenghts` => `lengths`

ACKs for top commit:
  maflcko:
    ACK 03e36b3da0
  kristapsk:
    ACK 03e36b3da0
  brunoerg:
    utACK 03e36b3da0
  alfonsoromanz:
    ACK 03e36b3da0

Tree-SHA512: 592b85f92459e96d35ddb41f2913f950a2ef9b9b74ef85af03a72553893b32e76cc6630091199359140a1d403e61c7354b61f6e09fd122c7c9fb677ce4bd48d6
2024-04-25 21:13:28 +08:00
merge-script
10f5022072
Merge bitcoin/bitcoin#29708: depends: build libnatpmp with CMake
3c1ae3ee33 depends: switch libnatpmp to CMake (Cory Fields)
72ba7b5d26 depends: libnatpmp f2433bec24ca3d3f22a8a7840728a3ac177f94ba (fanquake)

Pull request description:

  This picks up one of the changes from https://github.com/bitcoin/bitcoin/pull/29232, which is a switch to building libnatpmp with CMake. It includes an update to the most recent version of libnatpmp (f2433bec24), which includes (https://github.com/miniupnp/libnatpmp/pull/43).

  From an initial look I couldn't find any significant difference between the Autotools and CMake produced libs.

ACKs for top commit:
  m3dwards:
    ACK 3c1ae3ee33
  hebasto:
    ACK 3c1ae3ee33.
  TheCharlatan:
    ACK 3c1ae3ee33

Tree-SHA512: 1dd9d9933a5fceb9f8c4e1d68cd5cb4456a10a6dd27a6f6316f14493f9d2efad981ef8be9570c09ca82d45163aebd7f4cb2b2449989ec6084268ddba9a564c83
2024-04-25 21:07:52 +08:00
Max Edwards
7c69baf227 depends: pass verbose through to cmake based make
When running depends with V=1 this will now enable verbose output from makefiles generated by cmake.
2024-04-25 14:00:10 +01:00
hanmz
03e36b3da0 Fix typos in description.md and wallet_util.py
Signed-off-by: hanmz <hanmzarsenal@gmail.com>
2024-04-25 16:14:10 +08:00
Sebastian Falbesoner
ff79adbe05 remove unused templates from cpp-subprocess
The templates `is_ready`, `param_pack`, and `has_type` are not used
anywhere, so let's remove them.
2024-04-25 02:04:31 +02:00
Fabian Jahr
992c714451
common: Don't terminate on null character in UrlDecode
The previous behavior was the result of casting the result returned from the libevent function evhttp_uridecode to std:string but this was probably not intended.
2024-04-24 23:27:50 +02:00
Fabian Jahr
099fa57151
scripted-diff: Modernize name of urlDecode function and param
-BEGIN VERIFY SCRIPT-
sed -i 's/urlDecode/UrlDecode/g' $(git grep -l 'urlDecode' ./src)
sed -i 's/urlEncoded/url_encoded/g' $(git grep -l 'urlEncoded' ./src)
-END VERIFY SCRIPT-
2024-04-24 23:26:24 +02:00
Fabian Jahr
8f39aaae41
refactor: Remove hooking code for urlDecode
The point of this was to be able to build bitcoin-tx and bitcoin-wallet without libevent, see #18504.

Now that we use our own implementation of urlDecode this is not needed anymore.

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2024-04-24 23:23:38 +02:00
Fabian Jahr
650d43ec15
refactor: Replace libevent use in urlDecode with our own code 2024-04-24 23:23:34 +02:00
Fabian Jahr
46bc6c2aaa
test: Add unit tests for urlDecode
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
2024-04-24 22:21:06 +02:00
glozow
2a07c4662d
Merge bitcoin/bitcoin#29757: feefrac: avoid explicitly computing diagram; compare based on chunks
b22901dfa9 Avoid explicitly computing diagram; compare based on chunks (Pieter Wuille)

Pull request description:

  This merges the `BuildDiagramFromChunks` and `CompareFeeRateDiagram` introduced in #29242 into a single `CompareChunks` function, which operates on sorted chunk data rather than diagrams, instead computing the diagram on the fly.

  This avoids the need for the construction of an intermediary diagram object, and removes the slightly arbitrary "all diagrams must start at (0, 0)" requirement.

  Not a big deal, but I think the result is a bit cleaner and not really more complicated.

ACKs for top commit:
  glozow:
    reACK b22901d
  instagibbs:
    reACK b22901dfa9

Tree-SHA512: ca37bdf61d9a9cb5435f4da73e97ead33bf65828ad9af49b87336b1ece70db8ced1c21f517fc6eb6d616311c91f3da75ecae6b9bd42547133e3a3c5320b7816d
2024-04-24 16:51:56 +01:00
merge-script
50729c0609
Merge bitcoin/bitcoin#29910: refactor: Rename subprocess.hpp to follow our header name conventions
08f756bd37 Replace locale-dependent `std::strerror` with `SysErrorString` (Hennadii Stepanov)
d8e4ba4d05 refactor: Rename `subprocess.hpp` to follow our header name conventions (Hennadii Stepanov)

Pull request description:

  This PR renames the header `*.hpp` --> `*.h` and adjusts the header guard name, which makes it available for processing by linters.

  Fixed the following linter warning:
  ```
  The locale dependent function strerror(...) appears to be used:
  src/util/subprocess.h:    std::runtime_error( err_msg + ": " + std::strerror(err_code) )

  Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. Please avoid using locale-dependent functions if possible.

  Advice not applicable in this specific case? Add an exception by updating the ignore list in /bitcoin/test/lint/lint-locale-dependence.py
  ^---- failure generated from lint-locale-dependence.py
  ```

ACKs for top commit:
  TheCharlatan:
    ACK 08f756bd37

Tree-SHA512: 57a2f01c20eb9552481e428a4969bd59e9ada9f784fe1a45cb62aa9c9152c8e950d336854f45af0e2e5dc7c7b2a1fb216c8f832e3d6ccfb457ad71b6e423231e
2024-04-24 22:57:50 +08:00
merge-script
d822d4e849
Merge bitcoin/bitcoin#29837: ci: disable _FORTIFY_SOURCE with MSAN
08ff17d142 ci: disable _FORTIFY_SOURCE with MSAN (fanquake)

Pull request description:

  By undefining `_FORTIFY_SOURCE` we can drop`--disable-hardening`.

ACKs for top commit:
  maflcko:
    lgtm ACK 08ff17d142
  hernanmarino:
    utACK 08ff17d142 . Relevant CI test seems to be working OK.

Tree-SHA512: 948fd075aa648a7e34c37376fb913074ebc07d1c3cb0737d5fcbe7eac0b35c4152139773e4515ccb80f2d11b1ced6c6984da1757c2bcf8dd90e8ff6f664dae8e
2024-04-24 22:46:25 +08:00
Hennadii Stepanov
9381052194
doc: Bash is needed in gen_id and is not installed on FreeBSD by default 2024-04-24 15:40:14 +01:00
merge-script
427044afa3
Merge bitcoin/bitcoin#29585: contrib: list other binaries in manpage output
7c3ac598dd contrib: list other binaries in manpage output (fanquake)

Pull request description:

  Add a `SEE ALSO` section to the manpages.

  Master:
  ![master](https://github.com/bitcoin/bitcoin/assets/863730/da6f0151-e43a-4578-983d-4f2def80a8eb)

  This PR:
  ![pr](https://github.com/bitcoin/bitcoin/assets/863730/d57a1c9a-50c7-4f1a-834e-0f8af8520921)

  Should be enough to close #29558.

ACKs for top commit:
  jarolrod:
    tACK 7c3ac598dd
  willcl-ark:
    ACK 7c3ac598dd
  pablomartin4btc:
    utACK 7c3ac598dd
  laanwj:
    Code review ACK 7c3ac598dd

Tree-SHA512: 0df13ed5d736aa514a1192115728314fc676714f4cb9131f37b5d9a9bfc8f85f98c21b859d6b62745211f3de16b33ff60888e7f6a4eca66fc0c52442503f4336
2024-04-24 21:23:58 +08:00
merge-script
c143244ce3
Merge bitcoin/bitcoin#29853: sign: don't assume we are parsing a sane TapMiniscript
4d8d21320e sign: don't assume we are parsing a sane Miniscript (Antoine Poinsot)

Pull request description:

  The script provided for signature might be externally provided, for instance by way of 'finalizepsbt'. Therefore the script might be ill-crafted, so don't assume pubkeys are always 32 bytes.

  Thanks to Niklas for finding this.

  FIxes https://github.com/bitcoin/bitcoin/issues/29851.

ACKs for top commit:
  achow101:
    ACK 4d8d21320e
  furszy:
    ACK 4d8d21320e with a small nuance that could be tackled in a follow-up by someone else (or never).

Tree-SHA512: 29b7948b56e6dc05eac1014d684f2129ab1d19cb1e5d304216c826b7057c0e1d84ceb18731b91124b680e17d90e38de9f9a5526e4f6ecc3ea816881a6599bb47
2024-04-24 21:14:26 +08:00
merge-script
072b118407
Merge bitcoin/bitcoin#29932: doc: suggest only necessary Qt packages for installation on FreeBSD
dace02f99d doc: suggest only necessary Qt packages for installation on FreeBSD (Vasil Dimov)

Pull request description:

  The previously suggested `qt5` package is a meta package that does not
  install anything itself but depends on a bunch of others and is used as
  a convenience to install "everything" Qt5 related: 270 packages / 3 GiB.

  We only need a subset of those which amounts to 79 packages / 381 MiB,
  so suggest just that.

  For comparison:

  ```
  pkg install qt5
  Updating local repository catalogue...
  local repository is up to date.
  All repositories are up to date.
  Checking integrity... done (0 conflicting)
  The following 270 package(s) will be affected (of 0 checked):

  New packages to be INSTALLED:
  Imath: 3.1.11
  abseil: 20230125.3
  alsa-lib: 1.2.11
  alsa-plugins: 1.2.7.1_3
  aom: 3.8.2
  assimp: 5.4.0
  avahi-app: 0.8_2
  brotli: 1.1.0,1
  consolekit2: 1.2.6_3
  cups: 2.4.7_2
  curl: 8.7.1
  cyrus-sasl: 2.1.28_4
  dav1d: 1.4.1
  dbus: 1.14.10_5,1
  dbus-glib: 0.112_1
  dejavu: 2.37_3
  dotconf: 1.3_1
  double-conversion: 3.3.0
  duktape-lib: 2.7.0
  encodings: 1.1.0,1
  espeak-ng: 1.51.1_5
  expat: 2.6.2
  ffmpeg: 6.1.1_5,1
  fftw3: 3.3.10_5
  fftw3-float: 3.3.10_5
  flac: 1.4.3_1,1
  font-bh-ttf: 1.0.3_5
  font-misc-ethiopic: 1.0.4
  font-misc-meltho: 1.0.3_5
  fontconfig: 2.15.0_2,1
  freetds: 1.4.12,1
  freetype2: 2.13.2
  fribidi: 1.0.13_1
  gdbm: 1.23
  gdk-pixbuf2: 2.42.10_2
  gettext-runtime: 0.22.5
  giflib: 5.2.1_1
  glib: 2.80.0,2
  gmp: 6.3.0
  gnome_subr: 1.0
  gnutls: 3.8.5_1
  graphite2: 1.3.14
  groff: 1.23.0_3
  gstreamer1: 1.22.10
  gstreamer1-plugins: 1.22.10_1
  gstreamer1-plugins-bad: 1.22.10_2
  harfbuzz: 8.4.0
  hicolor-icon-theme: 0.17
  hidapi: 0.14.0
  highway: 1.1.0
  hunspell: 1.7.2_1
  icu: 74.2_1,1
  indexinfo: 0.3.1
  iso-codes: 4.15.0
  jasper: 4.2.3
  jbigkit: 2.1_2
  jpeg-turbo: 3.0.2
  jsoncpp: 1.9.5
  lame: 3.100_5
  lcms2: 2.16_1
  libICE: 1.1.0_2,1
  libSM: 1.2.3_1,1
  libX11: 1.8.9,1
  libXScrnSaver: 1.2.4_1
  libXau: 1.0.9_1
  libXcomposite: 0.4.6_1,1
  libXcursor: 1.2.2
  libXdamage: 1.1.6
  libXdmcp: 1.1.5
  libXext: 1.3.6,1
  libXfixes: 6.0.0_1
  libXi: 1.8_1,1
  libXmu: 1.1.4,1
  libXrandr: 1.5.2_1
  libXrender: 0.9.10_2
  libXt: 1.3.0,1
  libXtst: 1.2.3_3
  libXv: 1.0.12_1,1
  libass: 0.17.1_2
  libcbor: 0.11.0
  libcjson: 1.7.17
  libdaemon: 0.14_1
  libdeflate: 1.20
  libdrm: 2.4.120_1,1
  libedit: 3.1.20230828_1,1
  libepoll-shim: 0.0.20230411
  libevdev: 1.13.1
  libevent: 2.1.12
  libffi: 3.4.4_1
  libfido2: 1.14.0
  libfontenc: 1.1.8
  libgcrypt: 1.10.3_1
  libglvnd: 1.7.0
  libgpg-error: 1.48
  libgudev: 237
  libiconv: 1.17_1
  libidn2: 2.3.7
  libinput: 1.25.0
  libjxl: 0.10.2
  libltdl: 2.4.7
  liblz4: 1.9.4_1,1
  libmng: 2.0.3_1
  libmtdev: 1.1.6_1
  libmysofa: 1.3.2
  libnghttp2: 1.61.0
  libnice: 0.1.21_2
  libogg: 1.3.5,4
  libpaper: 1.1.28_1
  libpci: 3.12.0
  libpciaccess: 0.18
  libplacebo: 6.338.2
  libpsl: 0.21.5
  libsndfile: 1.2.2_1
  libsoxr: 0.1.3_3
  libssh2: 1.11.0_1,3
  libtasn1: 4.19.0_1
  libudev-devd: 0.5.2
  libunibreak: 6.1,1
  libunistring: 1.2
  libunwind: 20240221
  libv4l: 1.23.0_4
  libva: 2.21.0
  libvdpau: 1.5
  libvorbis: 1.3.7_2,3
  libvpx: 1.14.0
  libwacom: 1.5_1
  libx264: 0.164.3095
  libxcb: 1.17.0
  libxkbcommon: 1.6.0_2
  libxkbfile: 1.1.3
  libxml2: 2.11.7
  libxslt: 1.1.37_1
  llvm15: 15.0.7_10
  lua53: 5.3.6_1
  minizip: 1.2.11_1
  mkfontscale: 1.2.3
  mpdecimal: 4.0.0
  mpg123: 1.32.5
  mysql80-client: 8.0.35
  nettle: 3.9.1
  nspr: 4.35
  nss: 3.99
  openal-soft: 1.21.1_4
  openexr: 3.2.4
  openh264: 2.3.0,2
  openldap26-client: 2.6.7
  opus: 1.5.2
  orc: 0.4.36
  p11-kit: 0.25.3_2
  pcaudiolib: 1.2_1
  pciids: 20240331
  pcre2: 10.43
  perl5: 5.36.3_1
  png: 1.6.43
  polkit: 124_3
  postgresql15-client: 15.6
  psutils: 1.17_6
  pulseaudio: 16.1_4
  py39-evdev: 1.6.0
  py39-packaging: 24.0
  py39-pyudev: 0.22.0
  py39-setuptools: 63.1.0_1
  py39-six: 1.16.0
  python39: 3.9.18_2
  qt5: 5.15.13
  qt5-3d: 5.15.13p0
  qt5-assistant: 5.15.13p4
  qt5-buildtools: 5.15.13p142
  qt5-charts: 5.15.13p0
  qt5-concurrent: 5.15.13p142
  qt5-connectivity: 5.15.13p4
  qt5-core: 5.15.13p142
  qt5-datavis3d: 5.15.13p0
  qt5-dbus: 5.15.13p142
  qt5-declarative: 5.15.13p30
  qt5-declarative-test: 5.15.13p30
  qt5-designer: 5.15.13p4
  qt5-doc: 5.12.2
  qt5-examples: 5.15.13
  qt5-gamepad: 5.15.13p0
  qt5-graphicaleffects: 5.15.13p0
  qt5-gui: 5.15.13p142
  qt5-help: 5.15.13p4
  qt5-imageformats: 5.15.13p7
  qt5-l10n: 5.15.13p0
  qt5-linguist: 5.15.13p4
  qt5-linguisttools: 5.15.13p4
  qt5-location: 5.15.13p6
  qt5-multimedia: 5.15.13p2
  qt5-network: 5.15.13p142
  qt5-networkauth: 5.15.13p0
  qt5-opengl: 5.15.13p142
  qt5-pixeltool: 5.15.13p4
  qt5-printsupport: 5.15.13p142
  qt5-qdbus: 5.15.13p4
  qt5-qdbusviewer: 5.15.13p4
  qt5-qdoc: 5.15.13p4
  qt5-qdoc-data: 5.15.13
  qt5-qev: 5.15.13p4
  qt5-qmake: 5.15.13p142
  qt5-qtdiag: 5.15.13p4
  qt5-qtpaths: 5.15.13p4
  qt5-qtplugininfo: 5.15.13p4
  qt5-quick3d: 5.15.13p1
  qt5-quickcontrols: 5.15.13p0
  qt5-quickcontrols2: 5.15.13p5
  qt5-quicktimeline: 5.15.13p0
  qt5-remoteobjects: 5.15.13p0
  qt5-script: 5.15.16p0_2
  qt5-scripttools: 5.15.16p0_1
  qt5-scxml: 5.15.13p0
  qt5-sensors: 5.15.13p0
  qt5-serialbus: 5.15.13p0
  qt5-serialport: 5.15.13p0
  qt5-speech: 5.15.13p1
  qt5-sql: 5.15.13p142
  qt5-sqldrivers-mysql: 5.15.13p142
  qt5-sqldrivers-odbc: 5.15.13p142
  qt5-sqldrivers-pgsql: 5.15.13p142
  qt5-sqldrivers-sqlite2: 5.15.13p142
  qt5-sqldrivers-sqlite3: 5.15.13p142
  qt5-sqldrivers-tds: 5.15.13p142
  qt5-svg: 5.15.13p6
  qt5-testlib: 5.15.13p142
  qt5-uiplugin: 5.15.13p4
  qt5-uitools: 5.15.13p4
  qt5-virtualkeyboard: 5.15.13p0
  qt5-webchannel: 5.15.13p3
  qt5-webengine: 5.15.16.p9
  qt5-webglplugin: 5.15.13p0
  qt5-websockets: 5.15.13p2
  qt5-websockets-qml: 5.15.13p2
  qt5-webview: 5.15.13p0
  qt5-widgets: 5.15.13p142
  qt5-x11extras: 5.15.13p0
  qt5-xml: 5.15.13p142
  qt5-xmlpatterns: 5.15.13p0
  re2: 20240401
  readline: 8.2.10
  shaderc: 2024.0
  shared-mime-info: 2.2_2
  snappy: 1.2.0
  speech-dispatcher: 0.11.2_4
  speexdsp: 1.2.1
  sqlite: 2.8.17_5
  sqlite3: 3.45.1,1
  svt-av1: 2.0.0
  tiff: 4.4.0_3
  uchardet: 0.0.8_1
  unixODBC: 2.3.12_1
  vmaf: 3.0.0
  vulkan-headers: 1.3.283
  vulkan-loader: 1.3.283
  wayland: 1.22.0
  webp: 1.4.0
  webrtc-audio-processing0: 0.3.1_3
  x265: 3.5_1
  xcb-util: 0.4.1,1
  xcb-util-image: 0.4.1
  xcb-util-keysyms: 0.4.1
  xcb-util-renderutil: 0.3.10
  xcb-util-wm: 0.4.2
  xdg-utils: 1.1.3_4
  xkeyboard-config: 2.41_4
  xorg-fonts-truetype: 7.7_1
  xorgproto: 2023.2
  xprop: 1.2.7
  xset: 1.2.5_1
  xxhash: 0.8.2_1
  zstd: 1.5.6

  Number of packages to be installed: 270

  The process will require 3 GiB more space.

  Proceed with this action? [y/N]:
  ```

  ```
  pkg install qt5-buildtools qt5-core qt5-gui qt5-linguisttools qt5-testlib qt5-widgets
  Updating local repository catalogue...
  local repository is up to date.
  All repositories are up to date.
  Checking integrity... done (0 conflicting)
  The following 79 package(s) will be affected (of 0 checked):

  New packages to be INSTALLED:
  brotli: 1.1.0,1
  dbus: 1.14.10_5,1
  dejavu: 2.37_3
  double-conversion: 3.3.0
  encodings: 1.1.0,1
  expat: 2.6.2
  font-bh-ttf: 1.0.3_5
  font-misc-ethiopic: 1.0.4
  font-misc-meltho: 1.0.3_5
  fontconfig: 2.15.0_2,1
  freetype2: 2.13.2
  gettext-runtime: 0.22.5
  glib: 2.80.0,2
  graphite2: 1.3.14
  harfbuzz: 8.4.0
  hicolor-icon-theme: 0.17
  icu: 74.2_1,1
  indexinfo: 0.3.1
  jpeg-turbo: 3.0.2
  libICE: 1.1.0_2,1
  libSM: 1.2.3_1,1
  libX11: 1.8.9,1
  libXau: 1.0.9_1
  libXdmcp: 1.1.5
  libXext: 1.3.6,1
  libXfixes: 6.0.0_1
  libXi: 1.8_1,1
  libXmu: 1.1.4,1
  libXrender: 0.9.10_2
  libXt: 1.3.0,1
  libepoll-shim: 0.0.20230411
  libevdev: 1.13.1
  libffi: 3.4.4_1
  libfontenc: 1.1.8
  libglvnd: 1.7.0
  libgudev: 237
  libiconv: 1.17_1
  libinput: 1.25.0
  liblz4: 1.9.4_1,1
  libmtdev: 1.1.6_1
  libudev-devd: 0.5.2
  libwacom: 1.5_1
  libxcb: 1.17.0
  libxkbcommon: 1.6.0_2
  libxml2: 2.11.7
  mkfontscale: 1.2.3
  mpdecimal: 4.0.0
  pcre2: 10.43
  png: 1.6.43
  py39-evdev: 1.6.0
  py39-packaging: 24.0
  py39-pyudev: 0.22.0
  py39-setuptools: 63.1.0_1
  py39-six: 1.16.0
  python39: 3.9.18_2
  qt5-buildtools: 5.15.13p142
  qt5-core: 5.15.13p142
  qt5-dbus: 5.15.13p142
  qt5-gui: 5.15.13p142
  qt5-linguisttools: 5.15.13p4
  qt5-network: 5.15.13p142
  qt5-testlib: 5.15.13p142
  qt5-widgets: 5.15.13p142
  qt5-xml: 5.15.13p142
  readline: 8.2.10
  vulkan-headers: 1.3.283
  wayland: 1.22.0
  xcb-util: 0.4.1,1
  xcb-util-image: 0.4.1
  xcb-util-keysyms: 0.4.1
  xcb-util-renderutil: 0.3.10
  xcb-util-wm: 0.4.2
  xdg-utils: 1.1.3_4
  xkeyboard-config: 2.41_4
  xorg-fonts-truetype: 7.7_1
  xorgproto: 2023.2
  xprop: 1.2.7
  xset: 1.2.5_1
  zstd: 1.5.6

  Number of packages to be installed: 79

  The process will require 381 MiB more space.

  Proceed with this action? [y/N]:
  ```

ACKs for top commit:
  hebasto:
    re-ACK dace02f99d.

Tree-SHA512: 388fccb91ed677326592f5f73fa9ff7f341886a44b56364dfb1a683f29cd988e8751f64f645f200a01725086c789ebf9cabdaf412eb1cde742c8d7efc5165d94
2024-04-24 21:05:23 +08:00