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
2answers
32 views

Online Bitcoin Script simulator or debugger?

Is there an online simulator that would allow me to step through, debug, or simulate the execution of a Bitcoin script?
3
votes
1answer
104 views

Is Ethereum essentially Bitcoin with Turing-complete Script?

Is Ethereum essentially Bitcoin with a Turing-complete scripting language and, if I understand correctly, where the script to be executed (not its hash) is placed in the Ethereum blockchain? If so, ...
0
votes
0answers
11 views

Creation of P2SH MultiSig Input Script

In the createP2SHMultiSigInputScript() function of BitcoinJ according to this: public static Script createP2SHMultiSigInputScript(@NullableList signatures,Script multisigProgram) Create a program ...
2
votes
0answers
31 views

Any Innovations in altcoin tech for Bitcoin’s Script language?

Bitcoin’s Script is the forth-like, non-Turing complete language used for transactions. However, in practice, a very limited number of kinds of scripts are allowed, a number of opcodes have been ...
3
votes
2answers
56 views

Can contracts programmed in bitcoins be used to scam merchants?

I've been learning a lot about bitcoin over the past couple of weeks because I have some interesting ideas for websites and I would like to accept bitcoin as payment. One of my concerns centers ...
3
votes
1answer
194 views

OP_SHA256 mismatch!

I am new to bitcoin. When I use this online 'Script Execution' site, to calculate the SHA256 hash of 1, I get 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a but using any other ...
1
vote
1answer
67 views

CHECKSIG description from the wiki

I have been using the Bitcoin Wiki to know more about the CHECKSIG, and the graphic which is shown there. This question will be rather long, but it would already help me a lot if you could just read ...
1
vote
0answers
128 views

(Bither) how can i send my bitcoins?

i downloaded Bither as my virtual wallet and added bitcoins in a Hot Wallet Address. But when i try to send bitcoins, i can't. i fill the address, the amount of bitcoins and i type my password but ...
3
votes
2answers
183 views

Why is OP_CHECKLOCKTIMEVERIFY disabled by maximum sequence number?

In the code for OP_CHECKLOCKTIMEVERIFY i noticed that if the txin sequence number is maxxed out then the script will fail to validate. I'm wondering what the point of this is? Why would anybody ever ...
1
vote
2answers
71 views

CHECKMULTISIG a worked out example

I was wondering if somebody could point me to or give me a worked out example of how OP_CHECKMULTISIG works behind the curtains? I expect that CHECKMULTISIG will call the CHECKSIG function and ...
0
votes
1answer
33 views

How does the scriptPubKey for this test vector work?

The scriptPubKey for cbebc4da731e8995fe97f6fadcd731b36ad40e5ecb31e38e904f6e5982fa09f7 is: ...
1
vote
2answers
75 views

Where is the code making OP_RETURN a standard transaction type?

I am looking through the bitcoin github history. I am trying to find the commit where OP_RETURN became accepted as a standard tx. This was included in the changelog for Bitcoin Core 0.90. Any help ...
6
votes
4answers
112 views

What's the point of having a stack-based scripting language, if only a few standard forms are allowed?

What is the purpose of a stackmachine if only some standard script forms are allowed? And why are some scripts allowed and perfectly fine in mined blocks but rejected by clients if found in ...
1
vote
1answer
104 views

Constructing, signing, and pushing a Bitcoin transaction by using pybitcointools with Python

I'm utilizing the pybitcointools module in python 3.4 I've went through time and time again in the examples listed on the github page, but it isn't documented very well nor is the code. My situation ...
2
votes
1answer
46 views

How is time encoded (BIP65) in scripts?

BIP65 has several examples where OP_CHECKLOCKTIMEVERIFY interprets the time value underneath it in the stack, for example: <expiry time> CHECKLOCKTIMEVERIFY DROP DUP HASH160 <pubKeyHash> ...
1
vote
1answer
597 views

OP_CHECKSIG signature hash type 0

On the Bitcoin Wiki's OP_CHECKSIG documentation: Firstly always this (the default) procedure is applied: the public key and the signature are popped from the stack, in that order. If the ...
0
votes
0answers
63 views

Bitcoin script stack numbers format

On bitcoin wiki site I cant found this specification: *The stacks hold byte vectors. When used as numbers, byte vectors are interpreted as little-endian variable-length integers with the most ...
3
votes
2answers
96 views

When can I send 80 byte OP_Returns?

I heard bitcoin-core 0.11 allows 80 byte OP_Returns, but I know miners operate different implementations and was wondering when it would be likely that 80 byte OP_Returns will be swiftly included in ...
3
votes
1answer
122 views

Does an OP_RETURN script always need another output within the transaction?

I was reading this: Explanation of what an OP_RETURN transaction looks like and I wondered if the second output "value" : 0.00200000, was at all necessary. Can I just have a OP_RETURN with a 0 output ...
3
votes
2answers
112 views

Compact integer in Scripts

I've been looking at the compact representation of integers for integer operations in the Script language. It seems that most operations produce or push byte arrays, but when integer operations are ...
2
votes
1answer
45 views

Maximum number of op_codes in script

Is there any part of the Bitcoin protocol that established a limit on the maximum number of op_codes in a script. Recently I have hit the limit for the bitcoin core client. In: ...
1
vote
1answer
40 views

Script. OP_PICK/OP_ROLL

OP_PICK should take the nth element from the back of the stack and take it on top: for input xn ... x2 x1 x0 gives xn ... x2 x1 x0 xn I have used it in some scripts, but I've noticed some strange ...
1
vote
2answers
75 views

txout script criteria (scriptpubkey critieria)

what is the criteria for a txout script to be accepted into a mined block? is there any criteria at all? the reason i ask is that OP_RETURN is regularly used in txout scripts yet it is not spendable: ...
5
votes
3answers
256 views

Are loans with enforced repayment possible on the blockchain?

Are loans with interest possible in Bitcoin, such that repayment is enforceably encoded with Bitcoin Script on the blockchain from the establishment of the lending contract?
1
vote
1answer
81 views

How do I print unspent transaction outputs of an address using pybitcointools

I am a beginner looking to write a simple program that takes an input (address) and prints the unspent amount in it. I copied some code from chapter 4 of Mastering Bitcoin to generate a random ...
2
votes
2answers
126 views

OP_HASH256 of a negative number

transaction 9 in block 251684 spends transaction 25 of block 249957. the script to be evaluated here is: OP_PUSHDATA0(20) 16cfb9bc7654ef1d7723e5c2722fc0c3d505045e OP_SIZE OP_DUP OP_TRUE ...
7
votes
1answer
105 views

Which release fixed CVE-2010-5141 (attacker can spend any coin)

This post by Mike Hearn relates an interesting bit of history: When Bitcoin was first released, it contained two completely fatal bugs that made the entire system worthless. Fortunately, they were ...
0
votes
1answer
30 views

Can a transaction be conditioned on signing another transaction?

I was thinking around http://lightning.network/ . My problem is Alice sending coins to Bob via Eve: A -- tx1 -> E -- tx2 -> B Is there a way to condition tx1 on Eve signing tx2?
3
votes
1answer
49 views

What are these strange outputs in the Litecoin blockchain?

I have found that there are some strange outputs in the Litecoin blockchain that pay small amounts to the scriptPubKey 736372697074. In ASCII, this translates to "script", reminding me of how nodes ...
2
votes
1answer
49 views

Is it possible to copy other scriptSig for using in different transaction?

To use a UTXO one must supply correct scriptSig or "unlocking script" to the given scriptPubKey "lock script", I know the scriptSig in PTPKH locking is sig and pubkey. My question is what makes the ...
1
vote
2answers
43 views

Does value 'True' at the middle of stack is valid transaction?

If at the middle of the execution of scriptSig + scriptPubKey we get the value 'True', while there are remaining values or operators in the stack, is the transaction valid? Or should the stack be ...
2
votes
1answer
85 views

Without using something like Bitcoin Script, how NEM verify the transaction?

From NEM's thread in bitcointalk, it mentions: NEM doesn’t use so-called “scripts” aka predicates. I understand how Bitcoin use the script to verify the transaction. May I know where I can read ...
0
votes
1answer
34 views

Does OP_EQUALVERIFY have a return value?

The Bitcoin wiki has a page that summarizes OP_EQUAL and OP_EQUALVERIFY: OP_EQUAL Opcode (Hex): 135 (0x87) Input: x1 x2 Output: True / false Summary: Returns 1 if the ...
3
votes
0answers
119 views

Working example of raw transaction utilising Boolean (OP_IF, OP_ENDIF) scripting REQUIRED

I recently posted this Testnet TX (TxID 2d0daa01da8294a54178f8111eb2a02010c425fd15957d8baee8717edcfbe105) which successfully spends an output (TxID ...
1
vote
2answers
58 views

Specific instance of Tx using a malformed null byte vector for P2SH; insight req

From Biteasy's API for TXID fccf964964c34994e5dbbb9ff7f914159b524b0831f6eea12255aa424b39090e we can see the following info regarding inputs (for a P2SH Tx): "script_sig_string": "[] ...
1
vote
2answers
178 views

bitcoin script for a competitive crowdfunding-like contract

I'm curious about how one might replicate the functionality of http://whatbitcointhinks.com/ using bitcoin script. The functionality is that there's a sort of crowdfunding competition between two ...
3
votes
2answers
196 views

Non standard Tx with obscure OP codes: examples

I've been writing Python code to fetch various transactions and came across this: 77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69. The script field is as follows: scriptPubKey: ...
4
votes
2answers
205 views

Is there a maximum size of a scriptSig/scriptPubKey?

Previous research: Transaction's maximum size What is the maximum size of a transaction? The maximum size of a standard transaction is 100k bytes. Are there any consensus rules that prohibit ...
1
vote
1answer
78 views

Does createrawtransction accept scriptPubKey and redeemScript as inputs?

According to the built-in RPC documentation the signature for createrawtransaction is: createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}. Gavin in his example on 2-of-3 ...
3
votes
2answers
156 views

Which bitcoin script forms should be detected when tracking wallet balance?

I am implementing a library for tracking wallet balance of given bitcoin addresses. How should the transaction output script be parsed to find if the output belongs to the given address? Is it dirty ...
4
votes
1answer
157 views

What is OP_CODESEPARATOR used for?

Looking at the bitcoin source (https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/script.cpp#L843-L847, specifically), I ran into the the use of the OP_CODESEPARATOR. Am I right in interpreting this ...
2
votes
1answer
114 views

Multisignature: what happens if the number of signatures exceeds the “threshold” number of public keys?

Let's say a coin has been locked with a 2-of-3 challenge script. In other words, spending the coin requires two signatures, each of which matches one of three designated public keys. Now I try to ...
1
vote
1answer
196 views

Redeem bitcoins of non-standard transactions made with eligius

As I understand it, Eligius is the only miner pool accepting non-standard transactions. The Opcodes for the scripts are here. Some use cases for non-standard transactions can be found here. My ...
4
votes
2answers
274 views

Is there any way to make an UTXO that cannot be spent until a certain block #?

In bitcoin, each transaction has an nLockTime integer to specify the earliest allowed block number/time that the transaction can be added to the blockchain. In addition, each transaction input has an ...
2
votes
1answer
165 views

Why does the default miner implementation use pay-to-pubkey?

Looking at the v0.9.3 source in miner.cpp: CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; ...
1
vote
1answer
136 views

how to get one address from two public keys?

Parsing an input script of a transaction, I’ve come across two public keys in the script. Either public key is 33 byte long. I know how to transform a single 33 byte long public into an address. ...
1
vote
2answers
118 views

Can new OP codes be added with a soft fork?

I understand that P2SH transaction types were added "softly" by repurposing a Tx message that is already valid, so old nodes won't reject them in blocks. Is there a similar method to adding new ...
4
votes
2answers
151 views

Bitcoind transaction data verification

I find myself a victim of either my poor googling skills, or the lack of detail in the bitcoind docs. I have a walletNotify script running on a full node that whenever a transaction to / from my ...
0
votes
1answer
68 views

Why is the scriptPubKey required when using signrawtransaction?

The signrawtransaction rpc method calls for the following use: signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype ...
5
votes
1answer
204 views

What is the alt stack?

I noticed in the bitcoin wiki script page (https://en.bitcoin.it/wiki/Script) that there were two opcodes named: OP_TOALTSTACK OP_FROMALTSTACK It looks like there is another stack that can be used ...