Description
LWK test suites use a custom elementsd regtest env (namely with -initialfreecoins flag), which changes the genesis hash of the network.
On Jade side, in sign_tx.c and sign_psbt.c network_to_genesis_hash() is used for taproot sighash computation, producing an invalid Schnorr signature when the actual network genesis differs from the hardcoded value.
Particularly, in sign_psbt() when the PSET carries genesis blockhash that differs from the hardcoded network_to_genesis_hash() value, the error buffer is set to "Network/pset genesis mismatch" but retval remains 0 and execution continues due to a missing early return.
Description
LWK test suites use a custom elementsd regtest env (namely with
-initialfreecoinsflag), which changes the genesis hash of the network.On Jade side, in
sign_tx.candsign_psbt.cnetwork_to_genesis_hash()is used for taproot sighash computation, producing an invalid Schnorr signature when the actual network genesis differs from the hardcoded value.Particularly, in
sign_psbt()when the PSET carries genesis blockhash that differs from the hardcodednetwork_to_genesis_hash()value, the error buffer is set to "Network/pset genesis mismatch" but retval remains 0 and execution continues due to a missing early return.