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.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
1answer
110 views

Can we construct a UTXO which is spendable only via proof of work?

Do the current Bitcoin opcodes and transaction size limit allow constructing a UTXO which is only spendable if a specified amount of work has been performed? So the spender, would provide a nonce as ...
6
votes
0answers
234 views

Did the introduction of VerifyScript cause a backwards incompatible change to consensus?

My question is about the changes to bitcoin done by commit range [a75560d8, 6ff5f718], and their effect on consensus. Out of this range of four commits (all attributed to satoshi) during the dates ...
3
votes
0answers
473 views

How can I store a redeem script in my wallet?

Imagine that I wrote a redeem script. I calculated the related P2SH address, and sent some bitcoins to that address. In order to spend that bitcoins, I need to remember two things: The private keys ...
3
votes
0answers
478 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 ...
3
votes
0answers
114 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 ...
2
votes
1answer
84 views

How to make a homomorphic preimage/payment hash with current lightning network / Bitcoin implementations?

If I remember / understand it correctly by using the mechanisms from the scriptless scripts paper we could easily create homomorphic preimages / paymenthashes. I think this would be a very desirable ...
2
votes
0answers
22 views

Script and DER in P2PKH

Im trying to figure out the script and DER In P2PKH, the "first part (scriptsig)" push in stack (<sig><pubK>) because is it DER? Instead the "second part (scriptPubKey)" you can map the ...
2
votes
1answer
86 views

How to let surplus go to fundraiser in ANYONECANPAY crowdfunding script?

ANYONECANPAY can be used for crowdfunding, where pledged donations cannot be spent unless funding goal/soft cap is reached. But since output is committed, when soft cap is exceed, all the surplus will ...
2
votes
1answer
365 views

Why don't P2PK scripts have their own address?

If I understand addresses correctly, different types of addresses are used to map to a particular locking script (scriptPubKey). So based on the leading character of an address, a wallet will decode ...
2
votes
0answers
98 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 ...
1
vote
0answers
23 views

Is possible extract the original script P2MS from the transaction locked with the P2SH address?

This is a stupid question because if the P2SH contains the hash160 (and the hash160 contains the sha256) of the P2MS doesn't possible return to the original hex P2MS. So, but for verifying the P2SH I ...
1
vote
0answers
32 views

How verify (in C++) input signature?

First small problem: blockchair.com give me only output scripts, not input - is any blockexplorer online with it? I read binary data and this may be hard recreate my sample data and verify. I test BTC ...
1
vote
0answers
14 views

BIP0034 block height using python-bitcoinlib

I'm doing some experiments for finding coinbase height from freshly mined block which is received from ZMQ. tx_coinbase = CTransaction.deserialize(x('...
1
vote
0answers
51 views

Error mandatory-script-verify-flag-failed (Signature is found in scriptCode)

I found a few questions with the specific error, but couldn't find also the appropriate answer. So, here I am. I am working on regtest in a Python library that create transactions and then use JSON-...
1
vote
0answers
180 views

Coinbase “convert” API?

I use the convert functions at coinbase to take advantage of market changes to increase my position amounts. This weekend I am going to write a php script that tracks the available conversion pairs ...
1
vote
0answers
48 views

Segwit versioning limitations

Currently my understanding is that if new version of Segwit script is introduced, you are free to create whatever crazy rules you want there as long as they do not go against any valid consensus rules....
1
vote
0answers
199 views

Locktime requirement not satisfied when locktime set to 1 in p2sh

I've created the following script on testnet: OP_IF 2 <pubkey1> <pubkey2> <pubkey3> 3 OP_CHECKMULTISIG OP_ELSE 1 OP_CHECKSEQUENCEVERIFY OP_DROP <pubkey1&...
1
vote
1answer
70 views

Bitcoin multisig contract - to Lock coins with nTimeLock (BIP65)

I really need help. I am currently Developing a Bitcoin wallet and want to build in a SMS Based send function where the sender does not need to know the receiver publicKey. After the contract get ...
1
vote
0answers
174 views

Is it possible to create a Dapp on top of Bitcoin?

Is it possible to create a dapp on top of bitcoin similar to how it can be done with ethereum? Can it be just as capable as ethereum?
1
vote
2answers
136 views

Bitcoin library vs script to develop application

I'm curious about the development of application of Identity management in Blockchain platform, but I'm a bit confused about the technologies to use. In short words, when is more convenient to ...
1
vote
0answers
83 views

get utx scriptPubKey to become an object

I'm using this python script https://github.com/sebicas/bitcoin-sniffer When I see a utx I look at each output and find the scriptPubKey I expected to see something like "scriptPubKey": { "asm": ...
1
vote
0answers
415 views

Is there any library to process scriptSig script in transaction, and other scripts?

I'm trying to parse hex representation of scriptSig, in normal transactions there are variable int, r&s, pubkey. But some are really weird, like those ones: ...
1
vote
0answers
860 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 ...
1
vote
0answers
473 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 ...
1
vote
0answers
434 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
0answers
164 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
0answers
77 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 ...
1
vote
3answers
353 views

Instant confirmations with pre-published, locked, transactions

(Clarification: This is not an attempt to solve the problem of a vendor taking the money and running without handing over the merchandise. Problems like that can't be solved without some third party. ...
0
votes
0answers
68 views

How to use “OP_CHECKSEQUENCEVERIFY” in regtest?

I have created a P2sh includes OP_CHECKSEQUENCEVERIFY and funded the same. I was trying to redeem the coins. But i could not understand the working of OP_CHECKSEQUENCEVERIFY. Below is the example ...
0
votes
1answer
25 views

Is a multi script possible that requires relative time locks relative to each signature?

I've been wondering about cold storage multi sig security. Specifically, I was wondering how secure it is with respect to a kidnapper. If a kidnapper took X hostage, and threatened to kill him, X ...
0
votes
0answers
41 views

Bitcoin Transaction Generation: Signature Verification Error

I have the following raw transaction (basic P2PKH) which I am trying to send to the Bitcoin Testnet 3: ...
0
votes
1answer
52 views

In practice, are redeemScripts commonly reused?

In regards to P2SH-P2WSH transactions, are Txout-script values identical between transactions? Is it reasonable to expect a business or vendor that accepts bitcoin to be using the same redeemScript ...
0
votes
0answers
52 views

HTLC in blockchain regtest mode by creating transactions manually

I am trying to create a htlc smart contract manually by writing a script and finding the hex using the btcc compiler. Now node A has to create a transaction using that hex and lock money in that p2sh ...
0
votes
1answer
21 views

Getting source address of a Tx message from it's signature script

I have a simple bitcoin packet which contains TX message. in a TX message, one of it's Transaction input hex data was like this: ...
0
votes
1answer
72 views

Detect types of ScriptSig and parse each part

As explained in https://en.bitcoin.it/wiki/Script there are many types of scriptPubKey and scriptSig like: <sig> <pubKey> <sig> <pubKey> <pubKey> <sig> <...
0
votes
0answers
29 views

Extract input addresses from a tx message in bitcoin protocol

Recently, I wrote a c++ code to extract some information from some messages in BITCOIN protocol. for example, I extracted bitcoin value and output address corresponded to it from tx messages of this ...
0
votes
1answer
94 views

Script to import multiple priv keys in Electrum

DuckDuckGo turns up nothing of interest. How to import multiple priv keys in Electrum from a file using Electrum console or shell script, for all derivable valid BTC addresses? (1,3,bc1) Eventually I ...
0
votes
0answers
62 views

How to assemble and test a script on Bitcoin testnet online?

Given a script using Multisig, how can I convert addresses to hash that can be used in the script then assemble the script and then launch it inside a transaction on Bitcoin testnet that can viewed on ...
0
votes
1answer
60 views

How to split the funds and send X% to fee wallet and the remaining funds to another wallet?

Anybody have any idea about how to do it? User send the bitcoins X% goes to fee wallet remaining funds goes to service wallet I'm trying to use the "sendfrom" but it's not working because he only ...
0
votes
0answers
44 views

OP_CHECKSIG NULLFAIL with btcdeb

I'm using btcdeb to understand script. I pick a old random P2PKH transaction form mainnet, and paste unlocking script e locking script inside. I know that this script is ok, because I can check on ...
0
votes
0answers
44 views

Uniquely identifying a UTXO

I see two ways: Txid + index Txid + script hash Pros of the txid + index: Simple and short Cons of txid + index: It relies on array iteration being deterministic and all third party ...
0
votes
0answers
34 views

Check an outpoint's scriptPubKey against known scripts

So I would like to check if coin.out.scriptPubKey is part of GetScriptForDestination(mypubkey.GetID()) A simple comparison isn't possible as the scriptPubKey (when I decode it) contains only the ...
0
votes
2answers
777 views

P2sh redeem script hash

What are the contents of a redeem script hash in a p2sh transaction? From what i read it's similar to the pubkey script but does it only contain the receiver's address?
0
votes
0answers
412 views

Error: mandatory-script-verify-flag-failed

I have created a raw transaction from myElectrum wallet, but when I try to broadcast it I get this error: mandatory-script-verify-flag-failed Why is this happening? The transaction is below: ...
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 ...
-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 ...