Commit Graph

556 Commits

Author SHA1 Message Date
Dave Collins
55fb28cbbd
txscript: Prepare v4.0.0.
This updates the txscript module dependencies, the copyright year in the
files modified since the previous release, and serves as a base for
txscript/v4.0.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.3
- github.com/decred/dcrd/chaincfg/v3@v3.1.0
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.2
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.0.1
- github.com/decred/dcrd/wire@v1.5.0
- github.com/decred/slog@v1.2.0

The full list of updated direct dependencies since the previous
txscript/v3.0.0 release are as follows:

- github.com/dchest/siphash@v1.2.2
- github.com/decred/base58@v1.0.3
- github.com/decred/dcrd/chaincfg/chainhash@v1.0.3
- github.com/decred/dcrd/chaincfg/v3@v3.1.0
- github.com/decred/dcrd/crypto/blake256@v1.0.0
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.2
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.0.1
- github.com/decred/dcrd/wire@v1.5.0
- github.com/decred/slog@v1.2.0

The following direct dependencies are no longer required as compared to
the previous txscript/v3.0.0 release:

- github.com/decred/dcrd/dcrutil/v3

Finally, all modules in the repository that depend on txscript are
tidied to ensure they are updated to use the latest versions hoisted
forward as a result.
2021-11-18 23:14:01 -06:00
Dave Collins
b1b9a86da0
stdscript: Add extract v0 stake-tagged p2sh bench.
BenchmarkExtractStakeScriptHashV0
---------------------------------
v0_complex_non_standard       226793582   5.253 ns/op
v0_stake_submission_p2sh      372232682   3.233 ns/op
v0_stake_gen_p2sh             305602378   3.979 ns/op
v0_stake_revoke_p2sh          201691552   5.064 ns/op
v0_stake_change_p2sh          209401243   5.687 ns/op
v0_treasury_generation_p2sh   221794405   5.419 ns/op
2021-11-18 23:02:42 -06:00
Dave Collins
2e09c16c56
stdscript: Add v0 stake-tagged p2sh extract.
This adds support for directly extracting the script hash from standard
version 0 stake-tagged pay-to-script-hash scripts along with full test
coverage.

While all of this data can be extracted from each individual type, it
can be more convenient for callers who treat all script hashes as the
same entity which is the case for many applications.
2021-11-18 23:02:33 -06:00
Dave Collins
a81014df3c
stdscript: Add extract v0 stake-tagged p2pkh bench.
BenchmarkExtractStakePubKeyHashV0
---------------------------------
v0_complex_non_standard-16                        229676676   5.139 ns/op
v0_stake_submission_p2pkh-ecdsa-secp256k1-16      335241789   3.531 ns/op
v0_stake_gen_p2pkh-ecdsa-secp256k1-16             268142942   4.517 ns/op
v0_stake_revoke_p2pkh-ecdsa-secp256k1-16          244045095   4.908 ns/op
v0_stake_change_p2pkh-ecdsa-secp256k1-16          220275314   5.441 ns/op
v0_treasury_generation_p2pkh-ecdsa-secp256k1-16   197104339   6.086 ns/op
2021-11-18 23:02:29 -06:00
Dave Collins
d4f5338af0
stdscript: Add v0 stake-tagged p2pkh extract.
This adds support for directly extracting the public key hash from
standard version 0 stake-tagged pay-to-pubkey-hash scripts along with
full test coverage.

While all of this data can be extracted from each individual type, it
can be more convenient for callers who treat all public key hashes as
the same entity which is the case for many applications.
2021-11-18 23:02:05 -06:00
Dave Collins
c0fe15fa0e
stdaddr: Use txscript for opcode definitions.
This modifies the code to use the opcode definitions in txscript now
that the previous cyclic dependency no longer applies since txscript no
longer depends on stdaddr.
2021-11-18 13:15:06 -06:00
Dave Collins
67d1e95792
txscript: Remove unused ErrTooMuchNullData.
This removes ErrTooMuchNullData and its associated stringer test since
it is no longer used by anything in the repository.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:42 -06:00
Dave Collins
2f193bda49
txscript: Remove unused ErrTooManyRequiredSigs.
This removes ErrTooManyRequiredSigs and its associated stringer test
since it is no longer used by anything in the repository.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:42 -06:00
Dave Collins
bceeecad82
txscript: Remove unused ErrNotMultisigScript.
This removes ErrNotMultisigScript and its associated stringer test since
it is no longer used by anything in the repository.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:41 -06:00
Dave Collins
1555bc4e31
txscript: Remove unused ScriptClass.
This removes ScriptClass and its associated tests since it is no longer
used by anything in the repository and is now available via
stdscript.ScriptType.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:40 -06:00
Dave Collins
ba9df917eb
txscript: Remove unused MaxDataCarrierSize.
This removes MaxDataCarrierSize since it is no longer used by anything
in the repository and is now available via
stdscript.MaxDataCarrierSizeV0.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:40 -06:00
Dave Collins
edc646cb0d
txscript: Remove unused isStandardAltSignatureType.
This removes isStandardAltSignatureType since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:39 -06:00
Dave Collins
f41ce67e6d
txscript: Remove unused extractPubKeyHashAltDetails.
This removes extractPubKeyHashAltDetails since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:39 -06:00
Dave Collins
6260335f9c
txscript: Remove unused isPubKeyHashAltScript.
This removes isPubKeyHashAltScript along with its benchmark since it is
no longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:38 -06:00
Dave Collins
cc494923d4
txscript: Remove unused extractCompressedPubKey.
This removes extractCompressedPubKey since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:37 -06:00
Dave Collins
8565a3b356
txscript: Remove unused extractUncompressedPubKey.
This removes extractUncompressedPubKey since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:37 -06:00
Dave Collins
838adbc717
txscript: Remove unused extractPubKey.
This removes extractPubKey since it is no longer used by anything in the
package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:36 -06:00
Dave Collins
78ebc66740
txscript: Remove unused isPubKeyScript.
This removes isPubKeyScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:35 -06:00
Dave Collins
9e754a3ad1
txscript: Remove unused extractPubKeyAltDetails.
This removes extractPubKeyAltDetails since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:34 -06:00
Dave Collins
2903b61051
txscript: Remove unused isPubKeyAltScript.
This removes isPubKeyAltScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:33 -06:00
Dave Collins
7cb5314b44
txscript: Remove unused extractPubKeyHash.
This removes extractPubKeyHash since it is no longer used by anything in
the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:31 -06:00
Dave Collins
d96ae229b4
txscript: Remove unused isNullDataScript.
This removes isNullDataScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:30 -06:00
Dave Collins
556b21e8db
txscript: Remove unused extractStakePubKeyHash.
This removes extractStakePubKeyHash since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:29 -06:00
Dave Collins
af5329ffb0
txscript: Remove unused extractStakeScriptHash.
This removes extractStakeScriptHash since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:28 -06:00
Dave Collins
c508b538d2
txscript: Remove unused isStakeSubmissionScript.
This removes isStakeSubmissionScript along with its benchmark since it
is no longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:28 -06:00
Dave Collins
89421e5d67
txscript: Remove unused isStakeGenScript.
This removes isStakeGenScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:27 -06:00
Dave Collins
695077bdd2
txscript: Remove unused isStakeRevocationScript.
This removes isStakeRevocationScript along with its benchmark since it
is no longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:27 -06:00
Dave Collins
8fac63e2bf
txscript: Remove unused isPubKeyHashScript.
This removes isPubKeyHashScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:26 -06:00
Dave Collins
cfebbab0de
txscript: Remove unused isStakeChangeScript.
This removes isStakeChangeScript along with its benchmark since it is no
longer used by anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:26 -06:00
Dave Collins
abdf57c628
txscript: Remove unused extractMultisigScriptDetails.
This removes extractMultisigScriptDetails since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:25 -06:00
Dave Collins
d4e3a1624b
txscript: Remove unused isTreasuryAddScript.
This removes isTreasuryAddScript since it is no longer used by anything
in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:24 -06:00
Dave Collins
6114d62e30
txscript: Remove unused pubKeyHashToAddrs.
This removes pubKeyHashToAddrs since it is no longer used by anything in
the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:24 -06:00
Dave Collins
67b9252425
txscript: Remove unused scriptHashToAddrs.
This removes scriptHashToAddrs since it is no longer used by anything in
the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:23 -06:00
Dave Collins
611a7e2a99
txscript: Remove unused ExtractPkScriptAddrs.
This removes ExtractPkScriptAddrs and its associated tests, benchmarks,
and example since it is no longer used by anything in the repository
and is now available via stdscript.ExtractAddrs.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:23 -06:00
Dave Collins
4d09bcb68e
txscript: Remove unused isMultisigScript.
This removes isMultisigScript since it is no longer used by anything in
the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:22 -06:00
Dave Collins
54734a711c
txscript: Remove unused isTreasurySpendScript.
This removes isTreasurySpendScript since it is no longer used by
anything in the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:21 -06:00
Dave Collins
64b0d981ee
txscript: Remove unused typeOfScript.
This removes typeOfScript since it is no longer used by anything in
the package.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:21 -06:00
Dave Collins
828267450c
txscript: Remove unused GetStakeOutSubclass.
This removes GetScriptClass since it is no longer used by anything in
the repository and is also no longer needed since the relevant
information is now available via the more fine grained script types
of stdscript.DetermineScriptType.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:20 -06:00
Dave Collins
526f3488cb
txscript: Remove unused GetScriptClass.
This removes GetScriptClass and its associated tests and benchmarks
since it is no longer used by anything in the repository and is now
available via stdscript.DetermineScriptType.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:20 -06:00
Dave Collins
58ada7c61b
txscript: Remove unused ExtractPkScriptAltSigType.
This removes ExtractPkScriptAltSigType and its associated benchmark
since it is no longer used by anything in the repository and is now
available via stdscript.ExtractPubKeyAltDetailsV0 or
stdscript.ExtractPubKeyHashAltDetailsV0 although it typically is no
longer needed since stdscript has more fine-grained script types.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:19 -06:00
Dave Collins
99c2598733
txscript: Remove unused IsMultisigSigScript.
This removes IsMultisigSigScript and its associated benchmarks since it
is no longer used by anything in the repository and is now available via
stdscript.IsMultiSigSigScript.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:18 -06:00
Dave Collins
b1c0669ae5
txscript: Remove unused IsMultisigScript.
This removes IsMultisigScript and its associated benchmarks since it is
no longer used by anything in the repository and is now available via
stdscript.IsMultiSigScript.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:17 -06:00
Dave Collins
b16fafaee8
txscript: Remove unused CalcMultiSigStats.
This removes CalcMultiSigStats and its associated tests and benchmark
since it is no longer used by anything in the repository and is now
available via stdscript.ExtractMultiSigScriptDetailsV0.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:16 -06:00
Dave Collins
53f79fb335
txscript: Remove unused MultisigRedeemScript.
This removes MultisigRedeemScriptFromScriptSig and its associated
benchmark since it is no longer used by anything in the repository and
is now available via stdscript.MultiSigRedeemScriptFromScriptSigV0.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:16 -06:00
Dave Collins
f5d0d057dd
txscript: Remove unused MultiSigScript.
This removes MultiSigScript and its associated tests since it is no
longer used by anything in the repository and is now available via
stdscript.MultiSigScript.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:15 -06:00
Dave Collins
448f6c3f0d
txscript: Remove unused GenerateProvablyPruneableOut.
This removes GenerateProvablyPruneableOut and its associated tests since
it is no longer used by anything in the repository and is now available
via stdscript.ProvablyPruneableScriptV0.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:14 -06:00
Dave Collins
35202b1c07
txscript: Remove deprecated ExtractAtomicSwapDataPushes.
This removes ExtractAtomicSwapDataPushes and its related
AtomicSwapDataPushes struct along with all of its tests and benchmarks
since it is deprecated and is now available via stdscript.

This is part of a series of commits to remove all code related to
standard scripts from txscript.
2021-11-18 12:55:13 -06:00
Dave Collins
5eeabb2474
txscript/sign: Remove unused trsy enabled params.
This removes the flag for specifying whether or not the treasury is
enabled from the methods that no longer require it.
2021-11-18 12:55:12 -06:00
Dave Collins
a17ccf5afc
txscript/sign: Convert to use stdscript.
This converts the txscript/sign package to use the stdscript package
instead of txscript.

This is part of a series of commits to convert all packages in the
repository to make use of the new stdscript package.
2021-11-18 12:55:11 -06:00
Dave Collins
7d97fd5ff8
stdscript: Move from internal/staging to txscript.
This moves the new stdscript package from the internal staging area to
the txscript module and updates the relevant paths and package README.md
accordingly.
2021-11-18 12:29:53 -06:00