dcrd/internal
Dave Collins a6d266d0b9
stdscript: Add v0 nulldata support.
This adds support for detecting version 0 nulldata scripts as standard.

It should be noted that this code includes a change in the semantics as
compared to the existing code.  In particular, the existing code detects
and treats any type of data push up to the maximum allowed length,
including those that are not canonical, as standard per policy, whereas
this new code further restricts the standardness policy to only treat
nulldata scripts with canonical data pushes up to the maximum allowed
length as standard since they occupy less space on chain and there is
really no good reason for using non-canonical pushes anyway.  In
practice, all known software already only creates canonical pushes and
has since launch.

This does not affect consensus in any way since consensus enforces its
own code related to the associated opcode as required.  Further,
nulldata scripts are unspendable by consensus, so this is purely a
policy change.

Full test coverage is included.

This is part of a series of commits to fully implement the stdscript
package.
2021-06-08 12:20:43 -05:00
..
fees fees: Remove deprecated DisableLog. 2020-12-28 13:13:47 -06:00
limits multi: replace godoc.org with pkg.go.dev 2020-02-18 19:35:19 -06:00
mempool txscript: Split signing code to sign subpackage. 2021-05-07 13:19:00 -05:00
mining txscript: Split signing code to sign subpackage. 2021-05-07 13:19:00 -05:00
netsync netsync: Use an APBF for recently rejected txns. 2021-02-13 01:41:27 -06:00
progresslog multi: Add chain verify progress percentage. 2021-01-21 23:30:35 -06:00
rpcserver version: Rework to support single version override. 2021-05-14 04:15:56 -05:00
staging/stdscript stdscript: Add v0 nulldata support. 2021-06-08 12:20:43 -05:00
version version: Rework to support single version override. 2021-05-14 04:15:56 -05:00