Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
7 votes
Accepted

Duplicated hash values in mining reward

This is a known bug in the early days of bitcoin. Was fixed by BIP-30 https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki There is a discussion here: https://bitcointalk.org/index.php?...
user avatar
  • 106
6 votes

SegWit and previous hash: txid or wtxid, or either?

Inside transaction inputs, you have to refer to previous transactions using the txid. Allowing a wtxid there would be (1) a hard fork and (2) defeating the purpose, as it'd make transactions malleable ...
user avatar
6 votes
Accepted

Duplicate transactions in blockchain

Transactions can have multiple outputs. What you show are two outputs created by the same transaction. The output positions are enumerated with the vout field. As the first one is vout = 0, the two ...
user avatar
  • 62.5k
6 votes
Accepted

Are transaction ids always the same length?

Yes. The transaction ID is SHA256(SHA256(transaction)) as described here and thus always has a length of 256 bits (32 bytes).
user avatar
6 votes

Is txid a required field on all transactions?

Txid can’t be missing since it’s just a hash of the transaction data
user avatar
  • 3,175
5 votes
Accepted

What happens when two txid's collide?

No. After transaction A is included into the chain, transaction B is invalid, and will not be mined. If it does show up in a mined block, the entire block is invalid. It wasn't always like this. ...
user avatar
  • 28.6k
5 votes

Duplicate tx ids

Is there a quick and dirty way to detect all transactions whose tx-id can be found in more than one transaction since the genesis block? There are multiple ways to read your question. Are there cases ...
user avatar
  • 28.6k
5 votes
Accepted

How to calculate txid for segwit transactions?

The txid of a segwit transaction is computed by first dropping all the witnesses, and encoding it in legacy notation, and then computing the double-SHA256 hash of it. This is the only possible way, ...
user avatar
4 votes

Why does txID generation consider signatures?

If the signature was not part of the transaction protected by the hash, then you could have two different transactions, one valid and one invalid, with the same transaction ID. The primary purpose of ...
user avatar
4 votes
Accepted

How do I calculate the txid of this raw transaction?

TXIDs have two forms; the form used internally for outpoints and merkle leaves (internal byte order), and the form used in RPC calls and block explorers (RPC byte order). These are often called, ...
user avatar
4 votes
Accepted

Pairing pattern of txids in merkle tree

Transaction order in the block Currently, there are only two requirements for the order of transactions: The coinbase transaction is always first. Intra block dependencies must preceed, i.e. if ...
user avatar
  • 62.5k
4 votes

What is the transaction ID?

Transaction ID usually refers to the 2xSHA256 hash of the transaction serialized as it would have been transferred in the network. This is also the ID as peers refer to them when broadcasting through ...
user avatar
  • 8,704
4 votes
Accepted

What is the impact of purposely sending a signed message with zero fee?

The underlying motivation behind transaction fees is to compensate for resource utilisation as there is always an inherent cost when validating transactions (Electricity - CPU usage) and relaying ...
user avatar
  • 2,378
4 votes

Values for txid and vout for create a coinbase transaction

The coinbase transaction contains a single input, which has txid set to 0000000000000000000000000000000000000000000000000000000000000000 and vout set to 0xFFFFFFFF.
user avatar
  • 11.3k
4 votes

How to compute SegWit txid?

Is data that hashed as txid includes witness? No, the txid is the hash of just [nVersion][txins][txouts][nLockTime] which is the same as a serialized non-witness transaction. That means the signature ...
user avatar
  • 11.3k
4 votes
Accepted

Developing a Bitcoin POS (Payment Page) - How do I identify the transaction

The only right way of of doing this is generating a new address for every expected payment, and then waiting until you've received that amount on that address.
user avatar
4 votes
Accepted

How Does A Node Get Infomation From The TxID - that is, isn't the TxID the SHA^2(256) of various transaction components?

Yes, all txids are calculated only from non-witness data. While many nodes have a complete copy of the blockchain (which does contain all transactions), most nodes do not have a full transaction index....
user avatar
  • 62.5k
3 votes
Accepted

Create raw transaction what txid

In the console do listunspent that will show you all the UTXO in your wallet including the txids. You can type help to get a list of commands, then help <command> to get details about each ...
user avatar
  • 1,530
3 votes

Figure out transaction ID

Some wallets have a function called something live "View on block explorer". For Electrum, you can see it if you right-click a transaction. This will take you to a website on which you find your ...
user avatar
  • 3,144
3 votes

Compute TxID of Bitcoin Transaction

You've forgotten to convert from internal byte order (used in transactions to specify outpoints,) to output byte order (displayed to users.) Reverse the bytes after the second hash. See also: How do ...
user avatar
  • 28.6k
3 votes

Find message attached to Bitcoin transaction?

Transactions do not have comments attached to them. Any comments are local to a person's wallet only. They are not broadcast to the network nor are they actually attached to a transaction. So you ...
user avatar
  • 60.6k
3 votes
Accepted

Why didn't Bitcoin implement segwit in the first place?

Why didn't Bitcoin implement segwit in the first place? The reason Bitcoin didn't initially have SegWit is up to interpretation, I would say that it simply was not thought of prior to transaction ...
user avatar
  • 933
3 votes
Accepted

Ripple: How to calculate transaction ID (TXID)

The transaction ID is calculated by prepending the bytes 0x54, 0x58, 0x4e, 0x00 to the signed transaction and then taking the SHA512Half of this input. Example for a signed transaction, bytes are ...
user avatar
3 votes

Is it only out of sheer luck that all my "txid"s are unique? How should I handle multi-vout transactions?

Why has none of them ever used more than one vout? If each of your transactions only sends Bitcoin to one receiver, then there's going to be only one receiver output in each of those transactions. ...
user avatar
  • 60.6k
3 votes
Accepted

Is txid a required field on all transactions?

A txid is calculated from the transaction data by hashing the transaction (excluding the witness). It's not part of the transaction, but rather derived from the transaction. You can rely on it being ...
user avatar
  • 62.5k
2 votes
Accepted

Sending funds on same block of received funds. Confirm sending not received?

Just to expand on Jannes's answer: before including a transaction in a block, a miner does effectively check that all inputs to this transaction are already in this block or some previous block, as ...
user avatar
2 votes

Sending funds on same block of received funds. Confirm sending not received?

They don't have to be on the same block, but as they do depend on each other the BobD->Bob transaction can only be mined if Alice->BobD is already in the same or an earlier block. If not, the entire ...
user avatar
  • 6,179
2 votes

How are transaction IDs generated and how are they then changed by transaction malleability?

The transaction ID is the SHA256d(signedTransaction) = SHA256(SHA256(signedTransaction)). Sha256d is SHA256 applied two times. Example: Let us consider the transaction with ID ...
user avatar
2 votes

tx-malleability who re-signed the tx?

Actually, nobody else can create a valid signature for your transaction inputs, as they do not possess the private keys to do so. When a transaction is malleated by a third party, it is not re-signed,...
user avatar
  • 62.5k

Only top scored, non community-wiki answers of a minimum length are eligible