Skip to content

Conversation

@katesalazar
Copy link
Contributor

I suggested porting pull 439 of the gui repo of the bitcoin-core account
back to 22, nobody explicitly denied, I'm not really sure if they ignore
me or are just busy with something else, so I'll leave this here and make
sure it doesn't spam undesired links. Cheers!

@laanwj
Copy link
Member

laanwj commented Oct 14, 2021

@katesalazar The policy is that we backport bugfixes to previous releases. The referenced issue seems a small cosmetic change that doesn't affect use of the software. So I'd say it's unnecessary. On the other hand it's also low-risk so if other people think it's nice to have I'm also not strongly against it.

@fanquake fanquake force-pushed the initial_backports_22_1 branch from c9371bf to a75131e Compare October 15, 2021 00:36
@promag
Copy link
Contributor

promag commented Oct 15, 2021

ACK a75131e. Performed same backports and got same result.

@luke-jr
Copy link
Member

luke-jr commented Oct 16, 2021

Suggest #21882 #22390 #22781 #22820 #22895

Maybe #23182 (+followup fix) #22359 #22722 #22879

@fanquake
Copy link
Member Author

I've added #22390, #22781, #22820 and #22895 for now.

@lukaszsamson
Copy link

What about #22949?? #23353 is assigned to 22.1 milestone

@fanquake
Copy link
Member Author

What about #22949?? #23353 is assigned to 22.1 milestone

I've added #22949, and updated the PR description to include all the changes.

@gruve-p
Copy link
Contributor

gruve-p commented Nov 22, 2021

ACK e02e8dc

@laanwj
Copy link
Member

laanwj commented Dec 13, 2021

List-of-commits ACK 406e313

@ghost
Copy link

ghost commented Jan 17, 2022

I am not sure. Maybe this can be added: #23268

fanquake added a commit that referenced this pull request Feb 9, 2022
b7ecef1 guix: ignore additioanl failing certvalidator test (fanquake)

Pull request description:

  Backports 8588591 from #24057 so that from-scratch Guix builds for the Darwin host aren't broken due to a (very recently) expired certificate causing one of the python-certvalidator tests to fail. Kept separate from #23276 because that hasn't gotten review attention, and I don't think we should leave `22.x` Darwin Guix builds broken for any longer than we have to.

  Fixes #24110.

  ```bash
  ======================================================================
  ERROR: test_revocation_mode_soft (tests.test_validate.ValidateTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/tmp/guix-build-python-certvalidator-0.1-1.e5bdb4b.drv-0/source/tests/test_validate.py", line 85, in test_revocation_mode_soft
      validate_path(context, path)
    File "/tmp/guix-build-python-certvalidator-0.1-1.e5bdb4b.drv-0/source/tests/../certvalidator/validate.py", line 50, in validate_path
      return _validate_path(validation_context, path)
    File "/tmp/guix-build-python-certvalidator-0.1-1.e5bdb4b.drv-0/source/tests/../certvalidator/validate.py", line 358, in _validate_path
      raise PathValidationError(pretty_message(
  certvalidator.errors.PathValidationError: The path could not be validated because the end-entity certificate expired 2022-01-14 12:00:00Z
  ```

  Guix Build:
  ```bash
  bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  359755bffecc64b4c005c5cdee3824190f6b1759dbc6c20034476dcc06413959  guix-build-b7ecef1ddf0c/output/dist-archive/bitcoin-b7ecef1ddf0c.tar.gz
  0c6700270ec75991d70a97cad77e22cc00553f812edb56c1bac5ef6421f963e1  guix-build-b7ecef1ddf0c/output/x86_64-apple-darwin/SHA256SUMS.part
  87d4637a87959a304422550edf87feda3953d7305894154a6a2d413cc0dd2034  guix-build-b7ecef1ddf0c/output/x86_64-apple-darwin/bitcoin-b7ecef1ddf0c-osx-unsigned.dmg
  9cabae32689bd5f93e7faaaf341827f1c4069a63ab6f74276564e47819343b6c  guix-build-b7ecef1ddf0c/output/x86_64-apple-darwin/bitcoin-b7ecef1ddf0c-osx-unsigned.tar.gz
  bb5fb113bc022a305e49783d0ba48be90aca61e4a942beeb45206dbc5b91ca6e  guix-build-b7ecef1ddf0c/output/x86_64-apple-darwin/bitcoin-b7ecef1ddf0c-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  MarcoFalke:
    Concept ACK b7ecef1

Tree-SHA512: 8f761fece405b3b974b9f42ab4ebf8995d3284ce7bfb0556ff8459e1a7d30f8bd2f407cb5651e9fa1094c493148bba7a8918a251b54a83efe12acfaf3d39f350
@fanquake fanquake force-pushed the initial_backports_22_1 branch from 406e313 to a90dfbc Compare February 14, 2022 13:43
laanwj and others added 2 commits February 15, 2022 09:22
`crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all.
Make the check in `configure.ac` check for this architecture explicitly.

For the release binaries, the current `configure.ac` check happens
to work: it enables it on aarch64 but disables it for armhf. However
some combination of compiler version and settings might ostensibly cause
this check to succeed on armhf (as reported on IRC). So make the 64-bit
platform requirement explicit.

Github-Pull: bitcoin#23045
Rebased-From: f2747d1
MarcoFalke and others added 14 commits February 15, 2022 09:22
I used Guix's values for the powerpc64(le) dynamic linkers, and the
/lib-prefix seems to be a Guix-ism rather than standard. The standard
path for the linker-loaders start with /lib64.

I've taken the new loader values from SYSDEP_KNOWN_INTERPRETER_NAMES in
glibc's sysdeps/unix/sysv/linux/powerpc/ldconfig.h file.

For future reference, loader path values can also be found on glibc's
website: https://sourceware.org/glibc/wiki/ABIList?action=recall&rev=16

Github-Pull: bitcoin#23148
Rebased-From: b96adcb
Just treat it the same as the other BSDs.

Fixes bitcoin#17379.

Github-Pull: bitcoin#22390
Rebased-From: fdd7144
But in case of no keys or a blank hd wallet the iterator would be skipped
and not set to false but true, since the loop would be not entered.

That had resulted in a wrong return and subsequent false HD and watch-only
icon display in gui when reloading a wallet after closing.

Update src/wallet/wallet.cpp

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

Github-Pull: bitcoin#22781
Rebased-From: 8733a8e
... needed for std::numeric_limits<T>::max on WIN32

Github-Pull: bitcoin#23335
Rebased-From: 077a875
…_managers` entry

In the method `CWallet::LoadActiveScriptPubKeyMan`, the map
`external_spk_managers` (or `internal_spk_managers`, if parameter
`internal` is false) is accessed via std::map::operator[], which means
that a default-ctored entry is created with a null-pointer as value, if
the key doesn't exist.  As soon as this value is dereferenced, a
segmentation fault occurs, e.g. in `CWallet::KeypoolCountExternalKeys`.

The bevaviour can be reproduced by the following steps (starting with empty regtest datadir):

$ ./src/bitcoind -regtest -daemon
$ ./src/bitcoin-cli -regtest -named createwallet_name=wallet descriptors=true blank=true
$ cat regtest-descriptors.txt
[
  {
    "desc": "tr([e4445899/49'/1'/0']tprv8ZgxMBicQKsPd8jCeBWsYLEoWxbVgzJDatJ7XkwQ6G3uF4FsHuaziHQ5JZAW4K515nj6kVVwPaNWZSMEcR7aFCwL4tQqTcaoprMKTTtm6Zg/1/*)#mr3llm7f",
    "timestamp": 1634652324,
    "active": true,
    "internal": true,
    "range": [
      0,
      999
    ],
    "next": 0
  }
]
$ ./src/bitcoin-cli -regtest importdescriptors "$(cat regtest-descriptors.txt)"
[
  {
    "success": true
  }
]
$ ./src/bitcoin-cli -regtest getwalletinfo
error: timeout on transient error: Could not connect to the server 127.0.0.1:18443 (error code 1 - "EOF reached")

Bug reported by Josef Vondrlik (josef-v).

Github-Pull: bitcoin#23333
Rebased-From: 6911ab9
When calculating the fee for a given tx size from a fee rate, we should
always round up to the next satoshi. Otherwise, if we round down (via
truncation), the calculated fee may result in a fee with a feerate
slightly less than targeted.

This is particularly important for coin selection as a slightly lower
feerate than expected can result in a variety of issues.

Github-Pull: bitcoin#22949
Rebased-From: 0fbaef9
When calculating a txs absolute fee, if the fee is rounded down to the
nearest satoshi, it is possible for the coin selection algorithms to
undercalculate the fee needed. This can lead to an assertion error in
some situations. One such scenario is added to
rpc_fundrawtransaction.py.

Github-Pull: bitcoin#22949
Rebased-From: ce2cc44
Because of floating point precision issues, not all of the rounding done
is always correct. To fix this, the fee calculation for
assert_fee_amount is changed to better reflect how CFeeRate::GetFee does
it.

First the feerate is converted to an int representing sat/kvb. Then this
is multiplied by the transaction size, divivided by 1000, and rounded up
to the nearest sat. The result is then converted back to BTC (divided by
1e8) and then rounded down to the nearest sat to avoid precision errors.

Github-Pull: bitcoin#22949
Rebased-From: 80dc829
macOS Monterey has refactored some includes such that implicitly defined headers were no longer exposed and that in turns breaks building Qt on macOS 12.

Additional Resources:
 - https://bugreports.qt.io/browse/QTBUG-97855
 - https://codereview.qt-project.org/c/qt/qtbase/+/378706
 - https://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/cocoa?id=dece6f5840463ae2ddf927d65eb1b3680e34a547

Github-Pull: bitcoin#23580
Rebased-From: 8196b0a
It returns an incorrect result when called with a Decimal,
for which the "//" operator works differently.
Also drop unnecessary call to satoshi_round.

Github-Pull: bitcoin#24239
Rebased-From: d1fab9d
@fanquake fanquake force-pushed the initial_backports_22_1 branch from a90dfbc to 269553f Compare February 15, 2022 09:22
@achow101
Copy link
Member

ACK 269553f

@fanquake fanquake merged commit 9b5f674 into bitcoin:22.x Mar 1, 2022
@fanquake fanquake deleted the initial_backports_22_1 branch March 1, 2022 13:40
@bitcoin bitcoin locked and limited conversation to collaborators Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.