-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi: Convert to use new stdscript package. #2808
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davecgh
force-pushed
the
multi_use_stdscript
branch
3 times, most recently
from
November 16, 2021 04:25
893a3fc
to
2c458ce
Compare
matheusd
approved these changes
Nov 16, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commits tested fine other then the deadcode
lint errors.
dnldd
reviewed
Nov 16, 2021
davecgh
force-pushed
the
multi_use_stdscript
branch
2 times, most recently
from
November 17, 2021 00:38
9df804d
to
57b2d76
Compare
dnldd
approved these changes
Nov 17, 2021
rstaudt2
approved these changes
Nov 17, 2021
This converts the internal mining package to use the stdscript package instead of txscript when working with standard scripts. This is part of a series of commits to convert all packages in the repository to make use of the new stdscript package.
This converts the internal mempool package to use the stdscript package instead of txscript for working with standard scripts. This is part of a series of commits to convert all packages in the repository to make use of the new stdscript package.
This converts the chaingen 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.
davecgh
force-pushed
the
multi_use_stdscript
branch
from
November 18, 2021 18:34
57b2d76
to
8a9295a
Compare
This converts the blockchain 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.
This converts the blockchain/indexers 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.
This removes the flag for specifying whether or not the treasury is enabled from the methods that no longer require it.
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.
This removes the flag for specifying whether or not the treasury is enabled from the methods that no longer require it.
This converts the internal/rpcserver 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
davecgh
force-pushed
the
multi_use_stdscript
branch
from
November 18, 2021 18:57
8a9295a
to
67d1e95
Compare
I've updated the various |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires ~#2803, #2805, #2807, and #2810.NOTE: The variousgo.mod
files in the affected modules will need to be updated to use the latesttxscript
module once the aforementioned prerequisite PRs have landed to avoid issues for external consumers, however, this is otherwise ready for review.This converts all packages in the repository to make use of the new
stdscript
package for type determination, address extraction, and required signatures extraction instead of thetxscript
methods. It also removes the aforementionedtxscript
methods once they are no longer used.Since this involves modifications to a large number of packages in the repository, this PR is split into a series of individual commits such that everything builds and passes all tests (except some temporary unused code linter warnings) each step of the way. In order to achieve that goal, each commit updates a single package to use the new package. Finally, all of the unused methods and any associated tests, benchmarks, and examples are then removed one by one.
See each individual commit for more details about each individual change, but the following is a high level overview:
stdaddr
package:internal/mining
internal/mempool
blockchain/chaingen
blockchain/indexers
blockchain
txscript/sign
internal/rpcserver
txscript.ExtractAtomicSwapDataPushes
txscript.GenerateProvablyPruneableOut
txscript.MultiSigScript
txscript.MultisigRedeemScript
txscript.CalcMultiSigStats
txscript.IsMultisigScript
txscript.IsMultisigSigScript
txscript.ExtractPkScriptAltSigType
txscript.GetScriptClass
txscript.GetStakeOutSubclass
txscript.ExtractPkScriptAddrs
txscript.MaxDataCarrierSize
txscript.ScriptClass
txscript.ErrNotMultisigScript
txscript.ErrTooManyRequiredSigs
txscript.ErrTooMuchNullData