Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

4
votes
2answers
352 views

Multi-signature public key validation

In a pay 2 script hash transaction, does the redeem script get checked for valid public keys before a transaction can be signed? I have noticed that if I have a redeem script with one invalid pubkey ...
2
votes
2answers
329 views

Same seed from Electrum but generate different Bitcoin addresses

I am using Electrum 3.2.2, I have the wallet file generated from Electrum and a password to decrypt the file. There is an error whenever I am trying to send Bitcoin out of that wallet, so I decide to ...
1
vote
2answers
101 views

How is subscript computed for OP_CHECKMULTISIG?

I'm trying to learn the Bitcoin protocol by implementing it, and I've got OP_CHECKSIG working (following instructions in https://en.bitcoin.it/wiki/OP_CHECKSIG), but I can't get an transaction input ...
1
vote
2answers
115 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 ...
2
votes
1answer
65 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
259 views

Lightning close-channel transaction example?

From this article, I can understand that a punishment-based bidirectional payment channel (the type used by Lightning) would contain roughly this bitcoin script as one of the outputs: OP_IF “+7 days” ...
1
vote
1answer
50 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 ...
0
votes
1answer
42 views

ScriptCode field in P2SH-P2WPKH BIP-143 Test Vector

I'm trying to understand the meaning of scriptCode in the context of spending a P2SH(P2WPKH) UTXO. I've already read the following answer to a similar question, but it does not fully address my ...
0
votes
1answer
25 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
1answer
37 views

Original bitcoin core has one script.cpp.where is interepreter for it?I want to write hello world compiler to understand this.?

How to understand script.cpp and its interpreter.I understand register and postfix operation. I want to understand how script is parsed into machine code.Can i write hello world such as only pushing ...
0
votes
1answer
56 views

Diferent redeemscript for the same scriptpubkey?

Most transactions to p2sh address has the follwing scriptpubkey HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL As I understood, this transaction do not need to be signed. Is it true? ...
0
votes
1answer
568 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?
-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 ...
4
votes
0answers
88 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
452 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
426 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
108 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
0answers
96 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
37 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
150 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
0answers
156 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
0answers
71 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
388 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
832 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
413 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
392 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
150 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
75 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 ...
0
votes
0answers
46 views

OP_CHECKDATASIGVERIFY not working

I'm trying to generate a signature and pass it through OP_CHECKDATASIGVERIFY as part of a P2SH address on a regtest network. This results in the following: Public Key: ...
0
votes
0answers
17 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
18 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
29 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
0answers
22 views

How can users verify bitcoin escrows, or any bitcoin smart contract?

Coming from an ethereum background, one can view a contract that you send ether to before you send it and verify that the logic works as advertised. How can bitcoin users do the same? Or am I ...
0
votes
0answers
26 views

How to create contracts using bitcoin?

Is there a way to create contracts with bitcoin such as allowing a transaction being funded by segwit outputs to be broadcasted only if the receiver signs it or only if the scriptsig contains a ...
0
votes
0answers
44 views

Valid p2sh transaction using only the redeem script

Is it possible to create a valid p2sh transaction using only the redeem script in the scriptsig and no signature?
0
votes
0answers
76 views

P2sh transaction with non standard script

How can you relay a p2sh transaction with a non standard script, such as a scriptsig that only contains OP_True and get it mined? Example: https://blockchain.info/tx/...
0
votes
0answers
344 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
101 views

How to automatically reveal the secret after some tine in a hash locked transaction

In a hash locked transaction like this (Alice generates secret and hashes it): IF 2 <Alice key> <Bob key> 2 CHECKMULTISIGVERIFY ELSE <Bob key> CHECKSIGVERIFY SHA256 <...
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
0answers
159 views

Non-standard transactions

Can somebody explain me the following question: What is the available scripting language for non-standard transactions in Bitcoin?