im thinking an operator like OP VIRTUALSCRIPT where the stack is [virtual script bytecode] [byte number of stack items to take] then N byte arrays
it would initialize and execute a given script with the specified stack. then pushes the (boolean result / resulting stack / both?) back onto the real stack
I cant think of anything useful to do with this immediately but it would be cool. I can imagine an unlocking script providing a locking script with a virtual script which it executes to determine validity, able to have stack elements from either parent script.
I can't see any immediate vulnerabilities this would introduce besides increasing the overall cpu usage of the network but script validation is probably a minimal effort anyways given the overall script length limit
im thinking an operator like OP VIRTUALSCRIPT where the stack is [virtual script bytecode] [byte number of stack items to take] then N byte arrays it would initialize and execute a given script with the specified stack. then pushes the (boolean result / resulting stack / both?) back onto the real stack
I cant think of anything useful to do with this immediately but it would be cool. I can imagine an unlocking script providing a locking script with a virtual script which it executes to determine validity, able to have stack elements from either parent script.
I can't see any immediate vulnerabilities this would introduce besides increasing the overall cpu usage of the network but script validation is probably a minimal effort anyways given the overall script length limit