Questions tagged [best-chain]

Discusses the rules by which one chain-tip gets chosen over another, including questions about heaviest/longest chains. Closely related to [chainwork], [chain-reorganization] and [blockchain-fork].

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

How many blocks extra does one need before it's competitor is deemed stale?

so when two equally valid blocks are discovered at roughly the same time, a conflict occurs, nodes should wait for the strongest fork of the chain to emerge and develop before placing trust in the ...
2
votes
1answer
82 views

Does a hard fork need to include a soft fork as well?

Using these definitions of soft fork and hard fork: soft fork – tightening of the consensus rules, new blocks remain valid for old nodes hard fork – loosening of the consensus rules, new blocks might ...
1
vote
1answer
63 views

Potential fork from genesis block using enourmous computational power

51% attacks are commonly discussed where one entity could potentially mine blocks ahead of the network. The assumption is that the attacker manages to acquire 51% of computational power. However, ...
7
votes
2answers
597 views

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

I'm reading up on the bitcoin/blockchain technology. Usually, the part about proof of work and how to create a block is well explained. However, what is never explained is how/why the communication of ...
1
vote
2answers
134 views

Why can't a 51% attack change past blocks on the blockchain?

I have read that it is not possible to reverse transactions already added to the blockchain but I do not understand why that is not possible in a 51% attack. If an attacker was to change the ...
1
vote
3answers
89 views

How does a Bitcoin block get generated and 'agreed upon' by everyone?

When a set of new transactions is broadcast to all the Bitcoin mining pools, my understanding is that they all start working on a new block to include all those transactions. But how is it agreed ...
1
vote
1answer
38 views

How does initial exchange of inventory work when both nodes have different chains?

When two nodes connect to each other and exchange getblocks messages but they have different blockchains will both nodes download each others blockchain to verify which has higher chainwork or will ...
1
vote
1answer
43 views

How does longest chain propagation take place in bitcoin?

Let's say the valid blockchain that Node A has is: B1->B2->B3 Now, I am gonna cheat since I have lots of computing power. What I do is I download the above blockchain that Node A has and start ...
3
votes
2answers
311 views

Bitcoin: Why can the difficulty parameter not be ignored?

by the longest-chain-rule, the chain with the most blocks is considered to be the main chain in Bitcoin. I understand that an adversary needs to have more than 50% of the network's computing power in ...
6
votes
1answer
230 views

How does Bitcoin Core know it's on the longest chain?

In trying to implement a client, I am wondering what is the most efficient approach to figure out if you are on a fork. Let's say you pick a peer at random and go through IBD using the headers-first ...
4
votes
1answer
221 views

How often does temporary fork occur and how long does it last?

I was wondering, how often does temporary forks occur? They appear when there are two different blocks mined based on the same previous block (parent block), but what are chances for that? And if fork ...
2
votes
2answers
80 views

Can I rely on my full node to always have the most recent blocks?

I have a full node running and I am using ZMQ to let me know when new blocks arrive. How can I make sure that this block that my node received is a valid block written in the blockchain ledger and it ...
0
votes
1answer
228 views

Fork and Longest Chain Rule

At the same time, A and B succeed in resolving the "Proof of work" challenge and both add a new block to their local blockchain, then they propagate the new blockchains to other nodes. I have 2 ...
3
votes
1answer
239 views

Why Block Chain not Block Tree?

Why is the Blockchain intended to be a chain and not a tree? Why do orphaned blocks get trimmed off? Would you please provide a detailed answer.
1
vote
1answer
101 views

How Does Bitcoin Core Client Keep Track of Longest Chain/Strongest PoW Chains?

Bitcoin Core stores blocks in files in local disk. And it uses LevelDb to form an index on top of block storage to make it faster to retrieve a block (basically a simple key-value pair db). See this ...
1
vote
1answer
326 views

"Fork choice rule" : A general term? or a specific algorithm?

Is "Fork choice rule" a general term including all the algorithms used for choosing a branch among other branches in a fork (including longest chain rule in Bitcoin etc) ? Or is it a specific ...
4
votes
1answer
86 views

Why isn't the block hash used to calculate accumulated work?

Why is this idea flawed? It doesn't seem to be a bad idea at first, because the miners should be incentivized to extend existing chain, instead of to "remine existing blocks", since such "remining" ...
1
vote
2answers
216 views

How can Segwit increase transaction throughput if the same amount of data is stored in the blockchain?

I'm posting this after reading the answers to this: Where is the Signature stored in a SegWit transaction? I've found out from reading that, that in Segwit, the "witnesses" (or signatures) that ...
4
votes
1answer
299 views

When does a blockchain fork resolution happen?

I understand that forks are resolved by largest proof-of-work etc. but when do the miners decide to resolve a fork? Is it a question of network consensus or does each individual miner resolve at their ...
6
votes
2answers
336 views

Why aren't block hashes used directly as scores for difficulty purposes?

Why does Bitcoin apply a difficulty function to block hashes and then use the output of this function to add up and determine the "longest" chain? Why not just e.g. add together all block hashes (as ...
1
vote
1answer
68 views

Given that you have the necessary computing power, how does a tampered blockchain get accepted by the network?

I read that you can only tamper with a blockchain if you have more than 50% of the computing power in the network. So say you have 51% of the computing power, then you can create a longer blockchain ...
0
votes
1answer
51 views

Several Q's about consensus about the longest chain and when this chain be confirmed? [duplicate]

According to: How Does the Blockchain Work? Each node will adopt the longest chain as the only option. But what will happen if 2 (or more) nodes will solve the next block at the same time,and they ...
0
votes
1answer
198 views

Does the Longest Chain Always Win the Mining Award?

If the longest chain (i.e, the one that's the most difficult to produce or the most transactions) is always awarded with 12.5 coins (or whatever the current prize is), what happens if a specific node ...
2
votes
1answer
86 views

Shorter Chains in blockdata

Assuming two blocks are published at exactly the same time, a race for the next block to be added to one of them begins, which eventually one chain will eventually win. My question: will the shorter ...
2
votes
1answer
95 views

Why can't a Bitcoin fork take over?

According to this question's answers, the difficulty is entirely a result of previous info on a blockchain: How is difficulty calculated? So why can't someone simply fork an earlier state of Bitcoin'...
0
votes
1answer
310 views

Why is the longest block the one that gets accepted by all the nodes?

I'm confused about one of the core principles of Bitcoin. When various nodes are confirming transactions, why does the longest block win out? That is, why doesn't the system allow whoever confirms a ...
2
votes
1answer
112 views

Can a two-block-sized chain override the main chain?

After i read this: Honest generators only build onto a block (by referencing it in blocks they create) if it is the latest block in the longest valid chain. "Length" is calculated as total combined ...
3
votes
1answer
276 views

What prevents rewriting the history of a chain with a different difficulty? [duplicate]

It looks like the difficulty is deterministic, but only if the timestamps are trusted. What's to prevent a large miner from starting back much earlier in the chain (when difficultly was miniscule) ...
1
vote
1answer
104 views

What if some attacker forks blockchain from height 1 with a constant difficulty 1?

I've been reading Satoshi's paper recently. There's one thing I cannot think through. That is because the target will limit the block production speed to 2016 blocks per two weeks on average no ...
1
vote
2answers
196 views

Would an optimization proof-of-work problem where the entity with the lowest hash wins have any security weakness or other disadvantage?

I am wondering if there would be any security deficiencies if cryptocurrencies such as Bitcoin were to change their proof-of-work problems to optimization contests. For example, suppose Bitcoin were ...
1
vote
2answers
276 views

Tie Breaker to reduce orphaned chains?

When two different miners find the same block number at roughly the same time, the chain is forked, and there is a bit of a race to develop a longer chain, leaving the alternative orphaned. Why is ...
2
votes
1answer
77 views

Why is it important that miners mine at the end of the longest branch?

In this paper, the authors present a simplified description of mining strategies. The strategy which they call "honest strategy" is to always mine a block at the end of the currently longest branch. ...
2
votes
2answers
2k views

Is bitcoin just one long block chain or are there multiple chains?

Is each block found just a link in the same long chain, or are there multiple chains?
0
votes
2answers
173 views

How do miners avoid transactions getting dropped?

I'm having a problem figuring out how miners solve the following problem: Let's say we have 2 miners: M1, M2. M1 adds transactions A,B,C,D to their block. M2 adds transactions A,B,C to their block. ...
4
votes
1answer
210 views

How does Bitcoin avoid splitting into multiple p2p networks?

So since Bitcoin is completely decentralized what stops multiple p2p networks from being formed? And what happens with the block chain when two separate P2P networks eventually reach each other? Will ...
3
votes
2answers
249 views

How do I know I can trust the head of the blockchain

I'm trying to understand how the mining process works. Specifically, my understanding is the local miner works on blocks and add them to their local blockchain if they succeed. It may turn out that ...
2
votes
2answers
102 views

Can there be stale blocks in "header first" implementation?

The Bitcoin developer guide mentions stale blocks as not being in the longest chain, then moves on to orphan blocks. It states you don't get orphan blocks, "and if you do" they are just dropped. But ...
7
votes
2answers
6k views

What does "Activating Best Chain" mean?

What does "Activating Best Chain" mean? My Bitcoin Core doesn't freeze, it just takes a while. I'm curious as to what it's doing.
2
votes
0answers
52 views

Does the electrum client decide the best chain on the basis of how much work was done, or how long the chain is?

Bitcoin Core compares blockchains based on how much work they contain, and not necessarily which one is longest. This is useful for preventing time warp attacks. This comment on HN says that the ...
5
votes
2answers
2k views

How is a blockchain split resolved?

Let's say two miners created 2 different blocks and broadcast them into the network. Now some clients see blockchain 1 and other blockchain 2 which are different from each other. I would like to ...
3
votes
1answer
581 views

Can a shorter chain overcome a longer one?

Could a dominating chain fork actually be shorter (in blocks) than its abandoned predecessor? Under what circumstances could this happen?
2
votes
2answers
413 views

In what order do new blocks get processed?

Node A receives a newest block with height h1, which it determines to be valid, and therefore stores the block on disk. A little later, it receives another block with the same height h1 but a greater ...
2
votes
1answer
77 views

What does the main_chain value returned by blockchain.info mean?

What does it mean that for bitcoin block to be on the Main Chain? What other chains are there? Is this as opposed to testnet? This is regarding the main_chain value in the blockchain.info api here: ...
10
votes
1answer
4k views

Strongest vs Longest chain and orphaned blocks

Satoshi writes at the bottom of page 3 of his white paper that "If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, ...
2
votes
1answer
134 views

Is it possible that someone forks the chain?

I'm not sure I understood everything but all the clients always keep the longest chain, ok. So, what happens if an evil person injects bad transactions in a block and successfully mine it (given the ...
8
votes
2answers
6k views

What is chainwork?

If I run the RPC call getBlock on the bitcoin-qt client it gives me field called chainwork containing a hash. I cant find any information what this value is about. Request: getblock ...
8
votes
2answers
857 views

Can the blockchain be outpaced by a chain of low-difficulty blocks?

Let's say someone creates a blockchain fork starting from the genesis block, when the difficulty was absurdly low compared to today; then he starts mining new blocks from there up to the current block ...
3
votes
2answers
126 views

Blockchain length by number of blocks or transactions?

It is my understanding that the longest blockchain is the one that should be used. Is "longest" measured by the number of blocks or the number of transactions?
3
votes
2answers
1k views

Longer fake block chain with "valid" transactions

What is preventing the bitcoin client from switching to a fake block chain that would be longer that current official chain? The faked chain would contain fictional transactions, but within the faked ...
6
votes
2answers
2k views

What happens to extinct blockchains, and transactions inside of them?

While understanding the concept of block chain and proof of work, few things are confusing me. Miners always consider the longest chain(by difficulty) and work on expanding it. Now, lets say two ...