You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the MatchCustomColoredScript() gets this script, it should return true but now is false.
The current implementation checks whether the script matches with the pattern 0x21 <33bytes> OP_COLOR. However, this way can't recognize cases that having opcodes that have no side effect, between <33bytes> and OP_COLOR.
The text was updated successfully, but these errors were encountered:
rantan
changed the title
MatchCuctomColoredScript should much any valid script that has OP_COLOR
MatchCuctomColoredScript() should much any valid script that has OP_COLOR
Nov 17, 2020
To handle custom scripts like this can we change the current implementation of "standard" checks in Tapyrus to a stack based one:
Assuming that script flags SCRIPT_VERIFY_SIGPUSHONLY and SCRIPT_VERIFY_CLEANSTACK (now in tapyrus only SCRIPT_VERIFY_SIGPUSHONLY is set as standard) are set we can assume that script sig stack has only data not operators.
We can evaluate scriptpubkey on the stack in terms of push and pop stack operations only. The script evaluation will not be the same as verifyscript but will count the stack change after every operator. If at the end of the script the stack is empty as expected then the script can be assumed to be standard. Otherwise it can be non standard.
IF SIGPUSHONLY and CLEANSTACK are not set we will not use this method. But use solver as it is now.
This can be an entirely new set of classes for script changes. In the future we enhance it and make it a separate library for script verification.
like
If the
MatchCustomColoredScript()
gets this script, it should return true but now is false.The current implementation checks whether the script matches with the pattern
0x21 <33bytes> OP_COLOR
. However, this way can't recognize cases that having opcodes that have no side effect, between<33bytes>
andOP_COLOR
.The text was updated successfully, but these errors were encountered: