dcrd/internal/staging/stdscript
Dave Collins 9bcae49b9e
stdscript: Add v0 ecdsa multisig redeem support.
This adds support for identifying if a signature script likely consists
of a pay-to-script-hash multi-signature redeem script for an original
pay-to-script-hash script as a convenience method for consumers of the
package.

Note that this is different in that it applies to the signature script
as opposed to the public key script and consequently there is no new
script type introduced nor does the overall script determination detect
it.  This is the case because determining if a signature script is
actually a redemption of pay-to-script-hash requires the associated
public key script which is often expensive to obtain.  Therefore, this
makes a fast best effort guess that has a high probability of being
correct by checking if the signature script ends with a data push and
treating that data push as if it were a p2sh redeem script.

Also of note is that the same change in semantics regarding compressed
public keys and the required number of signatures as described in the
commit which introduced support for detecting version 0 ecdsa
multisignature scripts applies here.

Full test coverage is included.

This is part of a series of commits to fully implement the stdscript
package.
2021-06-08 12:20:41 -05:00
..
error_test.go stdscript: Introduce pkg infra for std scripts. 2021-06-08 12:20:31 -05:00
error.go stdscript: Introduce pkg infra for std scripts. 2021-06-08 12:20:31 -05:00
script_bench_test.go stdscript: Add v0 ecdsa multisig benchmark. 2021-06-08 12:20:41 -05:00
script_test.go stdscript: Add v0 ecdsa multisig redeem support. 2021-06-08 12:20:41 -05:00
script.go stdscript: Add v0 ecdsa multisig redeem support. 2021-06-08 12:20:41 -05:00
scriptshortform_test.go stdscript: Introduce pkg infra for std scripts. 2021-06-08 12:20:31 -05:00
scriptv0_test.go stdscript: Add v0 ecdsa multisig redeem support. 2021-06-08 12:20:41 -05:00
scriptv0.go stdscript: Add v0 ecdsa multisig redeem support. 2021-06-08 12:20:41 -05:00