bitcoin/contrib
MarcoFalke 74f8c551e9
Merge bitcoin/bitcoin#24553: contrib: fix signet miner (sighash mismatch)
12cc0201c2 contrib: fix signet miner (sighash mismatch) (Sebastian Falbesoner)

Pull request description:

  gruve-p reported that the signet miner doesn't work anymore (see https://github.com/bitcoin/bitcoin/issues/24501#issuecomment-1062088351), failing with the following error of the `walletprocesspsbt` RPC:

  ```
  error code: -22
  error message:
  Specified sighash value does not match value stored in PSBT
  .....
  subprocess.CalledProcessError: Command '['bitcoin-cli', '-signet', '-stdin', 'walletprocesspsbt']' returned non-zero exit status 22
  ```

  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 (3 is the per-input type PSBT_IN_SIGHASH_TYPE, following a little-endian 32 unsigned integer of the sighash type):

  e04720ec33/contrib/signet/miner (L169-L170)

  hence this leads to a sighash mismatch when the `walletprocesspsbt` RPC is called. Fix this by explicitly passing the correct sighash type. The same change was needed in one of our functional tests, see commit d3992669df.

  Note that instead of feeding the PSBT via `-stdin` it is directly passed as parameter, as I couldn't figure out a way to pass multiple parameters otherwise (separating by newline also didn't work).

ACKs for top commit:
  kallewoof:
    ACK 12cc0201c2
  ajtowns:
    ACK 12cc0201c2 ; code review only

Tree-SHA512: 8509e768e96f85e28c0ca0dc2d35874aa29623febddc46bf90472ec38f38cb3a1b5407c563fd9101d07088775d0fdb18e9137cc38955e847885b83c16591c736
2022-03-17 07:10:27 +01:00
..
builder-keys builder-keys: add kristapsk 2021-08-31 13:41:32 +03:00
debian doc: Update license year range to 2022 2022-01-03 04:48:41 +08:00
devtools contrib: fix implicit function decleration in win symbol check 2022-03-07 11:51:11 +00:00
guix Merge bitcoin/bitcoin#24549: guix: Use $HOST instead of generic osx{64} for macOS artifacts 2022-03-16 20:41:36 +00:00
init Merge #21418: contrib: Make systemd invoke dependencies only when ready 2021-03-22 15:15:14 +01:00
linearize scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
macdeploy build, mac: Include arch in codesignature tarball 2022-03-09 10:38:24 -05:00
message-capture Add documentation to contrib folder 2021-01-23 16:15:05 -05:00
qos scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
seeds net: Update hardcoded seeds for 23.x 2022-02-22 15:15:27 +01:00
shell guix: Add source-able bash prelude and utils 2021-04-05 11:00:21 -04:00
signet contrib: fix signet miner (sighash mismatch) 2022-03-14 11:54:50 +01:00
testgen scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
tracing Merge bitcoin/bitcoin#23907: tracing: utxocache tracepoints follow up for #22902 2022-02-20 11:27:54 +00:00
verify-commits scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
verifybinaries scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
windeploy scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
zmq scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bitcoin-cli.bash-completion scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
bitcoin-tx.bash-completion bash-completion: Adapt for 0.12 and 0.13 2016-07-07 07:52:59 -04:00
bitcoind.bash-completion scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
filter-lcov.py scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
install_db4.sh contrib: add check for wget command in install_db4.sh 2021-12-02 22:02:40 +01:00
README.md release: remove gitian 2021-08-31 09:37:23 +08:00
valgrind.supp test: Remove unused valgrind suppressions 2022-02-04 16:35:15 +01:00

Repository Tools

Developer tools

Specific tools for developers working on this repository. Additional tools, including the github-merge.py script, are available in the maintainer-tools repository.

Verify-Commits

Tool to verify that every merge commit was signed by a developer using the github-merge.py script.

Linearize

Construct a linear, no-fork, best version of the blockchain.

Qos

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.

Seeds

Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys

Packaging

The Debian subfolder contains the copyright file.

All other packaging related files can be found in the bitcoin-core/packaging repository.

Builder keys

PGP keys used for signing Bitcoin Core release results.

MacDeploy

Scripts and notes for Mac builds.

Test and Verify Tools

TestGen

Utilities to generate test vectors for the data-driven Bitcoin tests.

Verify Binaries

This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.