BIP325 mentions the following rule:
In the special case where an empty solution is valid (ie scriptSig and scriptWitness are both empty) this additional commitment can optionally be left out. This special case is to allow non-signet-aware block generation code to be used to test a custom signet chain where the challenge is trivially true.
Such a signet can be created using e.g. -signetchallenge=51
(OP_TRUE
). However contrib/signet/miner
won’t omit the commitment.
This PR improves the miner by skipping the PSBT for known trivial scripts (just OP_TRUE
and trivial pushes for now). This prevents it from appending the 4 byte signet header to the witness commitment, as allowed by the above rule.
Previously the script would fail with PSBT signing failed
, making it difficult to mine. This is no longer the case.