scriptPubKey consisting of the only hash

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?

Dmitry

Posted 2013-12-08T22:30:50.267

Reputation: 111

Answers

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.

Anonymous

Posted 2013-12-08T22:30:50.267

Reputation: 1 330