1

I found out that some transactions have strange scriptPubKey in their outs. They only contain a hash and nothing more. An example can be seen in JSON-view of block 200639:

{
    "value":"0.00000000",
    "scriptPubKey":"7ce73474ecef1936fca45fe7835cca09d1a24f52526c189ab40d371b5f69f4a3"
}

The transaction is valid as the stack will only contain this hash which is not empty and thus evaluates to true. This seems to be a way to save some data in transaction...

Does anyone know for what purpose such scripts may be used?

2

That's a transaction generated by p2pool. You assumed correctly in that it is designed to store data, it's used to store some metadata about the current state of the pool. In the future it would probably be better to use OP_DROP, as the output is provably unspendable and is able to be pruned from the mempool and blockchain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.