A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [script]

This tag should be used for questions regarding Bitcoin transaction scripts or scripting languages used in transactions of altcoins such as Solidity. Scripts are a set of instructions on how to complete a transaction.

Filter by
Sorted by
Tagged with
4
votes
1answer
570 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 ...
2
votes
1answer
795 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 ...
5
votes
1answer
192 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> ...
2
votes
3answers
315 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
842 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
129 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 ...
5
votes
1answer
350 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 ...
10
votes
3answers
783 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 ...
5
votes
1answer
1k 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 ...
1
vote
1answer
112 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
202 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)?
7
votes
1answer
3k 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?
5
votes
1answer
577 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 ...
24
votes
2answers
4k 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 ...
20
votes
1answer
4k 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?