90 votes
Accepted

Explanation of what an OP_RETURN transaction looks like

Note: I went out and learned about how the OP_RETURN opcode works at the byte level in a bitcoin transaction. I’m writing it here so that others can learn quickly. First, a brief history of why we’re ...
user avatar
  • 2,276
48 votes
Accepted

How will multisig addresses work?

I know this question is old, but I stumbled upon it looking how to teach myself how multisig addresses work, and I imagine others will to. So I’m going to try to explain the typical flow for creating, ...
user avatar
  • 2,276
45 votes

How do you get a Bitcoin Public Key from a Private Key

I'll try answering this again in a different way, using small numbers to keep it readable. convert the private key to binary representation, so decimal number 105, which is 0x69 in hex, becomes ...
user avatar
29 votes
Accepted

How are bitcoin transactions and the blockchain transferred over the internet?

The Bitcoin P2P network The Bitcoin P2P network is a randomly-wired gossip network. This means that all nodes make arbitrary connections to other peers (using various ways to discover new addresses) ...
user avatar
27 votes

What is TxIn's sequence?

Note that the accepted answer is outdated. Currently, sequence numbers are mainly used for signaling RBF - replace-by-fee - that allows you to resend a transaction with a higher fee. See https://...
user avatar
  • 2,545
20 votes
Accepted

Can bitcoin protocol be changed to add economic incentives to validating nodes?

I don't think it is possible. There are a few problems to incentivizing the operation of nodes. When you pay people to run nodes, people running multiple nodes provide less value but earn more for ...
user avatar
  • 63.4k
18 votes
Accepted

How is the target section of a block header calculated?

The target section of the block header is called nBits in the code. nBits is a 32-bit compact encoding of a 256-bit target threshold. It works like scientific notation, except that it uses base-256 ...
user avatar
16 votes
Accepted

Can a Bitcoin transaction have the same address for input and output?

At the protocol level, there is no such thing as "balance of an address". There are individual unspent outputs (like coins in a wallet), which must be individually spent. You can't partially spend an ...
user avatar
16 votes

Why is Bitcoin defined as having 8 decimal places?

When developing Bitcoin, Satoshi had already come with the idea that no more than 21 million of them will ever be made. However, there was an unsolved issue: how to accomodate all bitcoins in case it ...
user avatar
15 votes
Accepted

Bitcoin protocol and Wireshark

Someone wrote a Bitcoin protocol decoder for Wireshark, several years ago. I assume it was included in the Wireshark distribution. Wireshark simply knows about the Bitcoin protocol. There is no magic ...
user avatar
12 votes
Accepted

Bitcoin private key, location on ECC curve

The basic elliptic curve operation is addition of points. The operation of applying this addition repeatedly is called the scalar multiplication of a point by an integer. The private key is the '...
user avatar
12 votes

Explanation of what an OP_RETURN transaction looks like

If you want to write OP_RETURNs to the blockchain without getting into the internals of how transactions are built, an easy way is to use our libraries for PHP and Python: https://github.com/...
user avatar
11 votes

What is relation between scriptSig and scriptPubKey?

I had the same question as well and spent forever trying to understand it and finally cracked it. "The sender (A) only has the Bitcoin Address of the recipient (B), so how does he get the pubKeyHash ...
user avatar
11 votes

Why don't the timestamps in the block chain always increase?

There is no requirement that blocks have a timestamp after the previous block. The only requirement is that the timestamp is greater than the median timestamp of the last 11 blocks. So this means that ...
user avatar
  • 61.4k
10 votes

What is the coinbase?

David has already given a good explanation of the term coinbase, but I'd like to give further details on the coinbase transaction. The coinbase transaction is a special type of transaction. Every ...
user avatar
  • 63.4k
9 votes
Accepted

What is the P2P technology/protocol used by Bitcoin to find nodes and distribute messages across them?

Bitcoin has its own custom wire protocol using TCP. Peer discovery is by address rumoring, where connected nodes gossip about other potential available peers. When a node is new and has nobody to ...
user avatar
  • 15k
9 votes
Accepted

Is it possible to "unmine" particular coins?

Technically, yes it's possible to do this. Practically, doing this would probably break everyone's trust in Bitcoin. One of Bitcoin's principle guarantees is that nobody can confiscate anyone else's ...
user avatar
9 votes
Accepted

Why was an insecure merkle tree implementation chosen?

As with many things in Bitcoin, it is likely simply because it worked well enough, and such an attack was not immediately obvious. Several of the choices made in the early days of Bitcoin don't have ...
user avatar
  • 16.5k
8 votes

Is Bitcoin's Economic Majority those who already own coins or those who will buy or keep coins?

Each entity's weight in the economic majority is closely related to its ability to devalue the coins in the protocol version they are against. People (and their proxies) who are willing to offer ...
user avatar
8 votes

Can an output be spent in the block in which it is contained?

allowed by the protocol? Yes. It is possible to spend an output immediately. And two (three-four-etc) chaining transactions will be included in the same block. There are a lot of examples in ...
user avatar
  • 6,592
8 votes
Accepted

Why is it not possible to replay transactions?

Transaction inputs use Unspent Transaction Outputs (UTXO). UTXO are created by transactions. They are uniquely identified by the transaction id and the output position in the transaction that created ...
user avatar
  • 63.4k
8 votes
Accepted

What are the differences between Bitcoin and Libra?

This question might be considered too broad and too opinion based according to the rules of this forum. However, tackling it from a technical standpoint based on facts rather than opinions might be on-...
user avatar
  • 6,908
8 votes
Accepted

What does the little-endian notation improve for Bitcoin?

Almost all CPUs these days work natively in little-endian. To operate on big-endian numbers, additional byteswap instructions are needed. For most things, I think this effect is negligible. Network ...
user avatar
7 votes

What is an "unspent output"?

Bitcoin is a distributed system that enables users to receive, store, and send money. Value is transmitted by submitting a payment order to the network called a transaction. Transactions are ...
user avatar
  • 63.4k
7 votes
Accepted

Why is two hours the maximum acceptable offset for Bitcoin blocks?

Transactions don't have a timestamp. Blocks have a timestamp. The difference is important, because the block timestamp on some of the blocks changes the difficulty. Why is the maximum difference ...
user avatar
  • 28.7k
6 votes

How do you get a Bitcoin Public Key from a Private Key

Here's a self-contained Python script that does the conversion. You can check its work by comparing to entering your private key as the "Secret Exponent" at Brainwallet. I took the script from this ...
user avatar
  • 4,347
6 votes
Accepted

Why block height is required in coinbase?

In their comment @amaclin pointed to BIP-30 which provides motivation for BIP-34. I still don't understand what is "to better reason about plausible difficulty for not-yet-connected blocks" ...
user avatar
6 votes
Accepted

How do I query a remote bitcoin node like RPC?

Excellent question, and welcome to the community! Short Answer Maybe. Long answer Yes, you can send queries to other nodes on the Bitcoin network. Note that these aren't RPC calls, but Bitcoin's ...
user avatar
  • 28.7k
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

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