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
At the moment ScriptBuilder tries to match scripts by running their verify() method, which in turn tries to both match a script template and return the pushed values (e.g. public key hash, script hash and so on). It would be useful to have a faster way to match script types, for instance having scripts declare fast matching conditions (e.g. P2SH must start with HASH160, followed by a 20-byte push operation, followed by EQUAL) to be used for template matching and verify() logics can be used to return the pushed data once the fast matching succeeds.
To be clear, an example of P2SH efficient matching might be:
At the moment
ScriptBuilder
tries to match scripts by running theirverify()
method, which in turn tries to both match a script template and return the pushed values (e.g. public key hash, script hash and so on). It would be useful to have a faster way to match script types, for instance having scripts declare fast matching conditions (e.g. P2SH must start withHASH160
, followed by a 20-byte push operation, followed byEQUAL
) to be used for template matching andverify()
logics can be used to return the pushed data once the fast matching succeeds.To be clear, an example of P2SH efficient matching might be:
The text was updated successfully, but these errors were encountered: