Within the context of Bitcoin, scripts are a set of instructions on how to complete a transaction. The default send/receive actions are scripts but the protocol can be extended through the creation of new scripts, such as the DNS replacement abilities of NameCoin.

learn more… | top users | synonyms

3
votes
1answer
168 views

How vulnerable is bitcoin to quantum algorithms?

Assuming that quantum computers are implemented some time in the near-ish future, how vulnerable is Bitcoin to decryption via quantum algorithms? For example, Shor's algorithm enables a quantum ...
1
vote
1answer
88 views

An explanation of transaction scripts

https://en.bitcoin.it/wiki/Script I'm trying to wrap my mind around them. Could anyone provide a bit more intuitive understanding?
1
vote
2answers
53 views

Instant confirmations with pre-published, locked, transactions

(Clarification: This is not an attempt to solve the problem of a vendor taking the money and running without handing over the merchandise. Problems like that can't be solved without some third party. ...
0
votes
1answer
64 views

What is “Script Hash” address exactly and how does it work?

I found out this address playing with blockchain https://blockchain.info/address/3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8 I found out it's something called "scripthash". How does it work exactly? How does ...
0
votes
1answer
53 views

Signature in scriptSig

I'm a bit confused about the signature contained in the scriptSig of a transaction. My question is: what do we really sign? is it the hash of the previous transaction?
0
votes
1answer
70 views

How OP_EQUALVERIFY works in a standard transaction?

3 weeks ago I began learning about Bitcoins, and now I'm analyzing how it works internally. My problem is that I can't understand what two public key hashes are compare to use de OP_EQUALVERIFY, ...
2
votes
1answer
251 views

What is relation between scriptSig and scriptPubKey?

Scenario: A is sending 1 BTC to B. scriptSig appears in the Input Script. scriptSig = <sig> <pubKey> Here, public key is the Public Key of the sender, A. (this is the public key ...
4
votes
1answer
101 views

How is the Output script formed?

I read about Input and output scripts on the wiki here: https://en.bitcoin.it/wiki/Transactions Let's say, I use my Bitcoin - QT Program, I go to "Send Coins" tab, enter a Bitcoin Address, BTC ...
6
votes
3answers
492 views

Can I use single address for all my transactions?

Can I always use single public key (addr1) for all my transactions and when I spend every time protect it with different scripts / keys (key2, key3, etc.), so that spending requires at least two keys ...
2
votes
1answer
59 views

How do I list all unique scripts from blockchain?

How do I list all unique scripts in the block chain, and their count (n-times-used)?
2
votes
1answer
76 views

In Bitcoin scripting, can you have an IF within an IF?

In bitcoin, you can create a script like this: OP_1 OP_IF OP_RETURN OP_ENDIF But could you place another if statement inside the first? OP_1 OP_IF OP_1 OP_IF OP_RETURN OP_ENDIF OP_ENDIF I grant ...
1
vote
1answer
171 views

How can a Bitcoin Oracle ensure that the money can't be respent?

Suppose I modify the requirements of the Inheritance Scripting Sample where I need to make sure that the prior BTC is "guaranteed" to be available and not reduced or re-spent prior to either of the ...
1
vote
2answers
106 views

Is the scripting system an incalculable security risk?

Why does Bitcoin have a complicated scripting system? https://en.bitcoin.it/wiki/Script https://github.com/bitcoin/bitcoin/blob/master/src/script.cpp I guess because it makes fancy contracts ...
4
votes
1answer
183 views

Bitcoin charity fraud - is it illegal?

So we're all aware of services like CoinAd, but what if someone took advantage of that? Imagine if someone had a video game on facebook or something and had people fill out a CAPTCHA before they could ...
0
votes
1answer
60 views

How do I read a script? How does the processor separate “data” from “commands”?

I'm trying to understand how a script works but am having trouble reading a script (the output of one Tx... and the input of a second Tx) and figuring out how the computer (bitcoin-qt) knows which ...
1
vote
0answers
119 views

How should a Bitcoin Oracle verify a transaction prior to signing?

What are the specific parts of a transaction(s) that need to be signed in the "inheritance scripting sample". Specifically, can someone provide more detail on what exactly is signed of the ...
3
votes
2answers
141 views

Can I send message inside the transactions script?

I would like to send transactions with messages as described in the wiki. In Transaction with slightly changed script is never relayed, someone answered that non-standard transactions are not relaid ...
1
vote
1answer
56 views

Can someone explain this [outdated] BIP12 OP_EVAL exploit?

I understand that BIP12 was withdrawn, and probably because of this exploit below. Can someone explain how this attack would have worked and the effect it would have on the network? for (;;) { ...
3
votes
1answer
138 views

How is a Transaction ID generated & when does it change? (with a new sequence ID?)

I'm creating a non-mainstream client that processes and validates Bitcoin transactions and need to track transactions in my database. How is the TxID generated and when does it change? ...
3
votes
1answer
84 views

Are all the *coin networks consistent in which script actions are permitted and disabled?

The reference Bitcoin client disables several script commands (the programming within a transaction) due to possible implementation issues in the network. I think it's possible that a forked client ...
2
votes
3answers
130 views

Is there a listing of strange or unusual scripts found in transactions?

I'm studying scripts and am looking for strange or unusual scripts that have appeared in any of the *coin networks..(outside the standard ones listed on this page) Is any one person, or website ...
7
votes
2answers
208 views

Will general non-standard transactions ever be allowed?

To the best of my knowledge, currently "Satoshi" client relays and most pools accept only standard (transfer or generation) transactions. Besides, community is working on M-of-N transaction type. ...
3
votes
1answer
143 views

Password-based bitcoin transactions

I have been reading about the role of script in transactions and I gather it should be possible to do a Bitcoin transfer to a receiver who knows a password. Instead of checking an address, the script ...
3
votes
2answers
222 views

Bitcoin contracts. Are there good examples in the blockchain?

I have been checking the Bitcoin wiki for script and Bitcoin contracts and I have some doubts about advanced contracts. For instance, I have seen in many places references to password controlled ...
3
votes
3answers
258 views

How do you get the OP_HASH160 value from a bitcoin address?

I'm trying to sign a coinbase transaction. I know I need to use 76 A9 14 (HASH160) 88 AC but I don't understand how to create the HASH160 (20 byte) from a bitcoin address.
2
votes
2answers
173 views

What is the format of coinbase input scripts?

The input script of the coinbase transaction of block number 1 (right after the genesis block) looks like this: 04ffff001d010b How do I recognize this as a coinbase transaction? Do I simply know ...
1
vote
1answer
113 views

Can a scriptPubKey have multiple addresses?

When working directly with bitcoind, I can getRawTransaction for any transaction in the network. The vout has multiple outgoing addresses usually which contain a scriptPubKey. The scriptPubKey has a ...
4
votes
1answer
146 views

Did P2SH (BIP 16) get accepted?

Based on this, it seems like it did http://blockchain.info/p2sh but it seems I can't find a definitive answer.
6
votes
1answer
150 views

Transaction with slightly changed script is never relayed

I am playing with bitcoin transaction a bit now. I have a question. Normally, the output script looks like OP_DUP OP_HASH160 (hash) OP_EQUALVERIFY OP_CHECKSIG Now that is understandable. However, ...
4
votes
1answer
83 views

Why do some generation transactions use pubkey, instead of hash?

At BlockExplorer I can see that (edit: some) generation transactions use a pubkey in the script (<key> OP_CHECKSIG), while ordinary transactions use address/hash (OP_DUP OP_HASH160 <hash> ...
1
vote
3answers
112 views

Custom validation logic for transactions/ custom script extensions

Is it possible to add a hook for custom validation of transactions with a special script "tag" in them? If so, How? In essence, I want to add something similar in functionality to bitcoin script, but ...
3
votes
2answers
299 views

In which Block was Len Sassaman memorialised?

It has been mentioned a couple times here and there that Len Sassaman was memorialised somewhere in the Block Chain. I was able to find a dump of of the tribute to him, but I can't seem to find where ...
2
votes
1answer
54 views

What does script operation “OP_IFDUP” do?

According to the wiki page, OP_IFDUP will duplicate the top of the stack "if the input is true or false". It seems to me that everything is true or false when interpreted as a boolean. According to ...
4
votes
1answer
194 views

How did these 3 tx make it into a block in the main chain?

http://blockexplorer.com/block/000000000000051b42fd09195c75da7a084df7593f47ad18139cdc9cd83a112e The last three tx have a inputs with script_sig "1". This is invalid right? According to protocol ...
4
votes
2answers
176 views

Can Scripts be used to implement Chargebacks?

I went ahead and wrote this semi-detailed post about how to implement Chargebacks, when I hit my head and said "Doh, maybe this can just be implemented more cleanly with Scripts". So ... is there a ...
8
votes
3answers
238 views

Why is Script needed?

As I see it, the script feature is one of the most complicated features in the entire protocol. It features $ cat src/script.h|grep '^ *OP_'|wc -l 118 instructions, and requires a stack to ...
2
votes
1answer
101 views

Will any of the proposed Scripts (OP_XXX) allow subscription/recurring type payments?

Is it possible to implement a subscription/recurring payment type using Bitcoin scripts? For example, you could send a payment for a service where there is a monthly subscription say, and each month ...
3
votes
2answers
626 views

How to know if a transaction is valid?

I understand there are a couple things that need to be checked for a transaction to be valid - the previous transaction had to be correct, no OP can invalidate the transaction, etc, but is there a ...
2
votes
1answer
54 views

Script - OP_IF etc. clarifications

Description of the OP IF is a bit vague on the wiki. Where does one get statements for the op for? Are they coming from the stack, or from somewhere else? Are there any available examples of how a ...
1
vote
1answer
45 views

Script - OP_SIZE

Does the OP_SIZE operation in Script push one item onto the stack (length of the string), or two (string and its length)?
1
vote
1answer
68 views

Script - true and false values

In the Script, when one is checking whether a value is true of false, should the length of the expression be checked? For example, 0x01 is evaluated as true, but can the same be said about 0x0001, ...
2
votes
1answer
84 views

Script - OP_PUSHDATAs

When using OP_PUSHDATAs in different Scripts, how are the next bytes denoting the amount of bytes to be pushed encoded? Are they to be treated as unsigned integer, or signed (like the data that is ...
3
votes
1answer
408 views

Bitcoin script example

Is there some good example on how to process a basic tx's scriptsig and get the recipient's address from the raw transaction?
3
votes
1answer
129 views

How are transactions in discarded forks merged back into the blockchain?

It sounds like transactions in discarded blocks are propagated back to the network to be included in the next block to be generated, is that the case? If so, is that triggered in the client when it ...
11
votes
1answer
525 views

How do Scripts work?

Bitcoin protocol supports scripts. How do they work? How are those implemented? What are their intended usages? When are they planned to be used?
6
votes
1answer
133 views

How does a recipient know they can satisfy the transaction script to spend their bitcoins?

The wiki page on the transaction script says: The party who originally sent the Bitcoins now being spent, dictates the script operations that will occur last in order to release them for use in ...
15
votes
2answers
1k views

Useful alternative Bitcoin transaction scripts

The Bitcoin wiki describes a transaction's script as something that describes "how the next person wanting to spend the Bitcoins being transferred can gain access to them". The script for "a typical ...