New answers tagged

0

I haven't tested it, but perhaps scripts using the alt stack (which IIRC is cleared with the split execution)?


2

A common scriptPubKey format, known as Pay-to-Public-Key-Hash (P2PKH), has the following form: OP_DUP OP_HASH160 <push of 20-byte public key hash> OP_EQUALVERIFY OP_CHECKSIG The hash of the public key is formed by ripemd-160(sha-256(compressed public key)). You can find the hex encoding of the opcodes here: https://en.bitcoin.it/wiki/Script The amount ...


0

This error was caused by the same issue (minimal encoding) as problem with unlocking P2WSH. The solution Andrew Chow gave me there worked for me here too.


1

The error you are encountering is the requirement for the minimal encoding of data. Specifically, your witness stack contains 0x00 for the number 0. However this is not the minimal encoding of 0. Rather the minimal encoding for 0 is an empty vector. So your transactions should actually be ...


1

In a coinbase transaction like the one you linked, the input scripts are mostly just not validated because nothing is being spent as is a special type of transaction only used by miners. It keeps the format of the transaction the same as all the others in the chain, though the scriptSig has almost no meaning and isn't expected to be parsable as a real script....


1

You can code the loop... for i=1 to 10 print "Hello #",i endfor ...as... print "Hello #1" print "Hello #2" print "Hello #3" print "Hello #4" print "Hello #5" print "Hello #6" print "Hello #7" print "Hello #8" print "Hello #9" print "Hello #10" ...


1

Loops (while loops) in this sense are meant as potentially infinite. For loops are not such loops. In other words, in what is here called for loop, one does know the number of iterations of the execution of the inner block of the loop WITHOUT inspecting the code of the inner block. In what is here called while loop this number of iterations is not known ...


0

I was the guy, who asked the other question. In my case the problem was, that the operations left a unclean stack, which is technically ok, since the stack is not empty. But if I am correct its a non-standard transacition and will not be relayed by nodes. In my case I had to finish with one element, which is not 0. And this was not possible in my script.


Top 50 recent answers are included