PSBT signing was changed to use SIGHASH_DEFAULT by default in #22514.
The signet miner script sets the sighash type of the created PSBT to
SIGHASH_ALL, hence this leads to a sighash mismatch when the
`walletprocesspsbt` RPC is called. Fix this by explicitly passing the
correct sighash type.
Note that the same change was needed in one of our functional tests,
see commit d3992669df.
Reported by gruve-p.
Github-Pull: bitcoin#24553
Rebased-From: 12cc020
Adapted in part from the CJDNS description in #23077 by Vasil Dimov
and from CJDNS documentation and feedback by Caleb James DeLisle.
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Github-Pull: bitcoin#24555
Rebased-From: ed15848
If the user has unchecked "Allow incoming connections" in
`Settings->Options...->Network` then `fListen=false` is saved in
`~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false`
during startup, but leaves `-listenonion` to `true`.
This flipping of `-listen` is done in `OptionsModel::Init()` after
`InitParameterInteraction()` has been executed which would have flipped
`-listenonion`, should it have seen `-listen` being `false`
(this is a difference between `bitcoind` and `bitcoin-qt`).
Fixes: https://github.com/bitcoin-core/gui/issues/567
Github-Pull: bitcoin-core/gui#568
Rebased-From: 7f90dc26c8
Before this change the send confirmation dialog would keep the Send option disabled. The Create Unsigned choice would actually send. This is potentially confusing.
With this change the Create Unsigned button will not attempt to sign and always produce a PSBT. The Send button will attempt to sign, and only return a PSBT if more signatures are needed.
When using an external signer, the Create Unsigned option only appears when PSBT controls are enabled in the wallet settings.
This commit maintains the pre-existing behavior of filling the PSBT (without signing) even when not using an external signer.
Closes#551
Co-authored-by: Jon Atack <jon@atack.com>
Github-Pull: bitcoin-core/gui#555
Rebased-From: 2efdfb88aa
Does not change behavior.
Review hint:
git show --color-moved --color-moved-ws=allow-indentation-change
Github-Pull: bitcoin-core/gui#555
Rebased-From: 4b5a6cd149
This commit does not change behavior.
Review hint:
git show --color-moved --color-moved-ws=allow-indentation-change
Github-Pull: bitcoin-core/gui#555
Rebased-From: 026b5b4523
This was changed in #22818 from 0 to 1. Since it changes
BLOCK_OPT_WIT of the genesis block, older versions of bitcoin
core would not read regtest directories created with newer versions
without a reindex.
Github-Pull: bitcoin#24527
Rebased-From: 5ce3057
and harmonize them as follows
- s/outgoing/automatic outbound/
- s/Incoming/Inbound and manual/ (are not affected by this option.)
- s/only through network/only to network/
- s/this option. This option/this option. It/
- s/network types/networks/
and also pick up a few nits in doc/p2p-bad-ports.md
Github-Pull: bitcoin#24468
Rebased-From: a1db99a
1fd91da454 build, mac: Include arch in codesignature tarball (Andrew Chow)
eba46583ed guix: use latest signapple (Andrew Chow)
Pull request description:
This backports additional signapple and macOS codesigning changes from #24506 for 23.x (skipping #24503, which is an interim signapple update, and the certvalidator change, which is not strictly necessary), and should complete the changes required to perform M1 codesigning for the 23.x release.
ACKs for top commit:
hebasto:
ACK 1fd91da454, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 55b7e0680058203744dc491da060ef56a880270a01c10e475b7a171457902410806895dbe7332a323ce47c2a776337fa29eb811d2511fce84ede13aeacbe2a02
7e1b968f61 qt: Avoid crash on startup if int specified in settings.json (Ryan Ofsky)
4607f700d0 test: Add tests for GetArg methods / settings.json type coercion (Ryan Ofsky)
Pull request description:
Backport of #24498
ACKs for top commit:
jonatack:
ACK 7e1b968f61
Tree-SHA512: efe6ec4361858e50fd524db64141ad3622ecef321b99567da9650575558a9a9bdec0fc43113967cae2f23a1375132eed2d6ebf64d4aa91ac1c5f2f591a26ba74
Fix GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 that happens if
settings.json contains an integer value for any of the configuration
options which GUI settings can currently clash with (-dbcache, -par,
-spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy,
-proxy, -onion, -onion, -lang, and -prune).
Fix is a one-line change in ArgsManager::GetArg.
Github-Pull: bitcoin/bitcoin#24498
Rebased-From: 5b1aae12ca
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
Github-Pull: bitcoin/bitcoin#24498
Rebased-From: 84b0973e35
0dcbd2ee93 guix: use same commit for codesigning time-machine (fanquake)
Pull request description:
The time machines should be updated in lockstep. Backports #24484.
Github-Pull: #24484
Rebased-From: 29862bdd40
ACKs for top commit:
hebasto:
ACK 0dcbd2ee93
Tree-SHA512: 831f2d1a0bd92bc6acbe20b0c2e2557f9cc8056034c6975ec6be2cae2eafe584d618b83519623caa81adc434121174e4c56a2df3cc8912352146ac610901bd0f
7d64ea4a01 net: only assume all local addresses if listening on any (Vasil Dimov)
0cfc0cd322 net: fix GetListenPort() to derive the proper port (Vasil Dimov)
f98cdcb357 net: pass Span by value to CaptureMessage() (Vasil Dimov)
3cb9d9c861 net: make CaptureMessage() mockable (Vasil Dimov)
43868ba416 timedata: rename variables to match the coding style (Vasil Dimov)
60da1eaa11 timedata: make it possible to reset the state (Vasil Dimov)
Pull request description:
`GetListenPort()` uses a simple logic: "if `-port=P` is given, then we
must be listening on `P`, otherwise we must be listening on `8333`".
This is however not true if `-bind=` has been provided with `:port` part
or if `-whitebind=` has been provided. Thus, extend `GetListenPort()` to
return the port from `-bind=` or `-whitebind=`, if any.
Also, if `-bind=` is provided then we would bind only to a particular address
and should not add all the other addresses of the machine to the list of
local addresses.
Fixes https://github.com/bitcoin/bitcoin/issues/20184
ACKs for top commit:
sipa:
utACK 7d64ea4a01. I didn't review the tests in detail.
jonatack:
re-ACK 7d64ea4a01 per `git range-diff 08bcfa27 35ec977 7d64ea4`, changes are rebase-only, light re-review, re-ran the new tests locally
Tree-SHA512: 45135ab9c0ec3cc8c83e3b3e58a1c1f77eaeaba00618d54f1010db1d23d6db7d9c0dc7807e72ebc34e8b2d0e91f1e0d0e9239d13b90f1bdce8be84459e7837f0
If `-bind=` is provided then we would bind only to a particular address
and should not add all the other addresses of the machine to the list of
local addresses.
Fixes https://github.com/bitcoin/bitcoin/issues/20184 (case 4.)
`GetListenPort()` uses a simple logic: "if `-port=P` is given, then we
must be listening on `P`, otherwise we must be listening on `8333`".
This is however not true if `-bind=` has been provided with `:port` part
or if `-whitebind=` has been provided. Thus, extend `GetListenPort()` to
return the port from `-bind=` or `-whitebind=`, if any.
Fixes https://github.com/bitcoin/bitcoin/issues/20184 (cases 1. 2. 3. 5.)
Rename `CaptureMessage()` to `CaptureMessageToFile()` and introduce a
`std::function` variable called `CaptureMessage` whose value can be
changed by unit tests, should they need to inspect message contents.
Add a new function `TestOnlyResetTimeData()` which would reset the
internal state used by `GetTimeOffset()`, `GetAdjustedTime()` and
`AddTimeData()`.
This is needed so that unit tests that call `AddTimeData()` can restore
the state in order not to confuse other tests that rely on it.
Currently `timedata_tests/addtimedata` is the only test that modifies
the state (via `AddTimeData()`) and also the only test that relies on
that state.
5d7f22595f Do not use `LocalTestingSetup` in getarg_tests test file. (Kiminuo)
Pull request description:
Avoid using a test fixture in getarg_tests for better readability. Change was implemented by _kiminuo_ and posted https://github.com/bitcoin/bitcoin/pull/24306#issuecomment-1036643216
ACKs for top commit:
kiminuo:
ACK 5d7f22595f
Tree-SHA512: 0fd98622010e6923e91c66447a1d0861bf344a65d86a313dff7d428c089b1740a25f699327f6ed4c163255f270bcbd4f7be962bb551862214f9b9e395d40df04