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
can’t handle this, as it fails with PSBT signing failed
.
This PR improves the miner by skipping the PSBT for known trivial scripts (just OP_TRUE
for now). This also avoids appending the 4 byte signet header to the witness commitment, as allowed by the above rule.