Bitcoin Forum

Other => Beginners & Help => Topic started by: inathermos on August 15, 2013, 10:28:33 PM



Title: Newbie scripting questions
Post by: inathermos on August 15, 2013, 10:28:33 PM
Hello bitcoin world,

I've been building a block chain parser with much help from Gavin Andresen's bitcointools, and I've been unable to find concrete answers for some questions about scripting.

I've noticed that the extract_public_key function in bitcointools' deserialize.py doesn't always successfully extract bitcoin addresses from scriptsigs and scriptpubkeys in the block chain.  Looking at the extract_public_key function, it extracts addresses by matching to standard transaction scripts documented on the wiki Script page (https://en.bitcoin.it/wiki/Script#Scripts) as well as some labeled with "BIP."  I assume the latter are associated with Bitcoin Improvement Proposals.  Furthermore, the list of protocol rules for "tx" messages (https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages) asserts that only standard scripts are acceptable, but amends itself in a footnote stating that it's not a hard requirement.

All of this begs a couple general questions:

*What scripts are allowed, and therefore possible to find, in the block chain?
*Is there an official, comprehensive list of allowable or common scripts?
*Is any script allowed to be written in a transaction output, thereby putting the responsibility on the output's author to make it redeemable at all?