Skip to content

Genesis hash mismatch on custom regtest environments #299

Description

@topologoanatom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions