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
1
vote
0answers
167 views

Nonstandard script - TX rejected

I am experimenting in testnet with nonstandard scripts. There was a transaction, created by me, with the following vout script: OP_HASH256 ...
1
vote
1answer
142 views

scriptPubKey consisting of the only hash

I found out that some transactions have strange scriptPubKey in their outs. They only contain a hash and nothing more. An example can be seen in JSON-view of block 200639: { "value":"0.00000000", ...
1
vote
1answer
79 views

How do you publish a transaction which is cancelled if not claimed by a given time?

How do you publish a transaction which is cancelled if some output is not claimed by a given time? (ie returning all the spent coins to their inputs or else creating new conditions under which they ...
10
votes
1answer
1k views

Turing completeness of Bitcoin Script

For me, scripts are one of the most interesting features of Bitcoin. They provide possibilities which have no equivalent in classical currencies. However, the wiki states It is purposefully not ...
-1
votes
1answer
161 views

Can someone create a very complex transaction to try to fork the network?

If contracts are built into the code already, what is to stop someone from creating a transaction script that is very cpu intensive to verify, so that some computers accept the block with it and ...
0
votes
1answer
216 views

There was a transaction spendable only by someone who provided the double hash of the genesis block. How was that transaction created?

I can't find it anywhere, but I remember reading about a transaction that was spendable only by someone who provided the double hash of the genesis block. Was it simply that the private key of an ...
3
votes
1answer
3k views

Public Key / Private Key Generation in a bash script (osx / ubuntu)

I am creating a bash script (that I will happily share on github when done) that takes random public and private keys for bitcoin and then bottles them up in an AES encrypted container and then SSSS ...
0
votes
0answers
2k views

All of a sudden hashrate drops to half the normal

I usually get a nice 200 Mh/s out of my XFX 6770 clocked at 950 MHz / 300 MHz. Sometimes I'll check cgminer and see the hashrate has dropped to around 90Mh/s while temperature of the GPU dropped to a ...
2
votes
1answer
801 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?
6
votes
3answers
1k 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 (...
9
votes
1answer
3k 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 ...
2
votes
1answer
186 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)?
3
votes
1answer
268 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 ...
5
votes
1answer
653 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 ...
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 ...
0
votes
2answers
335 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 possible:...
4
votes
1answer
345 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 ...
3
votes
1answer
218 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 ...
4
votes
1answer
604 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
849 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
317 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
870 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 ...
5
votes
1answer
353 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
791 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
118 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
224 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
4k 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
597 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 ...
21
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?

1
5 6 7 8
9