All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
41 views

OP_EQUAL not working properly

I went to https://siminchen.github.io/bitcoinIDE/build/editor.html to try some bitcoin scripting and I wrote this script: <1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU> OP_HASH160 <...
0
votes
1answer
152 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
0answers
47 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
1answer
102 views

Extract output address from raw script in bitcoin protocol

I'm working on bitcoin protocol and exactly i want to extract raw script from output script to gain address from tx messages. for common scripts, like scripts start with 0x76(means OP_DUP), we can ...
1
vote
1answer
183 views

Bitcoin RIPEMD160 purpose

Bitcoin uses RIPEMD160 on top of SHA256. Is its sole purpose to make public key address shorter or does it strengthen security in any way?
0
votes
2answers
146 views

How is a transaction formated/signed?

Every transaction takes unspent outputs as inputs and creates new outputs. The creator of the transaction uses his private key to sign the transaction and nodes validate that transaction by using the ...
0
votes
2answers
128 views

Why is this script invalid, and how can I generate valid public key/digital signature pairs?

Why does the default P2PKH transaction at http://bitcoin-script-debugger.visvirial.com/ return NULL rather than true? I haven't tried to swallow the gory details of OP_CHECKSIG yet, but everything ...
0
votes
1answer
57 views

hash locked multisig, can one cosigner sign without the pre-image?

Consider Alice and Bob created the following native segwit script: hash SHA256 defined as H | Alice PubKey | Bob Pubkey Only Bob has the pre-image (plain text that hashes [sha256] to H). Can Alice ...
2
votes
2answers
103 views

Why we must reference the entire txid for each output we want to spend?

Suppose I want to spend from 3 unspent outputs. I must reference the txid of these unspent outputs. Suppose they are: eb36eca9a06fbe68278ad3e7d16d10ed02e22ad891ed59ef2b84ed4a49e8a6d2 ...
1
vote
1answer
584 views

Bitcoin - Is the <pubKeyHash> in scriptPubKey already hashed?

In Bitcoin protocol, to set the output of a transaction you need a scriptPubKey which is in the following format. scriptPubKey = OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG Is &...
2
votes
1answer
125 views

How can blockchain.info show the output address of a transaction when the output address has never been used in any other transaction?

I've stumbled across a transition on blockchain.info where the output address was displayed even though the output address had never been used in any other transaction. How can blockchain.info know ...
2
votes
1answer
576 views

How to tell which part of the previous tx I need to make the hash to sign for an old given tx?

I have recently been taught (here) how to create the hash to sign for a given "input script" for an existing transaction. I then sought to test my abilities and sought out a difficult transaction to ...
0
votes
1answer
120 views

How would one go about acquiring the HashofThingtoSign from this old transaction?

How would one go about acquiring the HashofThingToSign that is used in the "Signature Generation" equation for this example transaction such that it could easily also be applied to any other given pre-...
3
votes
1answer
734 views

Verifying a P2SH transaction script by hand. How should I concatenate OP CODES in order to hash the script?

I'm reading this: Transaction 40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8 paid to P2SH address 3P14159f73E4gFr7JterCCQh9QjiTjiZrG. You can see the redeem script in ...
5
votes
1answer
209 views

ScriptSig content during signature (quadratic hashing)

As far as I know, the quadratic hashing problem came from the fact that every time a transaction is verified (or signed), the "unsigned transaction" that is hashed and verified changes depending on ...
1
vote
1answer
173 views

Do HTLC transactions work today or do they need a new soft-fork?

I thought that HTLCs was just a kind of a script construct that would allow to unlock funds for a period of time, which can be unlocked to anyone that provides the original string that matches the ...
1
vote
0answers
435 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
504 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 ...
13
votes
2answers
12k views

What is “Script Hash” address exactly and how does it work?

I found out this address playing with blockchain https://blockchain.info/address/3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8 I found out it's something called "scripthash". How does it work exactly? How does ...