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
22 views

Does OP_HASH160 consume the top stack element?

In a standard P2PKH configuration, the scripts look like: Pubkey script: OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG Signature script: <sig> <pubkey> When ...
1
vote
1answer
16 views

How to denote <serialized> script in P2SH transaction?

From the bitcoin developer page, the format of the scripts used in P2SH transactions are as follows: Pubkey script: OP_HASH160 <Hash160(redeemScript)> OP_EQUAL Redeem script: <OP_2> ...
0
votes
2answers
33 views

How much binary data (bytes) could I put in a transaction and how?

I know that some people had put text, pdf and images in the blockchain. I wonder which are the limits in order to have a minimum "bytes/btc" value in regarding the blockchain as a permanent database. ...
1
vote
2answers
76 views

Multiple Addresses in one UTXO

The 'decoderawtransaction' RPC method of the Bitcoin-QT client gives a JSON object with an array of addresses in each UTXO. For example, when I run: decoderawtransaction ...
2
votes
1answer
87 views

Bitcoin payout based on real-life event

Just starting to learn bitcoin scripting. Can someone explain how to pay out based on some real-life event? I currently test from the command line with bitcoind -regtest
0
votes
2answers
58 views

How many OP_RETURN transactions in the Blockchain would be too many?

I realize this question may not have an answer and therefore might not be suitable for SE, but I'm very curious about OP_RETURN transactions. OP_RETURN transactions appear to be the accepted ...
0
votes
1answer
33 views

Why does the script contain the hash of the public key

The ScriptPubKey contains the hash of the public key, and this is compared to the public key in the ScriptSig. It is not possible to derive the public key from the hash (address). But when the output ...
2
votes
1answer
21 views

What are the requirements for a ScriptPubKey to be valid?

Can they have arbitrary scripts, as long as they are under a certain length?
8
votes
1answer
110 views

History behind the scripting language in Bitcoin?

What is the history of the current existing scripting language in Bitcoin? Satoshi's original whitepaper on Bitcoin makes no mention of a stack based scripting language. So who was the first person ...
1
vote
1answer
31 views

I cannot see the expected OP_CODE in transactions

According to different answers on this site the format of the standard TX claim script should be [OP_PUSH DER(R+S)+HashType OP_PUSH PubKey] The OP_PUSH code is 4C, 4D or 4E depending on push length. ...
2
votes
1answer
92 views

Explanation of what an OP_RETURN transaction looks like

How is OP_RETURN used and why was it introduced in the first place?
1
vote
1answer
33 views

Scripts within Scripts

I have read the following: https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki https://darkwallet.is/bip16-17 However, I would like to know, can one specify a pay-to-script hash that ...
1
vote
0answers
44 views

How to get bitcoin address from the pubkey_hash using bitcoin-abe or something else?

I'm using: https://github.com/bitcoin-abe/bitcoin-abe to import the blockchain into a mysql DB it is almost done after 5 days. So I started looking at the data and didn't see any addresses. I know the ...
1
vote
1answer
45 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
84 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
27 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
46 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
57 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
47 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
37 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 ...
8
votes
3answers
164 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
96 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
41 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
60 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
127 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
77 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. ...
1
vote
1answer
127 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
56 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
32 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
121 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
102 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 ...
4
votes
2answers
462 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
80 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
114 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
179 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. ...
3
votes
1answer
102 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
584 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" : ...
3
votes
2answers
108 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
54 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
333 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
110 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
125 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
103 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
66 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
284 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> ...
7
votes
1answer
883 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 ...
4
votes
1answer
646 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
97 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
390 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
55 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 ...