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

1
vote
1answer
12 views

Arithmetic operations in Bitcoin (OP_ADD, etc)

How do arithmetic operations work in Bitcoin? If I have: 5 OP_1ADD it is obvious that I will get 6 on stack. But what if I have to make OP_1ADD on ...
2
votes
2answers
30 views

Are there examples of scripthash transactions in the blockchain that do not use MultiSig destinations?

BIP 16 uses an example of a one signature required transaction as a scripthash example: scriptSig: [signature] {[pubkey] OP_CHECKSIG} scriptPubKey: OP_HASH160 [20-byte-hash of {[pubkey] OP_CHECKSIG} ...
1
vote
1answer
21 views

Question about script

I was reading that paper http://bitcoinhistory.net/Technical_Papers/ProgrammingBitcoinTransactionScripts.pdf and I have the following question. ScriptPubKey accompanies a transaction output and ...
2
votes
1answer
28 views

What new transactions are possible with 15 operations?

Today Gavin tweeted that he's relaxing the IsStandard rules for pay-to-script-hash transactions to allow any transaction with 15 or less operations. (Full git commit here) When this is merged and ...
1
vote
3answers
43 views

How to get value of script?

I would like to count script step by step, but I have problem with it. For example, I have such transaction: { "locktime": 0, "txid": ...
2
votes
1answer
34 views

Problem with value after OP_HASH160

I am trying to implement JavaScript interpreter for Bitcoin scripts, but I have problem with counting value of OP_HASH160. I found that Hash160(x) = RIPEMD160(SHA256(x)) However, when I try to count ...
1
vote
1answer
29 views

What happens when a transaction script for mining is used for fund transfer?

So, through an odd bug in hacking some stuff onto Bitcoin, I encountered a peculiar thing. Basically, I managed to generate an transaction with 2 outputs. The first output was a typical txout DUP ...
7
votes
3answers
127 views

The Bitcoin scripting system is purposefully not Turing-complete - why?

Can somebody explain to me why the Bitcoin scripting system is purposefully not Turing-complete? To make malicious programs difficult to develop (I guess)? Or because it was difficult to make it ...
2
votes
2answers
72 views

Can Bitcoin scripting be used for double spending attacks?

A standard Bitcoin transaction deposits coins into an address and then, using Bitcoin's scripting language, states that whoever wants to spend this output must be in possess of the private key ...
0
votes
1answer
33 views

What is the format of the standard claim script?

With reference to this: https://en.bitcoin.it/wiki/Transactions#Pay-to-PubkeyHash It would seem the claim script is simply the signature consisting of S and R and the public key. However I know at ...
0
votes
1answer
49 views

Conditional scripting: how does OP_NOTIF (and OP_IF) operation(s) affect the stack?

I'm trying to write a scriptPubKey for a transaction which checks that the hash of the top value in the scriptSig is equal to either one of two fixed values and if so will do the normal transaction ...
0
votes
0answers
93 views

VPS server mine LTC: can Cairo graphics perhaps replace a GPU using a TcL script?

My name is Ben and I'm working with a server technician called Fab. We are using Team-viewer to work together on this question to make it as concise and to the point as possible. We have set up a ...
4
votes
1answer
71 views

Is it possible (in some way or other) to expire a txout?

I read Contracts: Will this be possible? where part of the question related to expiring a transaction and one of the replies said that it would never be possible since it causes problems. ...
0
votes
1answer
70 views

How does Multi-Signature Pay 2 Script Hash (P2SH) enable stronger security?

Coinfloor says it will pay out withdrawals using Multi-Signature Pay 2 Script Hash. What is Multi-Signature Pay 2 Script Hash? I read What is "Script Hash" address exactly and how does it ...
3
votes
1answer
53 views

Is there any way to send an output to a script which can then only be sent to one of two addresses?

Is the following scenario possible? I want to send money to a script. This script will require knowing a private key to spend, as usual, but the script is only valid if the money is being sent to one ...
0
votes
1answer
28 views

What are some valid ways to obfuscate the scriptPubKey?

Is it possible to hide the balance of an address from standard clients who may be watching blockchain? I'm thinking about using script to modify the the key that is to be verified, but am having ...
2
votes
2answers
91 views

What node implementations and mining pools relay and process 'non-standard' scripts?

Which Bitcoin node implementations, if any, currently relay valid transactions that use so-called 'non-standard' scripts? What proportion of the network is made up of these implementations? What ...
1
vote
2answers
89 views

What if the execution time for an alt coin script exceeds the block time?

I don't know when and how often a script is executed, but it seems to me that there would be a problem if a single script (or a sum of all scripts in a block) exceeds the time it takes to be included ...
3
votes
2answers
285 views

How does ScriptPubKey know the public key of an Bitcoin address?

I am currently having a blonde moment. The ScriptPubKey provides a hashed version of the receivers public key. scriptPubKey OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG However, if I give ...
1
vote
3answers
69 views

Could the standard pay to address script be simpler? e.g. no compare of the HASH160?

What if I had a scriptPubKey of <pubKey>OP_CHECKSIG And an scriptSig of <sig> Question Would that work in the standard client? Why do we need to check the hash? The only ...
1
vote
1answer
86 views

Given that contracts can be formed in the blockchain using scripts, couldn't a contract include a mechanism for facilitating chargebacks? [duplicate]

While I understand that chargebacks, or the lack thereof are an important feature for encouraging merchants to adopt bitcoin, the reverse may be true for consumers. There is probably a balance to be ...
7
votes
3answers
165 views

Tx Malleability: Why is the Script not included in the Signed Hash?

Sipa lists sources of tx malleability here: https://gist.github.com/sipa/8907691 It is clear to me how a change in the signature itself or the signature formating leads to a different tx hash (1. ...
1
vote
1answer
203 views

CPU bottleneck and script mining?

Im planing to set up a small energy efficient mining rig, im planing to use a low power CPU/MOBO bundle, this is my favorite: Biostar A68I-350 (with 1 DIMM DDR3 4Gb) It takes only 18W TDP and has one ...
3
votes
1answer
95 views

Why is an invalid pubkey accepted in the blockchain?

while trying to understand the address validation process, I fell upon this block : https://blockchain.info/tx/3d29f43a3278281192943276049c15e5f0d8c7e75d4d99a4cd6693113a948f48 In the outputs, the ...
2
votes
1answer
473 views

How to fully decode a coinbase transaction?

After reading this What is the format of coinbase transaction? I was wondering about a few things. decoderawtransaction of a random Litecoin coinbase transaction: "coinbase" : ...
1
vote
2answers
94 views

Which scripts are currently considered standard and therefore actually propagated?

All I've learned about script so far is that while theoretically quite versatile (e.g. allowing multisignature transactions) most scripts are simply not propagated by the default client nodes, i.e. ...
0
votes
1answer
53 views

Tracking a specific Bitcoin to make it represent something else, which could then be traded without trust [duplicate]

Imagine if one could follow the movements of a specific Bitcoin (or fraction thereof) in the block chain. Then that would mean that I could make that specific Bitcoin represent something else, which ...
2
votes
3answers
311 views

Can Bitcoin incorporate the scripting protocols of Ethereum without a fork?

I am curious if the Bitcoin protocol can incorporate Turing complete scripting capabilities without forking the block chain. I ask this because I understand the ability to create contracts digitally ...
0
votes
1answer
106 views

Can the Bitcoin script make a Google search?

This very interesting CCN Money article states a script uses a data input such as a regular Google search to monitor real-world events that would automatically trigger disbursements or other ...
1
vote
1answer
111 views

Completely confused with mutisig address and scripts

I used the guide, how to make escrow from bitcoin console. Here are my transactions in testnet: tx1 tx2 I am confused about ScriptPublicKey in tx1: OP_HASH160 ...
1
vote
1answer
97 views

Script To Limit Transactions To Specific Wallets

I am trying to write a script that will allow the receiver of my coins to only spend them on two wallets I specify. After that check has been done I want to perform the usual verification that the ...
1
vote
0answers
56 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
2answers
236 views

How to decode very huge (!) raw transactions?

I'm parsing the blockchain to extract certain information I need for a script. One thing I do is parsing transactions. What I do is: getrawtransaction <tx> decoderawtransaction <rawtx> ...
5
votes
1answer
666 views

How do “Pay to Script Hash” transactions work?

BIP16 gives the following example to explain "Pay to Script Hash": scriptSig: [signature] {[pubkey] OP_CHECKSIG} scriptPubKey: OP_HASH160 [20-byte-hash of {[pubkey] OP_CHECKSIG} ] OP_EQUAL But I ...
2
votes
1answer
492 views

parsing bitcoin input and output addresses from scripts

can someone walk me through the process of combining script inputs and outputs to reveal the base58 encoded input and output addresses. take for example, block 728. this has two raw script inputs: ...
1
vote
1answer
92 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
votes
2answers
388 views

Off the shelf system for scrypt mining?

Being busy and now somewhat lazy I'm wondering if someone has a pointer to anyone selling off the shelf systems set up for scrypt mining? Eg. for LTC etc. Something with a single or dual 7950 or R9 ...
1
vote
1answer
53 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 ...
6
votes
1answer
884 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 ...
3
votes
1answer
117 views

What is opcode 252?

Writing my own blockchain parser, I have come across an unrecognized opcode in block number 142312. The relevant section of the transaction input is this: "in":[ { "prev_out":{ ...
-1
votes
1answer
133 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 ...
9
votes
1answer
855 views

How to create a transaction with a custom script?

Is there a step-by-step tutorial or any documentation covering how to create a transaction that is not a standard OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG? It seems very odd ...
2
votes
1answer
367 views

Does createrawtransaction have the ability to create a transaction with custom scripts?

Does createrawtransaction always use the following script? scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG scriptSig: <sig> <pubKey> If so, how do you ...
0
votes
1answer
165 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 ...
1
vote
1answer
759 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 ...
1
vote
0answers
49 views

How can I add recipient on bitcoind CLI

I know I can add recipients to a transaction on bitcoin-qt and I am looking for a similar way to do it on bitcoind CLI on linux and in bash script. I tried using createrawtransaction and multi-sig ...
2
votes
0answers
216 views

How to change donation address of p2pool

I am working on the fork of p2pool to a new coin, and it seems that the donation script in the original could only accept BTC, etc. How to change this script to a new address? It looks like something ...
0
votes
0answers
1k 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 ...
8
votes
2answers
907 views

How vulnerable is bitcoin to quantum algorithms? [duplicate]

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
453 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?