24 votes
Accepted

How can we trust supply won't be increased in 2140 by just a few lines of code?

The bitcoin network is composed of 'bitcoin full nodes', which are computers located all around the world, each one running independently to verify the state of the network. Part of that verification ...
chytrik's user avatar
  • 17.9k
23 votes
Accepted

Byzantine fault-tolerant consensus - Why 33% threshold

We have a mathematical proof that to tolerate n malicious nodes, you need 2n + 1 good nodes. The full proof is found in G. Bracha and T. Rabin, Optimal Asynchronous Byzantine Agreement, TR#92-15, ...
David Schwartz's user avatar
17 votes
Accepted

Bitcoin without mining - what needs to be implemented

Mining is not essential for coin creation. New coin introduction can be tied to new block creation, or be time based. Even if you don't use proof of work, you will still have blocks (even if you don't ...
Pieter Wuille's user avatar
16 votes

What happens if two miners mine the next block at the same time?

What Nicolai said is not completely right. The network would decide which one is the main chain according to the following block mined. Let's assume that block A and B are mined at almost the same ...
Ethan's user avatar
  • 161
11 votes
Accepted

How is Bitcoin governed by mathematics?

This question may be opinion based in some ways, but I'm going to attempt to answer it as it is an important concept, and somewhat unlike traditional systems. Bitcoin is governed by math, in some ...
Raghav Sood's user avatar
  • 16.9k
10 votes

Why can’t the genesis block coinbase be spent?

How would you change it to allow it to be spent? In order to make the coinbase spendable, the following changes have to be made to validation.cpp (v0.16.2). Note: as mentioned this would be ...
JBaczuk's user avatar
  • 7,278
10 votes
Accepted

Why coinbase maturity is defined to be 100 and not 50?

It is 100, because that's what Bitcoin's creator set it to. It's part of the system's consensus rules now, and cannot easily be changed. It also doesn't really hurt. In retrospect, it is likely too ...
Pieter Wuille's user avatar
9 votes
Accepted

Why is it so hard for alt clients to implement Bitcoin Core consensus rules?

Because they're not known. This may sound surprising, but you have to realize that Bitcoin's consensus rules are defined by what (economically relevant) full nodes actually enforce. We can assume at ...
Pieter Wuille's user avatar
9 votes
Accepted

How do Bitcoin devs make sure that their modifications do not affect the consensus rules or the running network protocol?

"Best-effort". Formal proofs don't help. All one can do is to write tests, like any other well-written piece of software. They also maintain forks of some dependencies such as LevelDB and ...
MCCCS's user avatar
  • 10.1k
9 votes

How can we trust supply won't be increased in 2140 by just a few lines of code?

Well, the title is the only question, how can we trust supply wont be increased by just a few lines of code? Just don't make any such changes to your code and you will never see an increased supply. ...
David Schwartz's user avatar
9 votes
Accepted

Why exactly would adding further divisibility to bitcoin require a hard fork?

I think the answer depends on exactly how you define "forced" soft fork. I find that this concept of a forced soft fork is mostly useful as a demonstration that being a soft fork (in the ...
Pieter Wuille's user avatar
8 votes
Accepted

Is there actual consensus on the blockchain's tip or only until the next block?

No, there is no consensus until the next block is found. The network is experiencing a blockchain-fork. It will only mend once one of the tips pulls ahead by adding another block. Then all nodes will ...
Murch's user avatar
  • 71.6k
8 votes

Why are banks and other centralized entities interested in block chains?

Speaking as someone who has worked on a blockchain project for a bank, I can tell you that banks are interested for several reasons. Banks know they are ripe for disruption Due to a combination of ...
Jestin's user avatar
  • 8,802
8 votes
Accepted

What does 'signal' and 'lock-in' mean in a BIP?

Signalling simply means the miner of a block has set a bit in the version field to say that they support something. BIP 8 and 9 discuss this, it allows the miners to let the network know they are ...
meshcollider's user avatar
  • 11.7k
8 votes
Accepted

Does the coinbase transaction have inputs?

Coinbase transactions must: Have exactly 1 input. That input must have prevout hash 0000...0000, and index 0xFFFFFFFF (an output which isn't actually spent). The input's scriptSig must be between 2 ...
Pieter Wuille's user avatar
8 votes
Accepted

Why does everyone say that soft forks restrict the existing ruleset?

If this is true, then how are legacy transactions still present in the blockchain? Clearly, there are still plenty of transactions with non-segwit and non-taproot script types. I'll focus on Taproot ...
Pieter Wuille's user avatar
7 votes
Accepted

How does a new block get distributed

When a node discovers a new block, it will send an (unsolicited) inv (inventory message) to announce the new block to its peers. The peers should then respond by sending a getdata message requesting ...
Murch's user avatar
  • 71.6k
7 votes
Accepted

How does Proof of Burn work?

Attention: Ambiguity! Note that the term (or abbreviation) "PoB" can be used differently. For example, some cryptocurrencies allow users to get some of their coins for provably burning money in ...
UTF-8's user avatar
  • 3,214
7 votes

What does 'signal' and 'lock-in' mean in a BIP?

BIP9 "versionbits" introduced a method to deploy up to 29 softfork proposals at the same time. Each proposal follows the same flow: Graphic from BIP9 After the starttime is reached for the proposal,...
Murch's user avatar
  • 71.6k
7 votes
Accepted

How does a miner get selected in Proof Of Stake?

The minting algorithm for staking is different for various coins; for example, it is different in BlackCoin from Cardano. There are several approaches to staking, but most of them are susceptible to "...
dionyziz's user avatar
  • 1,012
7 votes
Accepted

In what sense does the security model of proof-of-stake require users to "log on to the internet every few months"

What Vitalik is talking about is the Slasher algorithm that he designed which punishes the block signer if he attempts to create a fork in the blockchain. However the way that slasher works is that ...
Andrew Chow's user avatar
  • 67.4k
7 votes
Accepted

Why was BIP34 (Block v2, Height in Coinbase) not implemented via the coinbase tx's locktime or nSequence?

That would have made perfect sense, and I see no reason why that wouldn't have been the superior way of doing it. However, as far as I remember, nobody suggested this at the time.
Pieter Wuille's user avatar
7 votes
Accepted

PoW 51% attack vs. BFT 1/3 attack?

So from what I understand, Bitcoin's PoW is prone to 51% attack, but as a distributed system it is also prone to BFT's 1/3 attack right? No. Bitcoin is not a "consensus system" by any of the ...
G. Maxwell's user avatar
  • 7,676
7 votes
Accepted

Was it always required for the Coinbase transaction to be the first transaction in a block?

This is not true. Code and code comments in v0.1.5 (the oldest tagged version in git) enforce that there always is a coinbase transaction and that it must always be the first. There cannot be a ...
Andrew Chow's user avatar
  • 67.4k
7 votes
Accepted

What is the difference between policy and consensus when it comes to a Bitcoin Core node validating scripts?

The term "consensus checks" refers to the rules that determine whether a block is valid; specifically, if a consensus check on a block (or a transaction contained within a block) fails, then ...
sdaftuar's user avatar
  • 589
7 votes
Accepted

How does the BTC protocol guarantee that a "main" blockchain emerges?

Bitcoin nodes consider the chain with the most accumulated proof-of-work the best chain. Whenever one chain tip pulls ahead by adding another block, all nodes will reorganize to that chaintip as soon ...
Murch's user avatar
  • 71.6k
7 votes

Would Bitcoin still work without a target difficulty?

It's not trivial a) to agree on the time in a distributed system, especially how much time has passed between two events, b) to establish when exactly a block candidate was found. Further, when a node ...
Murch's user avatar
  • 71.6k
7 votes

Why coinbase maturity is defined to be 100 and not 50?

Obviously the choice was somewhat arbitrary as well as largely unexplained. This is true of several other constants chosen by Satoshi Nakamoto. According to What is the length of largest known ...
RedGrittyBrick's user avatar
7 votes

Was the addition of OP_NOP codes in Bitcoin 0.3.6 a hard or soft fork?

When the script interpreter encounters an unknown opcode (the default: case inside the switch statement), it returns false. That aborts verification and considers the transaction to be invalid. This ...
Pieter Wuille's user avatar
7 votes
Accepted

Is every BIP actually a small fork?

Not every BIP is a fork (change in consensus rules). Some are standards for wallet software (like BIP32 and BIP39), the peer-to-peer protocol (BIP152) and other areas. The BIP repository classifies a ...
Vojtěch Strnad's user avatar

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