-1

I am trying to learn bitcoin by writing a script that finds a balance of a set of addresses by scanning all raw transactions.

In the following link, the output at index 1 has no address and is marked as strange. What does that mean? Does it mean that the .1 testnet coin is destroyed?

http://blockexplorer.com/testnet/tx/c08053db370893765c88c93e2fe4db0aa8ebc02c70b2c91109a6081b06b5e060

3

It's just a script blockexplorer.com doesn't seem to understand and consequently marks as "strange". Bitcoin scripts determine who is able to claim the bitcoins. Transfering them to an address is just one of many possible options.

If the coins of a transaction A are spent in a transaction B two scripts are involved: The "ScriptPubKey" of transaction A and the "ScriptSig" of transaction B. The two scripts are combined and executed as a whole.

Normally, the scripts check if the spender can identify itself with a private key corresponding to the address specified in transaction A. But not in this case:

Have a look at the column ScriptPubKey: It says OP_WITHIN. This command checks if a number is in a given range. The transaction claiming these coins puts the arguments -1 -100 and 100 on the stack. Since -1 is between -100 and 100 the transaction is valid.

Obviously, this doesn't make much sense, but it's just a testnet transaction.

For more information about scripts have a look at this wiki page.

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.