bitcoin-util evalscript subcommand#58
Merged
ajtowns merged 6 commits intobitcoin-inquisition:27.xfrom May 17, 2024
Merged
Conversation
9441cd1 to
c171271
Compare
Author
|
I think the signature checking is usable now: $ ./bitcoin-util --sigversion=tapscript \
--tx=02000000000101d1b5f18e8dcbaaa382b398a578f968e69fd72176768ccd4649a06491beb713310000000000e0070000012c4c000000000000225120fb4ea97f00be442dac392022a0c6b813f01881aa2fc006aaa225495365af68f30340ec3517b63e035c22f3659bfd30b9f440049b697a8d1cb8ef721658d683fa66c6c3f598d25682381c43fba7c94b5f994537041960d0c0e8c596fdcc1170b241c826201bd43c4c240e0244871afe0650bdbedb13780a9d0644c4aa2398f46f20f46130ad02e007b261c050929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0614534a82971ff9ddda889c53b1e2ec43baa9db27da7d6c49b4121c18756c28dcc2dea9ee4098432b2c61221c4bfbc793f5ecdd2d42d3544a0146ae693c5493d00000000 \
--input=0 \
--spent_output=204e000000000000225120bc2d293f6482e242e12330379bb255f9f2f853a25ec19ed40f54a149c3af6315 \
--ipk=50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0 \
--script_flags=STANDARD \
evalscript \
'0x201bd43c4c240e0244871afe0650bdbedb13780a9d0644c4aa2398f46f20f46130 OP_CHECKSIGVERIFY 2016 OP_CHECKSEQUENCEVERIFY' \
'ec3517b63e035c22f3659bfd30b9f440049b697a8d1cb8ef721658d683fa66c6c3f598d25682381c43fba7c94b5f994537041960d0c0e8c596fdcc1170b241c8' {
"script": {
"asm": "1bd43c4c240e0244871afe0650bdbedb13780a9d0644c4aa2398f46f20f46130 OP_CHECKSIGVERIFY 2016 OP_CHECKSEQUENCEVERIFY",
"hex": "201bd43c4c240e0244871afe0650bdbedb13780a9d0644c4aa2398f46f20f46130ad02e007b2",
"type": "nonstandard"
},
"sigversion": "tapscript",
"script_flags": [
"ANYPREVOUT",
"CHECKLOCKTIMEVERIFY",
"CHECKSEQUENCEVERIFY",
"CLEANSTACK",
"CONST_SCRIPTCODE",
"DEFAULT_CHECK_TEMPLATE_VERIFY_HASH",
"DERSIG",
"DISCOURAGE_OP_SUCCESS",
"DISCOURAGE_UPGRADABLE_CHECK_TEMPLATE_VERIFY_HASH",
"DISCOURAGE_UPGRADABLE_NOPS",
"DISCOURAGE_UPGRADABLE_PUBKEYTYPE",
"DISCOURAGE_UPGRADABLE_TAPROOT_VERSION",
"DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",
"LOW_S",
"MINIMALDATA",
"MINIMALIF",
"NULLDUMMY",
"NULLFAIL",
"OP_CAT",
"P2SH",
"STRICTENC",
"TAPROOT",
"WITNESS",
"WITNESS_PUBKEYTYPE"
],
"stack-after": [
"e007"
],
"sigop-count": 0,
"success": true
}(Taken from tx 928f9e4c445d2f67d44a29600bf48616aa16797e9d0b8a9ef81532358a6211e7 on signet) |
Author
|
CHECKSIG doesn't work if you don't specify the various options, and CSV/CLTV don't work unless you specify a tx that actually satisfies the constraints. Might be good to grab the EDIT: now done |
d83bad9 to
8c1bda8
Compare
This file contains hidden or 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
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.
Introduces an
evalscriptsubcommand for bitcoin-util that evaluates a script directly.Relies on upstream PRs bitcoin#28802 and bitcoin#28806.
Example:
Provides
--sigversion(base,witness_v0ortapscript) to select different script versions, and--script_flagsto enable the various script flags, eg: