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

Question regarding the number of bytes in an OP_RETURN transaction

I was reading this very useful explanation of what an OP_RETURN transaction looks like and got tripped up by part of it. "hex" : "6a13636861726c6579206c6f766573206865696469" This first ...
0
votes
1answer
13 views

How is “bytes to push” distinguishable in the scriptPubKey?

Trying to parse scriptPubKeys and get the individual opcodes. My question is: How would you identify the "bytes to push" values? Here's an example of the typical scriptPubKey: 76 A9 ...
1
vote
0answers
18 views

A common criticism of Segregated Witness is that it is “unnecessarily complex”. Why is it chosen over alternatives?

Segregated Witness (SegWit) is well-along the way to being implemented and deployed as a soft-fork. Facts: SegWit eliminates most forms of transaction malleability. Discounts input scripts in ...
0
votes
0answers
12 views

how To mine Bitcoin With Server? [duplicate]

I have some server on hostinger. there is any software or script with that I can mine for with one time setting.... I tried for php script search in Google but can't find Sorry for my poor English Pls ...
5
votes
1answer
30 views

PUSHDATA4 unnecessary?

Any data push greater than 520 bytes in a Bitcoin transaction is not allowed (https://github.com/bitcoin/bitcoin/blob/v0.10.0rc3/src/script/script.h#L18). The opcode OP_PUSHDATA4 specifies, that the ...
1
vote
2answers
25 views

Save transaction space with economic Scripts

I have some questions regarding the programming of economic Scripts, so Scripts that save some transaction space compared to functionally the same Scripts but with redundancy by e.g. using the same ...
0
votes
1answer
17 views

P2SH (pay to script hash) within a script?

BIP16 P2SH defines special rules to apply on scripts with a specific pattern, namely: OP_HASH160 <scriptHash> OP_EQUAL. My question is: Can a P2SH be used within a script? So can I e.g. make a ...
2
votes
1answer
38 views

How is nSequence interpreted with CHECKSEQUENCEVERIFY?

I am trying to understand the implementation/specification of OP_CSV with BIP112 and BIP68. I understand the implication of the op-code and new consensus rules. I just don't understand exactly how the ...
1
vote
3answers
66 views
+50

Is there a way to create a transaction that it can only be confirmed after another unrelated transaction has been confirmed?

Is there a way to create a transaction A that cannot be confirmed until B has been included in a block, although A does not build on any UTXO B creates? B would have already been broadcast by another ...
4
votes
1answer
50 views

Where the P2SH script gets written?

I understand that when I'm doing a transaction, I'm locking those bitcoins to whoever provide the solution to a script that has the hash I posted. But, where does the hash get written? I would ...
3
votes
2answers
108 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
326 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
29 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
49 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
62 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
203 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
80 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
178 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
3answers
283 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
100 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
40 views

How does the scriptPubKey for this test vector work?

The scriptPubKey for cbebc4da731e8995fe97f6fadcd731b36ad40e5ecb31e38e904f6e5982fa09f7 is: ...
1
vote
2answers
93 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
136 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
135 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
59 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
632 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
82 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 ...
4
votes
2answers
122 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
137 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
127 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
54 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
46 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
83 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
284 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
94 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
130 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
117 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
31 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
54 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
50 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
90 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
40 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
135 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
59 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
278 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
212 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
250 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
84 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
165 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 ...