Skip to content

Sync with the main repo #60

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

Merged
merged 41 commits into from
Oct 19, 2021
Merged

Sync with the main repo #60

merged 41 commits into from
Oct 19, 2021

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Oct 18, 2021

Sync with the main repo up to bitcoin-core/gui@ef59692.

This sync includes:

Parent commits:

$ git rev-parse 8967f1913c923bdf376af42a27f2fe7fb1ec5280^@
8cfb3cb655fffe34fa8d4dcccf8cbb19f2f5da32
ef596923a86e7069a185942e0507025442b01d1b

darosior and others added 30 commits September 2, 2021 13:41
…Taproot

A "correction" of what seemed to be an overlook was initially proposed in
PR #22779. It was deemed unnecessary to further reduce the dust level,
so document the intention.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
…functions

There is no change in behavior. This just helps prepare for the
transition from the boost::filesystem to the std::filesystem path
implementation.

Co-authored-by: Kiminuo <kiminuo@protonmail.com>
There is no change in behavior. This just helps prepare for the
transition from boost::filesystem to std::filesystem by avoiding calls
to methods which will be unsafe after the transaction to std::filesystem
to due lack of a boost::filesystem::path::imbue equivalent and inability
to set a predictable locale.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: Kiminuo <kiminuo@protonmail.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
This is part of -Wall in GCC and -Wextra in Clang.
To turn on all (future) loop analysis options. Note that
-Wfor-loop-analysis is also part of -Wmost, which is in -Wall.
This is enabled by -Wall in GCC and Clang.
This is enabled via -Wall in GCC, and is
part of -Wunused, which is included in -Wmost, which is included in
-Wall in Clang.
-Wunused-local-typedef(s) is covered by -Wunused in both gcc and clang.
No new warnings fire when compiling.
Improves consistency and readability if future QML variables are added.

-BEGIN VERIFY SCRIPT-
sed -i \
    -e 's/RES_ANIMATION/QT_RES_ANIMATION/g' \
    -e 's/RES_FONTS/QT_RES_FONTS/g' \
    -e 's/RES_ICONS/QT_RES_ICONS/g' \
    -e 's/BITCOIN_RC/BITCOIN_QT_RC/g' \
    src/Makefile.qt.include
-END VERIFY SCRIPT-
b5950dd validation: put coins cache write log into bench debug log (Anthony Towns)
31b2b80 blockstorage: use debug log category (Anthony Towns)
da94ebc validation: move header validation error logging to VALIDATION debug category (Anthony Towns)
1d7d835 validation: include block hash when reporting prev block not found errors (Anthony Towns)

Pull request description:

  Moves the following log messages into debug log categories:

   * "AcceptBlockHeader: ..." to validation
   * "Prune: deleted blk/rev" to new blockstorage log category
   * "Leaving block file" moves from validation to blockstorage
   * "write coins cache to disk" to bench

  Also adds the hash of the block to the log message when AcceptBlockHeader is rejecting because of problems with the prev block.

ACKs for top commit:
  practicalswift:
    cr ACK b5950dd
  Empact:
    Code review ACK bitcoin/bitcoin@b5950dd
  laanwj:
    Code review ACK b5950dd
  promag:
    Code review ACK b5950dd.
  meshcollider:
    Code review ACK b5950dd

Tree-SHA512: a73fdbfe8d36da48a3e89c2d5e0b6a3c5045d280c1a57f61c38d0d21f4f198aece4bd85155be3439e179d5dabdb523bf15fa0395e0e3ceff19c878ba3112c840
eb04bad scripted-diff: Prefix makefile variables with QT_ (João Barbosa)

Pull request description:

  Improves consistency and readability if future QML variables are added.

ACKs for top commit:
  hebasto:
    re-ACK eb04bad, only suggested changes, and script-diff used.
  shaavan:
    Code Review ACK eb04bad

Tree-SHA512: 71e5f835edbb36d6749773e63ef5f4ce040cc576f1c302e371ae8715b874df0810b8a1ca2329e581880168c8ca95375cb84856a7ac5311bc8a059425da113341
aa69fd6 build: Drop -Wno-unused-local-typedef (Hennadii Stepanov)
672e8c5 build: remove -Wunused-variable (fanquake)
5239af0 build: remove -Wswitch (fanquake)
0375906 build: use loop-analysis over range-loop-analysis (fanquake)
12712fa build: remove -Wsign-compare (fanquake)

Pull request description:

  This remove the addition of flags that are already part of other options, such as `-Wall` or `-Wextra`; see each commit message for details. All of the flags being removed here already exist as part of `-Wall` as of GCC 8, or, for Clang, all exist in `-Wmost` (included in `-Wall)`, or as part of `-Wextra` as of Clang 7. Both of which are our minimum required compilers.

  Also cherry-picks one change from #21458.

  To give an example of how GCCs `-Wall` has changed over the last few releases:
  ### 11.x to trunk (12.x)
  Added:
  ```bash
  -Wzero-length-bounds
  -Wmismatched-dealloc
  -Wmismatched-new-delete (only for C/C++)
  ```

  ### 10.x to 11.x
  Added:
  ```bash
  -Warray-parameter=2 (C and Objective-C only)
  -Wrange-loop-construct (only for C++)
  -Wsizeof-array-div
  -Wvla-parameter (C and Objective-C only)
  ```

  Removed:
  ```bash
  -Wenum-conversion in C/ObjC;
  ```

  ### 9.x to 10.x
  Added:
  ```bash
  -Wenum-conversion in C/ObjC;
  -Wformat-overflow
  -Wformat-truncation
  -Wzero-length-bounds
  ```

  ### 8.x to 9.x
  Added:
  ```bash
  -Wpessimizing-move
  ```

  Removed:
  ```bash
  -Wstringop-truncation
  ```

  ### 7.x to 8.x
  Added:
  ```bash
  -Wcatch-value (C++ and Objective-C++ only)
  -Wmissing-attributes
  -Wmultistatement-macros
  -Wrestrict
  -Wsizeof-pointer-div
  -Wstringop-truncation
  ```

  [Clang Warning Options](https://clang.llvm.org/docs/DiagnosticsReference.html)
  [GCC Warning Options](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)

ACKs for top commit:
  meshcollider:
    utACK aa69fd6

Tree-SHA512: 34dde6bd773c864202c151eaa35f902d03fb531c27fe5e1ef659225da03acade2efe5df56df3efb4df5bbded3d395348ce03c25b837fce83be53af3352f0f2bc
…flush when upgrading non-HD to HD

6531599 test: Add check that newkeypool flushes change addresses too (Samuel Dobson)
84fa19c Add release notes for keypool flush changes (Samuel Dobson)
f9603ee Add test for flushing keypool with newkeypool (Samuel Dobson)
6f6f7bb Make legacy wallet upgrades from non-HD to HD always flush the keypool (Samuel Dobson)
2434b10 Fix outdated keypool size default (Samuel Dobson)
22cc797 Add newkeypool RPC to flush the keypool (Samuel Dobson)

Pull request description:

  This PR makes two main changes:
  1) Adds a new RPC `newkeypool` which will entirely flush and refill the keypool.
  2) When upgradewallet is called on old, non-HD wallets upgrading them to HD, we now always flush the keypool and generate a new one, to immediately start using the HD generated keys.

  This PR is motivated by a number of users with old, pre-compressed-key wallets upgrading them and being confused about why they still can't generate p2sh-segwit or bech32 addresses -- this is due to uncompressed keys remaining in the keypool post-upgrade and being illegal in these newer address formats. There is currently no easy way to flush the keypool other than to call `getnewaddress` a hundred/thousand times or an ugly hack of using a `sethdseed` call.

ACKs for top commit:
  laanwj:
    re-ACK 6531599
  meshcollider:
    Added new commit 6531599 to avoid invalidating previous ACKs.
  instagibbs:
    ACK bitcoin/bitcoin@6531599

Tree-SHA512: 50c79c5d42dd27ab0ecdbfdc4071fdaa1b2dbb2f9195ed325b007106ff19226419ce57fe5b1539c0c24101b12f5e034bbcfb7bbb0451b766cb1071295383d774
…(std::string) constructor and fs::path::string() method

6544ea5 refactor: Block unsafe fs::path std::string conversion calls (Russell Yanofsky)
b39a477 refactor: Add fs::PathToString, fs::PathFromString, u8string, u8path functions (Russell Yanofsky)

Pull request description:

  The `fs::path` class has a `std::string` constructor which will implicitly convert from strings. Implicit conversions like this are not great in general because they can hide complexity and inefficiencies in the code, but this case is especially bad, because after the transition from `boost::filesystem` to `std::filesystem` in #20744 the behavior of this constructor on windows will be more complicated and can mangle path strings. The `fs::path` class also has a `.string()` method which is inverse of the constructor and has the same problems.

  Fix this by replacing the unsafe method calls with `PathToString` and `PathFromString` function calls, and by forbidding unsafe method calls in the future.

ACKs for top commit:
  kiminuo:
    ACK 6544ea5
  laanwj:
    Code review ACK 6544ea5
  hebasto:
    re-ACK 6544ea5, only added `fsbridge_stem` test case, updated comment, and rebased since my [previous](bitcoin/bitcoin#22937 (review)) review. Verified with the following command:

Tree-SHA512: c36324740eb4ee55151146626166c00d5ccc4b6f3df777e75c112bcb4d1db436c1d9cc8c29a1e7fb96051457d317961ab42e6c380c3be2771d135771b2b49fa0
5307351 doc: update release notes for 22539 (Antoine Poinsot)

Pull request description:

  Following Marcofalke's feedback at bitcoin/bitcoin#22539 (comment)

ACKs for top commit:
  shaavan:
    ACK 5307351

Tree-SHA512: 91ea3e6c7fc06a4f40723217735e3d3f12812dc5adafa4f8c505ae4df5bd91345133099a9c158a7f15f01313c3128c8c15455c24256d76cd93033c0b5ce2c64f
…oot outputs

d873db7 policy: document we intentionally don't lower the dust threshold for Taproot (Antoine Poinsot)

Pull request description:

  Following discussions in #22779 .

ACKs for top commit:
  benthecarman:
    ACK d873db7
  ariard:
    Code Review ACK d873db7
  theStack:
    ACK d873db7

Tree-SHA512: 1f5d20dce767f8a74d57ece47a7f6b881741f508896131b8433600cccf9e4262892603b46521d1bb69d5c83b450f24a16731341072a471c1f2c9adad682af895
hebasto and others added 11 commits October 15, 2021 15:00
…id task explicitly

67bb6b5 ci, refactor: Disable binaries for Android task explicitly (Hennadii Stepanov)

Pull request description:

  This PR defines a set of binaries that are compiled in the Android APK task explicitly via `configure` options, that allows to avoid relying on the `test_bitcoin_qt` target from the `src/qt/Makefile`.

  It is ported from bitcoin-core#58.

  No behavior change.

ACKs for top commit:
  MarcoFalke:
    cr ACK 67bb6b5

Tree-SHA512: 9aee1083489a69a40e6779291aba423816f59a1fe6a2156be4edafd0c1c5dd14b99215ca4ff0ec32562e0f43f6ed38e4f8ee562020649be589d258156cea86ab
…eduling

146831f ci: Reduce Windows memory for faster scheduling (MarcoFalke)

Pull request description:

  A rebased bitcoin/bitcoin@fac3ae2 from #23043.

  The worst scenario (all caches are invalidated) tested in #23217.

ACKs for top commit:
  MarcoFalke:
    cr ACK 146831f

Tree-SHA512: 8d5101a7a47139f5358601def3932d199da500ba255740c09a170378a3e6fd9b0ff4ce5a7c0f5f1eb4f26f905f55b47077759b265b67acf9b7b01eec89b7e5da
ca2c313 Use absolute FQDN for DNS seed domains (Prayank)

Pull request description:

  Fixes bitcoin/bitcoin#23193 by using absolute FQDN for domains used by DNS seeds.

  It improves security and should not break anything based on my research and testing. Few things about absolute FQDN are shared in https://superuser.com/questions/1467958/why-does-putting-a-dot-after-the-url-remove-login-information

  Master branch:

  ```
  DNS seed x9.dnsseed.bitcoin.dashjr.org. responded with IP 127.0.0.1
  ```

  PR branch:

  ```
  DNS seed x9.dnsseed.bitcoin.dashjr.org. responded with IP 159.89.108.149
  ```

  Reviewers can follow the steps mentioned in Issue to test: bitcoin/bitcoin#23193 (comment)

ACKs for top commit:
  practicalswift:
    cr ACK ca2c313
  laanwj:
    code review ACK ca2c313
  promag:
    Code review ACK ca2c313.

Tree-SHA512: 9818227332282a78c45b4470c2fc80bf899ed78aed76644ebf014e0fff1b139402ea023acdea162363a478b6f6613dbf1da57e214d2240ea0f04310473f57cca
mypy stubs were introduced in 21.0.1
Achieve this by adding some ignore, and making data/ importable.

Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
a46f71b lint: enable mypy checking for missing imports (josibake)
22e6526 lint mypy 0.910 (fanquake)
6ae9c2e lint: install pyzmq (22.3.0) into linter environment (josibake)
b93e229 doc: remove pointlessly duplicated linter version / install info (fanquake)

Pull request description:

  This is #22844 with issues addressed, and two additional commits. One to move to the latest mypy version in the CI, and another to remove what is just pointless duplication from the test README. There's no need to relist package versions and install instructions (meaning 2x the work when changing anything), when you can just link to `04_install.sh` which has the versions used and pip invocations to install them.

ACKs for top commit:
  practicalswift:
    cr ACK a46f71b

Tree-SHA512: 2900dea3901d03a846dc1ea912f217d152e803845516c7d941745ec1291d145590cd4bf2ddc497f7cf628119ba9905d7b1531836062aa85b384e39cf436f62c6
bda620a test: check abandoned tx in listsinceblock (brunoerg)

Pull request description:

  This PR tests if the abandoned transaction is correct in listsinceblock return (wallet_abandonconflict.py).

ACKs for top commit:
  jonatack:
    ACK bda620a
  theStack:
    ACK bda620a
  stratospher:
    Tested ACK bda620a. This PR verifies whether the transaction txAB1 has been abandoned in listsinceblock and is a nice addition to the test!

Tree-SHA512: e4dce344cf621de7a8b5bd8660d252419772a293080fc881f6f448b6df85c6b1c8f0df619e855a40b6393f53c836f0d7fadbd3916c20cccd3a95830b8b502991
@hebasto hebasto changed the title 211018 upstream Sync with the main repo Oct 18, 2021
Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8967f19

Sync is correct and verified parent commits

@hebasto hebasto merged commit 13a9507 into bitcoin-core:main Oct 19, 2021
@hebasto hebasto deleted the 211018-upstream branch October 19, 2021 20:21
hebasto added a commit to hebasto/gui-qml that referenced this pull request May 26, 2022
…d enum

0e5dedb qt/wallettests: sort includes (William Casarin)
0554251 qt: Skip displayUnitChanged signal if unit is not actually changed (Hennadii Stepanov)
ffbc2fe qt, refactor: Remove default cases for scoped enum (Hennadii Stepanov)
152d5ba qt, refactor: Remove BitcoinUnits::valid function (Hennadii Stepanov)
aa23960 qt, refactor: Make BitcoinUnits::Unit a scoped enum (Hennadii Stepanov)
75832fd qt: Use QVariant instead of int for BitcoinUnit in QSettings (Hennadii Stepanov)

Pull request description:

  This is a rebased version of bitcoin-core#60

  Since Qt 5.5 there are [means](https://doc.qt.io/qt-5/qobject.html#Q_ENUM) to register an enum type with the meta-object system (such enum still lacks an ability to interact with [QSettings::setValue()](https://doc.qt.io/qt-5/qsettings.html#setValue) and [QSettings::value()](https://doc.qt.io/qt-5/qsettings.html#value) without defined stream operators).

  In order to reduce global namespace polluting and to force strong type checking, this PR makes BitcoinUnits::Unit a scoped enum (typedef BitcoinUnits::Unit BitcoinUnit;).

  No behavior change.

ACKs for top commit:
  jonatack:
    ACK 0e5dedb, review and debug build of each commit after rebase on current master, lightly tested running the GUI, changing units a few times, and verifying persistence after restarting
  promag:
    Code review ACK 0e5dedb

Tree-SHA512: 39ec0d7e4f0b9b25be287888121a8db6b282339674e37ec3a3554da63a9e22d6fe079e8310ca289b2a0356a19b3c7e55afa17d09dd34e0f222177f603bb053a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.