Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: bitcoin#12134, #18426, #18534, #18828, #18864, #19153, #19201, #19205, #19560, #19813, #19859, partial #20354, #20955, #22442, #22790 #5537

Merged
merged 23 commits into from
Sep 19, 2023

Commits on Sep 19, 2023

  1. Merge bitcoin#12134: Build previous releases and run functional tests

    c456145 [test] add 0.19 backwards compatibility tests (Sjors Provoost)
    b769cd1 [test] add v0.17.1 wallet upgrade test (Sjors Provoost)
    9d9390d [tests] add wallet backwards compatility tests (Sjors Provoost)
    c7ca630 [scripts] support release candidates of earlier releases (Sjors Provoost)
    8b1460d [tests] check v0.17.1 and v0.18.1 backwards compatibility (Sjors Provoost)
    ae379cf [scripts] build earlier releases (Sjors Provoost)
    
    Pull request description:
    
      This PR adds binaries for 0.17, 0.18 and 0.19 to Travis and runs a basic block propagation test.
    
      Includes test for upgrading v0.17.1 wallets and opening master wallets with older versions.
    
      Usage:
    
      ```sh
      contrib/devtools/previous_release.sh -f -b v0.19.0.1 v0.18.1 v0.17.1
      test/functional/backwards_compatibility.py
      ```
    
      Travis caches these earlier releases, so it should be able to run these tests with little performance impact.
    
      Additional scenarios where it might be useful to run tests against earlier releases:
    
      * creating a wallet with bitcoin#11403's segwit implementation, copying it to an older node and making sure the user didn't lose any funds (although this PR doesn't support `v0.15.1`)
      * future consensus changes
      * P2P changes (e.g. to make sure we don't accidentally ban old nodes)
    
    ACKs for top commit:
      MarcoFalke:
        ACK c456145 🔨
    
    Tree-SHA512: 360bd870603f95b14dc0cd629532cc147344f632b808617c18e1b585dfb1f082b401e5d493a48196b719e0aeaee533ae0a773dfc9f217f704aae898576c19232
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    207b1c5 View commit details
    Browse the repository at this point in the history
  2. Merge bitcoin#18426: scripts: previous_release: improve behaviour on …

    …failed download
    
    332f373 [scripts] previous_release: improve failed download error message (Sebastian Falbesoner)
    
    Pull request description:
    
      Currently, if the earlier release build/fetch script `previous_release.sh` is invoked with the option `-b` (intending to fetch a binary package from `https://bitcoin.org`) and the download fails, the user sees the following confusing output:
      ```
      $ contrib/devtools/previous_release.sh -r -b v0.9.5
      [...]
      gzip: stdin: not in gzip format
      tar: Child returned status 1
      tar: Error is not recoverable: exiting now
      ```
      This implies that the download worked, but the archive is corrupted, when in reality the HTML document containing the delivery fail reason (most likely 404 Not Found) is saved and tried to get unpacked. In contrast to wget, curl is a bit stubborn and needs explicit instructions to react to server errors via the flag `-f` (outputs error message and returns error code, ideal for scripts): https://curl.haxx.se/docs/manpage.html#-f
    
      On the PR branch, the output on failed download looks now the following:
      ```
      $ contrib/devtools/previous_release.sh -r -b v0.9.5
      [...]
      curl: (22) The requested URL returned error: 404 Not Found
      Download failed.
      ```
    
    ACKs for top commit:
      fanquake:
        ACK 332f373
    
    Tree-SHA512: 046c931ad9e78aeb2d13faa4866d46122ed325aa142483547c2b04032d03223ed2411783b00106fcab0cd91b2f78691531ac526ed7bb3ed7547b6e2adbfb2e93
    fanquake authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    080a038 View commit details
    Browse the repository at this point in the history
  3. Merge bitcoin#18534: test: skip backwards compat tests if not compile…

    …d with wallet
    
    c0c43ae test: skip backwards compat tests if not compiled with wallet (fanquake)
    
    Pull request description:
    
    Top commit has no ACKs.
    
    Tree-SHA512: d9975a1490e69134408b6b724cea26a6c1397d43f59850283b9e338ae38e00fefbcd868fb141e0a4bb55f02076690a99331f29cfa2d0fa66c165032b24a94081
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    04cc0ac View commit details
    Browse the repository at this point in the history
  4. Merge bitcoin#18828: test: Strip down previous releases boilerplate

    fa359d1 test: Strip down previous releases boilerplate (MarcoFalke)
    
    Pull request description:
    
      Reduces code bloat and mental load to write compatibility tests
    
    ACKs for top commit:
      Sjors:
        tACK fa359d1 on macOS
    
    Tree-SHA512: dc66286b24b2f137e5bca99412850ec7eee8cc61cf9cdc7ab532d529220808189baea8d1b077f8b7f40d3e8881d981e1ffc5a877adb394816f1225b1186253e4
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    a5cb668 View commit details
    Browse the repository at this point in the history
  5. Merge bitcoin#19201: ci: Switch to bitcoincore.org download

    fa4cd1f ci: Switch to bitcoincore.org download (MarcoFalke)
    
    Pull request description:
    
      bitcoin.org is down and not in our control, so it seems odd to rely on it for our ci infrastructure
    
    ACKs for top commit:
      troygiorshev:
        ACK fa4cd1f
    
    Tree-SHA512: f9f0e9c69a52b8b1906ceae195e8bcc189799fb39be921b26e3a37d1f8f3999831f86c96c3546848c0d01429c36cfb2d7c5f314655ac5282d3e8e4cdd838960e
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    35f57b9 View commit details
    Browse the repository at this point in the history
  6. Merge bitcoin#19153: test: mempool compatibility test

    16d4b3f test: mempool.dat compatibility between versions (Ivan Metlushko)
    
    Pull request description:
    
      Rationale: Verify mempool.dat compatibility between versions
    
      The format of mempool.dat has been changed in bitcoin#18038
      The tests verifies the fix made in bitcoin#18807 and ensures that the file format is compatible between current version and v0.19.1
      The test verifies both backward and forward compatibility.
    
      This PR also adds a log when we fail to add a tx loaded from mempool.dat.
      It was useful when debugging this test and could be potentially useful to debug other scenarios as well.
    
      Closes bitcoin#19037
    
    ACKs for top commit:
      Sjors:
        tACK 16d4b3f
    
    Tree-SHA512: 00a38bf528c6478cb0da467af216488f83c1e3ca4d9166c109202ea8284023e99d87a3d6e252c4d88d08d9b5ed1a730b3e1970d6e5c0aef526fa7ced40de7490
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    f68d127 View commit details
    Browse the repository at this point in the history
  7. Merge bitcoin#18864: Add v0.16.3 backwards compatibility test, bump v…

    …0.19.0.1 to v0.19.1
    
    d135c29 [ci] make list of previous releases to download a setting (Sjors Provoost)
    9c246b8 [test] backwards compatibility: bump v0.19.0.1 to v0.19.1 (Sjors Provoost)
    89a28e0 [test] add v0.16.3 backwards compatibility test (Sjors Provoost)
    
    Pull request description:
    
      Thanks to bitcoin#18774's `adjust_bitcoin_conf_for_pre_17` we can now test backwards compatibility for v0.16.3, both for sync and loading a recent wallet.
    
      This PR bumps v0.19.0.1 to v0.19.1.
    
      I also made the version list consistent for the `contrib/devtools/previous_release.sh` instruction, between both tests.
    
    ACKs for top commit:
      MarcoFalke:
        ACK d135c29
    
    Tree-SHA512: 5ff137a7a934237fa220f1c2807ce9abeeb75929266558bf3e4045bec7dfcd0a8747fa74d700065c568330b18badf58c60c308eb13d1eed444d4bbfe6decc48b
    knst authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    7ddcf4a View commit details
    Browse the repository at this point in the history
  8. Merge bitcoin#19205: script: previous_release.sh rewritten in python

    9c34aff Remove previous_release.sh (Brian Liotti)
    e1e5960 script: Add previous_release.py (Brian Liotti)
    
    Pull request description:
    
      Closes bitcoin#18132
    
      Added functionality:
      1) checks file hash before untarring when using the binary download option
    
    ACKs for top commit:
      fjahr:
        re-ACK 9c34aff
      Sjors:
        tACK 9c34aff
    
    Tree-SHA512: 323f11828736a372a47f048592de8b027ddcd75b38f312dfc73f7b495d1e078bfeb384d9cdf434b3e70f2c6c0ce2da2df48e9a6460ac0e1967c6829a411c52d5
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    7c43fa5 View commit details
    Browse the repository at this point in the history
  9. Merge bitcoin#19560: contrib: Clean up previous_releases.py

    facdf53 contrib: Clean up previous_releases.py (MarcoFalke)
    
    Pull request description:
    
    ACKs for top commit:
      fjahr:
        tACK facdf53
      Sjors:
        tACK facdf53
      hebasto:
        ACK facdf53, I have reviewed the code and it looks OK, I agree it can be merged.
    
    Tree-SHA512: c3543320572267035aa342dd170128bbdeb83ca4e2e36a8e46596dd76c8ff1b26ed6759a8073884228b133c45b06ec48889cd0ec83a13bef276b48073d8248e4
    fanquake authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    915c1f2 View commit details
    Browse the repository at this point in the history
  10. Merge bitcoin#19813: util, ci: Hard code previous release tarball che…

    …cksums
    
    0374e82 util: Hard code previous release tarball checksums (Hennadii Stepanov)
    bd897ce scripted-diff: Move previous_release.py to test/get_previous_releases.py (Hennadii Stepanov)
    
    Pull request description:
    
      bitcoin#19205 introduced signature verifying for the downloaded `SHA256SUMS.asc`.
      This approach is brittle and does not work in CI environment for many reasons:
      - bitcoin#19812 (comment)
      - bitcoin#19013 (comment)
    
      This PR:
      - implements **Sjors**' [idea](bitcoin#19205 (review)):
      > Alternatively we might as well hard code the checksum for each `tar.gz` release in the source code, here.
    
      - is an alternative to 5a2c31e (bitcoin#19013)
    
      - fixes bitcoin#19812
    
      - updates v0.17.1 to v0.17.2
    
    ACKs for top commit:
      MarcoFalke:
        cr ACK 0374e82
      Sjors:
        tACK 0374e82
    
    Tree-SHA512: cacdcf9f5209eae7da357abb3445585ad2f980920fd5bf75527ce89974d3f531a4cf8b5b35edfc116b23bfdfb45c0437cb14cbc416d76ed2dc5b9e6d33cdad71
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    da35562 View commit details
    Browse the repository at this point in the history
  11. Merge bitcoin#19859: qa: Fixes failing functional test by changing ve…

    …rsion
    
    6de9429 qa: Changes v0.17.1 to v0.17.2 (nthumann)
    
    Pull request description:
    
      As of bitcoin@0374e82 v0.17.2 is downloaded instead of v0.17.1 for functional testing. This causes `test/functional/feature_backwards_compatibility.py` to fail, because it [requires](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_backwards_compatibility.py#L57) v0.17.1.
    
      Steps to reproduce:
      Run `test/get_previous_releases.py -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2`. It cannot be downloaded at all because the sha256sum is missing [here](https://github.com/bitcoin/bitcoin/blob/c1e0c2ad3b6cd9e7ef55287fb572cfcf10a0e660/test/get_previous_releases.py#L23).
      Or adjust the command and run `test/get_previous_releases.py -b v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2`, then run `test/functional/test_runner.py feature_backwards_compatibility`. It´ll fail because the test is missing v0.17.1.
    
      This PR changes v0.17.1 to v0.17.2 in this test and in a few comments.
    
    ACKs for top commit:
      laanwj:
        ACK 6de9429
      fanquake:
        ACK 6de9429 - looks correct. Surprised this wasn't caught/part of bitcoin#19813. In future you could add any explanations & extra info as part of your commit message as well (even though PR descriptions are included as part of the merge).
    
    Tree-SHA512: bbe50c4fd5c1aedd6dc1cdc3d93ef9005db1c67adca3f263b6b0d869c40b495a3221e706c9389fedea4748e31911dbd591062f60ce9836e58099fbdd9515b4d9
    laanwj authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    b68936f View commit details
    Browse the repository at this point in the history
  12. Merge bitcoin#20955: test: Fix get_previous_releases.py for aarch64

    fa1d5e5 test: Fix get_previous_releases.py for aarch64 (MarcoFalke)
    
    Pull request description:
    
      Otherwise it will fail with "Not sure which binary to download..."
    
    ACKs for top commit:
      laanwj:
        Code review ACK fa1d5e5
    
    Tree-SHA512: 0db71e898a431665757ce835016a4e05c629a95abc4a2951eac9bd9b5876ec3dc3d6f156d58565e2bcdf918cde4f2649183d4a58038ac13c705a7e914c0094d1
    laanwj authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    9cbe0de View commit details
    Browse the repository at this point in the history
  13. Merge bitcoin#22442: util: improves error messages on get_previous_re…

    …leases script
    
    179a051 util: improves error messages on get_previous_releases script (Nelson Galdeman)
    
    Pull request description:
    
      When previous releases are fetched and the specified version wasn't added to the checksum list we used to get a "Checksum did not match" which isn't true (bitcoin-core/bitcoincore.org#753 (comment)).
    
      If the specified version number is not on the list, it now logs cannot do the comparison instead.
    
    ACKs for top commit:
      practicalswift:
        cr ACK 179a051
      theStack:
        tACK 179a051, tested on Debian bullseye/sid
    
    Tree-SHA512: 2a07ce75232f853fd311c43581f8faf12d423668946ae6ad784feece5b4d0edd57fc018ba1f0c5a73bfaccb326e0df9a643580d16bf427c1ec3ff34a9cdbc80c
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    67481ee View commit details
    Browse the repository at this point in the history
  14. partial Merge bitcoin#20354: test: Add feature_taproot.py --previous_…

    …release
    
    fa80e10 test: Add feature_taproot.py --previous_release (MarcoFalke)
    85ccffa test: move releases download incantation to README (Sjors Provoost)
    29d6b1d test: previous releases: add v0.20.1 (Sjors Provoost)
    
    Pull request description:
    
      Disabling the new consensus code at runtime is fine, but potentially fragile and incomplete. Fix that by giving the option to run with a version that has been compiled without any taproot code.
    
    ACKs for top commit:
      Sjors:
        tACK fa80e10
      NelsonGaldeman:
        tACK fa80e10
    
    Tree-SHA512: 1a1feef823f08c05268759645a8974e1b2d39a024258f5e6acecbe25097aae3fa9302c27262978b40f1aa8e7b525b60c0047199010f2a5d6017dd6434b4066f0
    MarcoFalke authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    a368488 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    8a9712e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f093c94 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    08a37a3 View commit details
    Browse the repository at this point in the history
  18. fix: missing changes from Merge bitcoin#18067: wallet: Improve Legacy…

    …ScriptPubKeyMan::CanProvide script recognition
    
    [test] check for addmultisigaddress regression
    Sjors authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    fe1e8c2 View commit details
    Browse the repository at this point in the history
  19. fix: missing changes from Merge bitcoin#18873: Fix intermittent sync_…

    …blocks failures
    knst authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    fab1031 View commit details
    Browse the repository at this point in the history
  20. fix: missing changes from Merge bitcoin#18253: doc: Correct spelling …

    …errors in comments
    
    doc: Correct spelling errors in comments
    
    And ci script output.
    
    Identified via test/lint/lint-spelling
    Empact authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    eb63479 View commit details
    Browse the repository at this point in the history
  21. fix: fillow-up Merge bitcoin#18774: test: added test for upgradewalle…

    …t RPC
    
     - partial dashification
     - disabling this test so far as it does not work anyway
    knst authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    f878b28 View commit details
    Browse the repository at this point in the history
  22. Merge bitcoin#22790: test: add aarch64-apple-darwin platform entry to…

    … get_previous_releases
    
    f6e4db2 test: add aarch64-apple-darwin platform entry to get_previous_releases (Zero-1729)
    
    Pull request description:
    
      Over the course of reviewing a PR, I had to edit `test/get_previous_releases.py` (after I ran `git clean -xdff`) to run the backwards compatibility tests (e.g. `wallet_upgradewallet`, `feature_backwards_compatibility`, etc.), as currently on master, running the script as indicated in [`test/README.md`](https://github.com/bitcoin/bitcoin/blob/master/test/README.md), for example, on an M1 machine results in the following error, as the `aarch64-apple-darwin*` platform entry is presently not recognised:
    
      > Output from an M1 machine running macOS v11.5.2
    
      ```sh
      $ test/get_previous_releases.py -b v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2
      Releases directory: releases
      Not sure which binary to download for aarch64-apple-darwin20.6.0
      ```
    
      As a quick fix, this PR adds the missing `aarch64-apple-darwin*` platform entry. Running the script now results in fetching the old binaries, as expected:
    
      ```sh
      $ test/get_previous_releases.py -b v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2
    
      Releases directory: releases
      Fetching: https://bitcoincore.org/bin/bitcoin-core-0.20.1/bitcoin-0.20.1-osx64.tar.gz
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0 20.9M    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 20.9M  100 20.9M    0     0   136k      0  0:02:37  0:02:37 --:--:-- 95607
      Checksum matched
    
      …
    
      Checksum matched
      ```
    
      After this patch, the backwards compatibility tests also run successfully, as expected.
    
      **Note**: I am open to other possible solutions.
    
      ---
    
      Steps to reproduce:
    
      > Ensure you take out the binaries in `releases` if they already exist.
    
      Try running `test/get_previous_releases.py -b v0.15.2` or similar to fetch the old release binaries.
    
    Top commit has no ACKs.
    
    Tree-SHA512: a238d909b70a61be622234bc49b05d2e91a8acfc5ea348d29f2c8a927fb793cb97365e558571e3f46d6a5650c4f3c6e28fa126c6e56b38e1eb98f7c3e3594d0f
    merge-script authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    90285f5 View commit details
    Browse the repository at this point in the history
  23. feat: cache downloaded releases

    UdjinM6 authored and PastaPastaPasta committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    affcaca View commit details
    Browse the repository at this point in the history