ee045b61efrpc, psbt: Require sighashes match for descriptorprocesspsbt (Ava Chow)2b7682c372psbt: use sighash type field to determine whether to remove non-witness utxos (Ava Chow)28781b5f06psbt: Add sighash types to PSBT when not DEFAULT or ALL (Ava Chow)15ce1bd73fpsbt: Enforce sighash type of signatures matches psbt (Ava Chow)1f71cd337awallet: Remove sighash type enforcement from FillPSBT (Ava Chow)4c7d767e49psbt: Check sighash types in SignPSBTInput and take sighash as optional (Ava Chow)a118256948script: Add IsPayToTaproot() (Ava Chow)d6001dcd4awallet: change FillPSBT to take sighash as optional (Ava Chow)e58b680923psbt: Return PSBTError from SignPSBTInput (Ava Chow)2adfd81532tests: Test PSBT sighash type mismatch (Ava Chow)5a5d26d612psbt: Require ECDSA signatures to be validly encoded (Ava Chow) Pull request description: Currently, we do not add the sighash field to PSBTs at all, even when we have signed with a non-default sighash. This PR changes the behavior such that when we (attempt to) sign with a sighash other than DEFAULT or ALL, the sighash type field will be added to the PSBT to inform the later signers that a different sighash type was used by a signer. Notably, this is necessary for MuSig2 support as all signers must sign using the same sighash type, but the sighash is not provided in partial signatures. Furthermore, because the sighash type can also be provided on the command line, we require that if both a command line sighash type and the sighash field is present, they must specify the same sighash type. However, this was being checked by the wallet, rather than the signing code, so the `descriptorprocesspsbt` RPC was not enforcing this restriction at all, and in fact ignored the sighash field entirely. This PR refactors the checking code so that the underlying PSBT signing function `SignPSBTInput` does the check. ACKs for top commit: theStack: re-ACKee045b61efrkrux: re-ACKee045b61effjahr: Code review ACKee045b61efTree-SHA512: 4ead5be1ef6756251b827f594beba868a145d75bf7f4ef6f15ad21f0ae4b8d71b38c83494e5a6b75f37fadd097178cddd93d614b962a2c72fc134f00ba2f74ae
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.