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
7
votes
3answers
5k 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 ...
7
votes
1answer
1k 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 ...
2
votes
1answer
195 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
111 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, ...
5
votes
1answer
982 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 ...
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
574 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 ...
9
votes
1answer
3k views

How would I hand code a Bitcoin transaction

Form the Bitcoin Wiki - Transactions I see a transaction has the following format. Input: Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6 Index: 0 scriptSig: ...
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?
7
votes
1answer
322 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 ...
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 ...