Commit Graph

23104 Commits

Author SHA1 Message Date
PastaPastaPasta
4b4d60905a
Merge pull request #5143 from vijaydasmp/bp21_10
backport: Merge bitcoin#19237,19378,18422
2023-04-15 12:14:56 -05:00
MarcoFalke
a8c7d729a6 Merge #18422: [consensus] MOVEONLY: Move single-sig checking EvalScript code to EvalChecksig
14e8cf974a7a317796ef8e97e5cf9c355ceff0ee [consensus] MOVEONLY: Move single-sig checking EvalScript code to EvalChecksig (Pieter Wuille)

Pull request description:

  This is another small refactor pulled out of the Schnorr/Taproot PR #17977.

  This is in preparation for adding different signature verification rules,
  specifically tapscript (BIP 342), which interprets opcode 0xac and 0xad
  as Schnorr signature verifications.

ACKs for top commit:
  sipa:
    ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, verified move-only.
  MarcoFalke:
    ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, reviewed with "git show 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space -W" 👆
  fjahr:
    Code-review ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, verified that it's move-only.
  instagibbs:
    code review ACK 14e8cf974a, verified move-only
  theStack:
    Code-Review ACK 14e8cf974a
  jonatack:
    ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee

Tree-SHA512: af2efce9ae39d5ec01db5b9ef0ff383fe252ef5f33b3483927308ae17d91a619266cb45951f32ea1ce54807a4c0f052bcdefb47e244465d3a726393221c227b1
2023-04-15 12:14:35 -05:00
MarcoFalke
20fb6158a5 Merge #19378: refactor: Use Mutex type for g_cs_recent_confirmed_transactions
13076867981ab36b3549ab4c29583ae8ed12a709 refactor: Use Mutex type for g_cs_recent_confirmed_transactions (Hennadii Stepanov)

Pull request description:

  No need the `RecursiveMutex` type for the `g_cs_recent_confirmed_transactions`.

  Related to #19303.

ACKs for top commit:
  MarcoFalke:
    ACK 13076867981ab36b3549ab4c29583ae8ed12a709
  vasild:
    ACK 13076867

Tree-SHA512: 67f1be10c80ec18d0f80b9f5036e5a20986314da9b9364ef4e193ad1d9f3f4c8e4c2e16253ca79d649ff602d5b8c2aff58d7dd1085841afb760479a4875cffbe
2023-04-15 12:14:35 -05:00
MarcoFalke
00a277f981 Merge #19237: wallet: Check size after unserializing a pubkey
37ae687f95c82f2d64ed880533d158060d4fc3de Add tests for CPubKey serialization/unserialization (Elichai Turkel)
9b8907faded8e4ec312c0dd4b4b15e1793876acd Check size after Unserializing CPubKey (Elichai Turkel)

Pull request description:

  Found by practicalswift, closes #19235
  Currently all the public API(except the pointer-like API) in CPubKey that sets/constructs a pubkey goes through `CPubKey::Set` which checks if that the length and size match and if not invalidates the key.

  This adds the same check to `CPubKey::Unserialize`, sadly I don't see an easy way to just push this to the existing checks in `CPubKey::Set` but it's only a simple condition.

  The problem with not invalidating is that if you write a pubkey like: `{0x02,0x00}` it will think the actual length is 33(because of `size()`) and will access uninitialized memory if you call any of the functions on CPubKey.

ACKs for top commit:
  practicalswift:
    re-ACK 37ae687f95c82f2d64ed880533d158060d4fc3de
  jonatack:
    Code review re-ACK 37ae687 per `git diff eab8ee3 37ae687` only change since last review at eab8ee3 is passing the `pubkey` param by reference to const instead of by value in `src/test/key_tests.cpp::CmpSerializationPubkey`
  MarcoFalke:
    ACK 37ae687f95c82f2d64ed880533d158060d4fc3de

Tree-SHA512: 30173755555dfc76d6263fb6a59f41be36049ffae7b4e1b92b922d668f5e5e2331f7374d5fa10d5d59fc53020d2966156905ffcfa8b8129c1f6d0ca062174ff1
2023-04-15 12:14:35 -05:00
PastaPastaPasta
cedfb960b8
Merge pull request #5285 from knst/guix-dashification
feat: guix to replace gitian and its dashification
2023-04-15 12:13:46 -05:00
Konstantin Akimov
46a5cd4b59 fix: extra edits of guix's README.md 2023-04-15 12:13:27 -05:00
fanquake
8f70c136bc Merge bitcoin/bitcoin#22654: guix: Don't include directory name in SHA256SUMS
132cae44f2d031bdaa1e459b92ec89ad585dfc9f doc: Mention the flat directory structure for uploads (Andrew Chow)
fb17c99e35e72f3b21ec3b5473e84c21dc964776 guix: Don't include directory name in SHA256SUMS (Andrew Chow)

Pull request description:

  The SHA256SUMS file can be used in a sha256sum -c command to verify downloaded binaries. However users are likely to download just a single file and not place this file in the correct directory relative to the SHA256SUMS file for the simple verification command to work. By not including the directory name in the SHA256SUMS file, it will be easier for users to verify downloaded binaries.

ACKs for top commit:
  Zero-1729:
    re-ACK 132cae44f2d031bdaa1e459b92ec89ad585dfc9f
  fanquake:
    ACK 132cae44f2d031bdaa1e459b92ec89ad585dfc9f

Tree-SHA512: c9ff416b8dfb2f3ceaf4d63afb84aac9fcaefbbf9092f9e095061b472884ec92c7a809e6530c7132a82cfe3ab115a7328e47994a412072e1d4feb26fc502c8c5
2023-04-15 12:13:27 -05:00
fanquake
2f09a04d44 Merge bitcoin/bitcoin#22642: release: Release with separate SHA256SUMS and sig files
90b3e482e911fde73133a157c3b354471682275a release: Release with separate SHA256SUMS and sig files (Carl Dong)

Pull request description:

  This allows us to:
  - remove the rfc4880 EOL hacks, and
  - release with a SHA256SUMS.asc file that's a combination of all signer signatures

ACKs for top commit:
  achow101:
    ACK 90b3e482e911fde73133a157c3b354471682275a
  laanwj:
    Concept and code review ACK 90b3e482e911fde73133a157c3b354471682275a

Tree-SHA512: 5d5086063d303aa0cbd590e5fdf2ae8f555e25f4e43bf67545e33384449b990e94834c711622530ad0eb3dcc83f52746884a5081dadb0acff8dd799cfadafac7
2023-04-15 12:13:27 -05:00
fanquake
e82c9ad35a Merge bitcoin/bitcoin#22511: guix: Silence getent(1) invocation, doc fixups
a884a1edcd1b795799f1be65df17462041741dc3 guix/INSTALL: Misc fixups (Carl Dong)
3c4d2c418e62d421a8bd7640ef5384251c892406 guix: Silence getent(1) invocation (Carl Dong)

Pull request description:

  Otherwise the `getent(1)` checks will print out the default http, https, and ftp ports, making it seem like something is being spawned that is listening on those ports, which is not the case.

ACKs for top commit:
  fanquake:
    ACK a884a1edcd1b795799f1be65df17462041741dc3

Tree-SHA512: 7706a98fe5f2bcd766fd3a16bfffab899ec45e80d72c485b7bed2a83d2024eddbb44ae4a77e2352e308740ca203c163421a11a5a2327fa94d2032ecceef4d63f
2023-04-15 12:13:27 -05:00
Konstantin Akimov
559190fb27 docs: dashification of guix 2023-04-15 12:13:27 -05:00
Konstantin Akimov
31da303569 docs: dashification guix/README.md 2023-04-15 12:13:27 -05:00
Konstantin Akimov
f9508cb532 docs: dashification guix/INSTALL.md and added Dockerfile for guix
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2023-04-15 12:13:27 -05:00
fanquake
f54ec9cde7 Merge bitcoin/bitcoin#21711: guix: Add full installation and usage documentation
fac4814106c796b8786dd90053513cc35142dfe5 doc/release-process: Add torrent creation details (Carl Dong)
5d24cc3d82dad6812f8370c3ccc7c2b5a6c12c11 guix/INSTALL: Guix installs init scripts in libdir (Carl Dong)
5da2ee49d5b44de803b671aedbdd14e5c1d71ea9 guix/INSTALL: Add coreutils/inotify-dir-recreate troubleshooting (Carl Dong)
318c60700b7bbb7ec09a29bf037e7c2787646be6 guix: Adapt release-process.md to new Guix process (Carl Dong)
fcab35b2292f9221eaba521740e8b3b2511a8b78 guix-attest: Produce and sign normalized documents (Carl Dong)
c2541fd0ca99481a5a792a8f2772925d64fb0491 guix: Overhaul README (Carl Dong)
46ce6ce3782dfbd8f9d26dc2ba0f284755e75f2d tree-wide: Rename gitian-keys to builder-keys (Carl Dong)
fc4f8449f34e32b0b9ac9d218d6c3264b02467ba guix: Update various check_tools lists (Carl Dong)
263220a85c1df218431fafbda07c8b23ccc4ce4d guix: Check for a sane services database (Carl Dong)

Pull request description:

  Based on: #21462

  Keeping the README in one file so that it's easy to search through. Will add more jumping links later so navigation is easier.

  Current TODOs:
  - [x] Shell installer option: prompt user to re-login for `/etc/profile.d` entry to be picked up
  - [x] Binary tarball option: prompt user to create `/etc/profile.d` entry and re-login
  - [x] Fanquake docker option: complete section
  - [x] Arch Linux AUR option: prompt to start `guix-daemon-latest` unit after finishing "optional setup" section
  - [x] Building from source option: Insert dependency tree diagram that I made
  - [x] Building from source option: redo sectioning, kind of a mess right now
  - [x] Optional setup: make clear which parts are only needed if building from source
  - [x] Workaround 1 for GnuTLS: perhaps mention how to remove Guix build farm's key
  - [x] Overall (after everything): Make the links work.

  Note to self: wherever possible, tell user how to check that something is true rather than branching by installation option.

ACKs for top commit:
  fanquake:
    ACK fac4814106c796b8786dd90053513cc35142dfe5 - going to go ahead and merge this now. It's a lot of documentation, and could probably be nit-picked / improved further, however, that can continue over the next few weeks. I'm sure more (backportable) improvements / clarifications will be made while we progress through RCs towards a new release.

Tree-SHA512: dc46c0ecdfc67c7c7743ca26e4a603eb3f54adbf81be2f4c1f4c20577ebb84b5250b9c9ec89c0e9860337ab1c7cff94d7963c603287267deecfe1cd987fa070a
2023-04-15 12:13:27 -05:00
PastaPastaPasta
5b027e6611
Merge pull request #5246 from kittywhiskers/auxports9
backport: merge bitcoin#21523, #17954, #17905, #17993, #19132, #20494, #19425, #17513, bitcoin-gui#8, partial bitcoin#17938, #18587 (auxiliary backports: part 9)
2023-04-15 12:13:00 -05:00
Kittywhiskers Van Gogh
be54c1a04b test: fix test affected by "Allow LegacyScriptPubKeyMan to be null" 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
0fe2c99e78 merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
320b4b69ab merge bitcoin#19425: Get rid of more redundant chain methods 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
3417be57c7 merge bitcoin#20494: Move node and wallet code out of src/interfaces 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
ab1da2f827 qt: source TransactionTable block height from wallet interface 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
76d870bcd8 merge bitcoin-gui#8: Fix regression in TransactionTableModel 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
3b08a1c49a partial bitcoin#18587: Avoid wallet tryGetBalances calls in WalletModel::pollBalanceChanged
contains:
- 2bc9b92ed8b7736ad67876398a0bb8287f57e9b3
- bf0a510981ddc28c754881ca21c50ab18e5f2b59
2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
4df5b1c637 merge bitcoin#19132: lock cs_main, m_cached_tip_mutex in that order 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
aef3dd7350 merge bitcoin#17993: Balance/TxStatus polling update based on last block hash 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
091eda40c9 merge bitcoin#17905: Avoid redundant tx status updates 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
a262bb888b merge bitcoin#17954: Remove calls to Chain::Lock methods 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
459589552b merge bitcoin#21523: run VerifyDB on all chainstates 2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
00802bb21d partial bitcoin#17938: Disallow automatic conversion between disparate hash types
includes:
- 0a5ea32ce605984094c5552877cb99bc81654f2c
- 3fcc46812334074d2c77a6233e8a961cd0785872
- 2c54217f913967703b404747133be67cf2f4feac
- 966a22d859db37b1775e2180e5be032fc4fdf483
- 4d7369125a82214ea42b808a32b71b315a5c3c72
2023-04-15 12:12:30 -05:00
Kittywhiskers Van Gogh
8d5ae627b8 uint256: add definition for constant 'ZERO' 2023-04-15 12:12:30 -05:00
PastaPastaPasta
49e998f8ae
Merge pull request #5310 from PastaPastaPasta/develop-trivial-2023-04-09
backport: trivial backports 2023 04 09
2023-04-15 12:11:15 -05:00
Samuel Dobson
dc1f37e51a
Merge bitcoin/bitcoin#21907: wallet: Do not iterate a directory if having an error while accessing it
29c9e2c2d2015ade47ed4497926363dea3f9c59b wallet: Do not iterate a directory if having an error while accessing it (Hennadii Stepanov)

Pull request description:

  On Windows when `ListDatabases` tries to iterate any system folder, e.g., "System Volume Information", it falls into an infinite loop.

  This PR fixes this bug. Now the `debug.log` contains:
  ```
  2021-05-12T09:07:53Z ListDatabases: Access is denied D:/System Volume Information -- skipping.
  ```

  An easy way to reproduce the bug and test this PR is to pass the `-walletdir=D:\` command-line option, and run the `listwalletdir` RPC, or File -> Open Wallet in the GUI menu.

  Fixes #20081.
  Fixes #21136.
  Fixes #21904.

  Also https://bitcoin.stackexchange.com/questions/99243/listwalletdir-access-is-denied-d-system-volume-information

ACKs for top commit:
  prayank23:
    ACK 29c9e2c2d2
  promag:
    Code review ACK 29c9e2c2d2015ade47ed4497926363dea3f9c59b.
  meshcollider:
    Code review ACK 29c9e2c2d2015ade47ed4497926363dea3f9c59b

Tree-SHA512: b851c88e6d09626f4cb81acc2fa59a563b2aee64582963285715bf785c64b872e8bf738aa6b27bdbaf4c3e5c8565c2dc2c802135f9aa1f48b4b913435bc5d793
2023-04-14 23:34:14 -05:00
W. J. van der Laan
6ed514647f
Merge bitcoin/bitcoin#21905: net: initialize nMessageSize to uint32_t max
9c891b64ffd14bc8216dbd5eb60816043af265b6 net: initialize nMessageSize to max uint32_t instead of -1 (eugene)

Pull request description:

  nMessageSize is uint32_t and is set to -1. This will warn with `-fsanitize=implicit-integer-sign-change` when V1TransportDeserializer calls into the ctor.  This pull initializes nMessageSize to `numeric_limits<uint32_t>::max()` instead and removes the ubsan suppression.

ACKs for top commit:
  laanwj:
    Code review ACK 9c891b64ffd14bc8216dbd5eb60816043af265b6
  promag:
    Code review ACK 9c891b64ffd14bc8216dbd5eb60816043af265b6.

Tree-SHA512: f05173d9553a01d207a5a7f8ff113d9e11354c50b494a67d44d3931c151581599a9da4e28f40edd113f4698ea9115e6092b2a5b7329c841426726772076c1493
2023-04-14 23:34:14 -05:00
MarcoFalke
2fb77743ba
Merge bitcoin/bitcoin#21909: fuzz: Limit max insertions in timedata fuzz test
fa95555a491dc01952703f476836e607ac34eab4 fuzz: Limit max insertions in timedata fuzz test (MarcoFalke)

Pull request description:

  It is debatable whether a size of the median filter other than `200` (the only size used in production) should be fuzzed. For now add a minimal patch to cap the max insertions. Otherwise the complexity is N^2 log(N), where N is the size of the fuzz input.

  Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34167

ACKs for top commit:
  practicalswift:
    cr ACK fa95555a491dc01952703f476836e607ac34eab4: patch looks correct

Tree-SHA512: be7737e9f4c906053e355641de84dde31fed37ed6be4c5e92e602ca7675dffdaf06b7063b9235ef541b05d3d5fd689c99479317473bb15cb5271b8baabffd0f2
2023-04-14 23:34:14 -05:00
W. J. van der Laan
cfaad8450a
Merge bitcoin/bitcoin#21891: fuzz: Remove strprintf test cases that are known to fail
facfc0f65dd0a7d54c0f6d56bff793e57b12ee12 fuzz: Remove strprintf test cases that are known to fail (MarcoFalke)

Pull request description:

  They are still waiting to be fixed (see https://github.com/c42f/tinyformat/issues/70 ), so no need for us to carry them around in our source code. They can be added back once upstream is fixed.

  Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34082

ACKs for top commit:
  laanwj:
    Code review ACK facfc0f65dd0a7d54c0f6d56bff793e57b12ee12

Tree-SHA512: d9d3d35555b6d58740a041ae45797ca85149f60990e2ed632c5dadf363e1d2362d2447681d7ceaa1fbffcd6e7bc8da5bc15d3923b68829a86c25b364a599afc8
2023-04-14 23:34:14 -05:00
W. J. van der Laan
641dc6623a
Merge bitcoin/bitcoin#21427: depends: Fix id_string invocations
fa872c9af397837bb17859b5f43adec71239682a depends: Fix id_string invocations (Carl Dong)

Pull request description:

  Closes: #21242

  ```
  Reproduced from depends/Makefile comment:

  When invoking a shell, GNU Make special-cases exit code 127 (command not
  found) by not capturing the output but instead passing it through. This
  is not done for any other exit code.

  Therefore, we require a "|| true" to avoid this behaviour when in an
  environment where the build_* or host_* may not exist yet.
  ```

ACKs for top commit:
  laanwj:
    Concept and light code review ACK fa872c9af397837bb17859b5f43adec71239682a

Tree-SHA512: 9ce88381aec579d956572cf70c4f69dc5a3873f0d2af14a71cf24814192a89452b8280258bed8cca804e4bd2644db056d213ab733df46a10560a47079524d8ac
2023-04-14 23:34:14 -05:00
MarcoFalke
346ae84acf
Merge bitcoin/bitcoin#18847: compressor: use a prevector in CompressScript serialization [ZAP1]
83a425d25af033086744c1c8c892015014ed46bd compressor: use a prevector in compressed script serialization (William Casarin)

Pull request description:

  This function was doing millions of unnecessary heap allocations during IBD.

  I'm start to catalog unnecessary heap allocations as a pet project of mine: as-zero-as-possible-alloc IBD. This is one small step.

  before:
  ![May01-174536](https://user-images.githubusercontent.com/45598/80850964-9a38de80-8bd3-11ea-8eec-08cd38ee1fa1.png)

  after:
  ![May01-174610](https://user-images.githubusercontent.com/45598/80850974-a91f9100-8bd3-11ea-94a1-e2077391f6f4.png)

  ~should I type alias this?~ *I type aliased it*

  This is a part of the Zero Allocations Project #18849 (ZAP1). This code came up as a place where many allocations occur.

ACKs for top commit:
  Empact:
    ACK 83a425d25a
  elichai:
    tACK 83a425d25af033086744c1c8c892015014ed46bd
  sipa:
    utACK 83a425d25af033086744c1c8c892015014ed46bd

Tree-SHA512: f0ffa6ab0ea1632715b0b76362753f9f6935f05cdcc80d85566774401155a3c57ad45a687942a1806d3503858f0bb698da9243746c8e2edb8fdf13611235b0e0
2023-04-14 23:34:13 -05:00
MarcoFalke
dd80977ebb
Merge #21516: remove unnecessary newline from initWarning() argument
804ac106313eb52d3a86f42c681b42acf90974c8 remove unnecessary newline from initWarning() argument (Larry Ruane)

Pull request description:

  Run: `src/bitcoind -wallet=nosuchfile`

  Without this patch, `debug.log` contains:
  ```
  2021-03-23T21:19:16Z init message: Verifying wallet(s)...
  2021-03-23T21:19:16Z Warning: Skipping -wallet path that doesn't exist. Failed to load database path '/home/larry/.bitcoin/wallets/nosuchfile'. Path does not exist.

  2021-03-23T21:19:16Z init message: Loading banlist...
  ```
  With this patch, the empty line isn't present. This PR fixes a similar problem with `src/bitcoind -conf=nosuchfile`

ACKs for top commit:
  practicalswift:
    cr ACK 804ac106313eb52d3a86f42c681b42acf90974c8: patch looks correct!
  jarolrod:
    tACK 804ac106313eb52d3a86f42c681b42acf90974c8, nice catch!
  theStack:
    Code-review ACK 804ac106313eb52d3a86f42c681b42acf90974c8

Tree-SHA512: dfcbaaa72ca24ac40233ac56840cfba8827853711d3df6e229ce940686f2ebf8bf0560bafcaa73a4d82d179a5050af0d3cabdc47b3b1dfd6aaadf718a6635f11
2023-04-14 23:34:13 -05:00
MarcoFalke
d5e63ce249
Merge #21498: refactor: return std::nullopt instead of {}
5294f0d5a94cc7beaf692131fba0cad8beec9f13 refactor: return std::nullopt instead of {} (fanquake)

Pull request description:

  In #21415 [we decided](https://github.com/bitcoin/bitcoin/pull/21415#issuecomment-800236640) to return `std::optional` rather than `{}` for
  uninitialized values. This PR replaces the two remaining usages of `{}`
  with `std::nullopt`.

  As a side-effect, this also quells the spurious GCC 10.2.x warning that
  we've had reported quite a few times. i.e #21318, #21248, #20797.

  ```bash
  txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
  txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    898 |     return {};
        |             ^
  ```

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

Tree-SHA512: 5b776be79ab26e5a3a5fc2b463b394ea5ce6797ed5558424873fa4ecee2898170eff76d6da9d69394d28f8f98974117fc63b922a3e19c52f5294c83073e79bb0
2023-04-14 23:34:13 -05:00
fanquake
3ef6d5e835
Merge #21491: test: remove duplicate assertions in util_tests
7e3444805ed747db819d7bf630feafc31783e5de test: remove duplicate assertions in util_tests (Jon Atack)

Pull request description:

  as noticed by Kiminuo in https://github.com/bitcoin/bitcoin/pull/21488#discussion_r598247676

ACKs for top commit:
  practicalswift:
    cr ACK 7e3444805ed747db819d7bf630feafc31783e5de: patch looks correct
  vasild:
    ACK 7e3444805ed747db819d7bf630feafc31783e5de

Tree-SHA512: ad3d5983ad3a665155d766843dfda7178ced47e82154838331e428ed0828a467c1cf4bf99270aaf191e94156d485fafd0a7d5bc68248c4c1304a00ca5a2a9d2e
2023-04-14 23:34:13 -05:00
MarcoFalke
518582f375
Merge #21488: test: add ParseUInt16() unit test and fuzz coverage
3d086f42ab58f0f5984101d5285d5a707e3dc8e7 test: add ParseUInt16() test coverage (Jon Atack)

Pull request description:

  `ParseUInt16()` was just added in #21328.

ACKs for top commit:
  practicalswift:
    cr ACK 3d086f42ab58f0f5984101d5285d5a707e3dc8e7: patch looks correct & more coverage is better than less coverage

Tree-SHA512: bf7f96deb7c1531419565907f0ea8a8e32b368d4b823a3e80928b2c118edbf643ea06e357b4b5504a89f855caeed289daa9f823c740231ed6ad1b8ed00285ce8
2023-04-14 23:34:12 -05:00
MarcoFalke
5371147ea7
Merge #21040: wallet: Fix already-loading message grammar
ae9d26a8f0435e2f4b39ad1181473e6575ac67b5 wallet: Fix already-loading error message grammar (Fotis Koutoupas)

Pull request description:

ACKs for top commit:
  practicalswift:
    cr ACK ae9d26a8f0435e2f4b39ad1181473e6575ac67b5
  prayank23:
    ACK ae9d26a8f0

Tree-SHA512: 2f58d309dd33954f47e3ed339887b11bfdad4519f89ed3dd9bf3fb0db246d78b89653d553d02350ec84ce68bbb904db9fac00a2aad8d37f48df694d6782f35df
2023-04-14 23:34:12 -05:00
MarcoFalke
6e6f7c5994
Merge #18335: bitcoin-cli: print useful error if bitcoind rpc work queue exceeded
8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a add functional test (Larry Ruane)
b5a80fa7e487c37b7ac0e3874a2fabade41b9ca8 util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli (Hennadii Stepanov)

Pull request description:

  If `bitcoind` is processing 16 RPC requests, attempting to submit another request using `bitcoin-cli` produces this less-than-helpful error message: `error: couldn't parse reply from server`. This PR changes the error to: `error: server response: Work queue depth exceeded`.

ACKs for top commit:
  fjahr:
    tACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a
  luke-jr:
    utACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a (no changes since previous utACK)
  hebasto:
    re-ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/18335#pullrequestreview-460621350) review.
  darosior:
    ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a

Tree-SHA512: 33e25f6ff05d9b56fae2bdb68b132557bb8e995f5438ac4fbbc53c304c5152a98aa43c43600c31d8a6a2830cbd48bf8ec7d89dce50190b29ec00a43830126913
2023-04-14 23:34:12 -05:00
MarcoFalke
249d8a85d4
Merge #21371: fuzz: fix gcc Woverloaded-virtual build warnings
36aa2955b816c666f1c27cf6f3d43c75444fab48 fuzz: fix gcc Woverloaded-virtual build warnings (Jon Atack)

Pull request description:

  Possible fixup to gcc build warnings since merge of b22d4c1607b. Closes #21369.

ACKs for top commit:
  practicalswift:
    cr ACK 36aa2955b816c666f1c27cf6f3d43c75444fab48: patch looks correct
  achow101:
    ACK 36aa2955b816c666f1c27cf6f3d43c75444fab48
  kristapsk:
    ACK 36aa2955b816c666f1c27cf6f3d43c75444fab48, this fixes compiler warnings for me with GCC 9.3.0.

Tree-SHA512: b6c99690ff72b809ce8105696744546252691b618f54311a9d930d9975fc692071ef408450f618fbb4aa99ee5390028a6eabbc968e22b2e8d2bd56bbafef49f8
2023-04-14 23:34:12 -05:00
fanquake
62b47ddf26
Merge #21364: fuzz: Avoid -Wreturn-type warnings
3f3646855c4005670909c8e76de91ad07c559c66 fuzz: Avoid -Wreturn-type warnings (practicalswift)

Pull request description:

  Avoid `-Wreturn-type` warnings.

  Closes #21355.

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

Tree-SHA512: 6fa2640a26e64d2bea60e016ad14b5c434137fedc0b3bf2ac244f02f9b1cd303d1ebac4ac4e6791534560f8311c4cbe9395c2ce94d7ec022d3b192f1ea070809
2023-04-14 23:34:11 -05:00
fanquake
474dd760e1
Merge #21333: build: set Unicode true for NSIS installer
9086e0dd3c924b6c9a5ad05799d30d97b9ced3be build: set Unicode true for NSIS installer (fanquake)

Pull request description:

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

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

  Should close: #13817

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

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

Tree-SHA512: cc7b7ca05877571d0a29a7d36e40279f54d886d8ab27facfa722c2ee95a1fc06c2bad8ef1eb1980d283ae981659d737021a46c8f4618e24d510b5ab384990e09
2023-04-14 23:34:11 -05:00
UdjinM6
33f490e615
fix(tests): Fix retries for the non-deterministic test suite (#5307)
## Issue being fixed or feature implemented
the problem with retries implemented in #4793 is that they don't really
do anything besides fetching results of a failed job multiple times 🙈

## What was done?
partially reverted changes done in #4793, implemented actual job
restart. dropped `--sleep` and `--retries` and added `--attempts`
instead.

## How Has This Been Tested?
Pick any test, add some randomly failing expression somewhere and run it
with some high number of retries.

For example:
```diff
diff --git a/test/functional/feature_dip0020_activation.py b/test/functional/feature_dip0020_activation.py
index 471e4fdc66..b56a954b78 100755
--- a/test/functional/feature_dip0020_activation.py
+++ b/test/functional/feature_dip0020_activation.py
@@ -69,6 +69,7 @@ class DIP0020ActivationTest(BitcoinTestFramework):
         # Should be spendable now
         tx0id = self.node.sendrawtransaction(tx0_hex)
         assert tx0id in set(self.node.getrawmempool())
+        assert int(tx0id[0], 16) < 4
 
 
 if __name__ == '__main__':
```

On develop:
```
./test/functional/test_runner.py feature_dip0020_activation.py --retries=100 --sleep=0
```
if this fails on the first run, it keeps "failing" (simply fetching the
same results actually) till the end.

With this patch:
```
./test/functional/test_runner.py feature_dip0020_activation.py --attempts=100
```
if this fails on the first run, it can actually succeed after a few
attempts now, unless you are extremely unlucky ofc 😄

Also, check [ci results in my repo
](https://cdn.artifacts.gitlab-static.net/93/b4/93b4f8b17e5dcccab1afee165b4d74d90f05800caf65d6c48a83a1a78c979587/2023_04_08/4081291268/4478867166/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1680945516&KeyName=gprd-artifacts-cdn&Signature=2d4mHCJBbgRaTDiSQ6kKIy1PdIM=).

Note:
```
...
feature_dip3_v19.py failed at attempt 1/3, Duration: 159s
...
4/179 - feature_dip3_v19.py passed, Duration: 244 s
...
feature_llmq_hpmn.py failed at attempt 1/3, Duration: 284s
...
feature_llmq_hpmn.py failed at attempt 2/3, Duration: 296s
...
11/179 - feature_llmq_hpmn.py failed, Duration: 233 s
...
```

An example with 2 tests failing initially and then passing:
https://gitlab.com/dashpay/dash/-/jobs/4089689970

## Breaking Changes
n/a


## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-04-14 23:13:47 -05:00
Odysseas Gabrielides
9aa886cd4d
feat!: v20 BIP9 fork (#5121)
## Issue being fixed or feature implemented


## What was done?
Added v20 BIP9 style fork structure along with utility functions. 
Since several features coming depending on that fork status, we needed
to group them into one

## How Has This Been Tested?


## Breaking Changes


## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-04-14 17:01:46 -05:00
PastaPastaPasta
a80c251af6
chore: bump version to v20.0.0 (#5215) 2023-04-14 17:01:04 -05:00
UdjinM6
f4eaf5a782
fix(ci): skip more jobs in "FAST_MODE" (#5311)
## Issue being fixed or feature implemented
CI should not be running that many jobs in "FAST_MODE"
https://github.com/dashpay/dash/blob/develop/.gitlab-ci.yml#L5

## What was done?
assign `.skip-in-fast-mode-template` template to more jobs

## How Has This Been Tested?
ran CI in my repo
before: https://gitlab.com/UdjinM6/dash/-/pipelines/832175740
after: https://gitlab.com/UdjinM6/dash/-/pipelines/832176325

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [ ] I have assigned this pull request to a milestone
2023-04-14 16:56:40 -05:00
PastaPastaPasta
4ab5b340ec
ci: add ci for merging into master (#5316)
## Issue being fixed or feature implemented
This adds a check that ensures branches merge cleanly into master via a
ff-only

## What was done?
Added a GitHub action created via gpt-4 :)

## How Has This Been Tested?

https://github.com/PastaPastaPasta/dash/actions/runs/4703432752/jobs/8341923994
and
https://github.com/PastaPastaPasta/dash/actions/runs/4703457936/jobs/8341980146
for expected pass and expected fail

## Breaking Changes
None, should be back ported to v19.x branch when we get the chance.

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-04-14 16:53:07 -05:00
UdjinM6
fc43fd1cdd
Merge pull request #5317 from PastaPastaPasta/merge-master-to-develop
chore: merge master into develop
2023-04-14 23:31:29 +03:00