Questions tagged [chain-reorganization]

Questions about the client-local phenomenon when a Bitcoin client discovers a new chain longer in terms of difficulty than its current chain.

Filter by
Sorted by
Tagged with
3 votes
3 answers
209 views

Can you get the longest chain by keeping a constant low difficulty?

I'm struggling with this question that should be easy to answer. If the truth is the longest chain, what if I redo all the work from Block 1 until I have the longest chain by keeping a constant low ...
user avatar
  • 41
1 vote
2 answers
200 views

What is the downside of having a default setting in which nodes will invalidate blocks that comprise a surprise reorg?

Suppose that suddenly, out of nowhere, a longest-chain appears that reorgs the last 15 blocks. Such an attack could be accomplished from time-to-time even by a minority attacker who is either lucky ...
user avatar
  • 81
3 votes
2 answers
82 views

What verb best describes "causing another block to become stale"?

For example, suppose I'm selfish mining; you publish a block and then I immediately publish two, what did I do to your block? Similarly, if I'm executing a double-spend attack, my goal is to ?___? the ...
user avatar
  • 81
1 vote
1 answer
63 views

Can a proof of work chain have finality?

My understanding is that finality is just a rule in the consensus which says any block that gets buried X block deep will be considered unchangeable by the consensus. This has nothing to do with proof ...
user avatar
0 votes
1 answer
44 views

How do bitcoin nodes rollback state when a higher POW chain is introduced

Let's say the current chain consensus has a total POW of X... this is agreed upon by all 10k+ BTC nodes. A new "magic" node joins and it has mined a chain (privately) with total POW = 2*X. ...
user avatar
0 votes
1 answer
46 views

How exactly are the undo files used when a re-org takes place?

It is obvious that the undo files (rev*.dat files) are stored to restore the blockchain to a previous version when a re-org takes place. What is not clear to me is what are the exact uses of the ...
user avatar
0 votes
0 answers
50 views

Bitcoin re-org stats

Does anyone have a table of historic Bitcoin reorgs? Something like [yyyymmdd] [blockheight] 1 stale block [yyyymmdd] [blockheight] 1 stale block [yyyymmdd] [blockheight] 2 stale blocks [yyyymmdd] [...
user avatar
  • 1
2 votes
1 answer
259 views

What are the use cases where very old rev*.dat files are needed?

There have been multiple questions on this but none, IMO, really get to the issue: Given: The rev*.dat files hold "undo" data for rolling back the UTXO state, block by block, and they're 1::...
user avatar
  • 147
0 votes
1 answer
40 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 ...
user avatar
2 votes
2 answers
550 views

Incoming transaction has been marked as pending since 2013. How can I retrieve it?

I requested BTC from someone back in 2013. Its been in pending status ever since. It has nearly 500,000 confirmations. The value of transaction when initiated was only $200 or so. Now the value is ...
user avatar
  • 21
0 votes
0 answers
90 views

Reorgs and MEV in Bitcoin

Recently one of the altcoin that has lot of other issues is in news because of MEV (Miner Extractable Value). Honestly I don't care if someone exploits it or it affects the altcoin in any other way. ...
user avatar
1 vote
0 answers
44 views

How do nodes handle long reorgs?

In a reorg where a node receives blocks for a longer or equal-length chain than the chain they previously followed as longest, what is the process for that node to handle this situation? I can imagine ...
user avatar
  • 1,491
7 votes
2 answers
628 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 ...
user avatar
  • 173
1 vote
1 answer
80 views

Is block reorg works in this way?

i need an expert to clarify is my understanding correct to block reorganization. I can't find answer can persuade me, sound like only i dunno what is block reorganization :(. say my bitcoin network ...
user avatar
2 votes
0 answers
85 views

Orphan blocks explorer

Is there any blockchain explorer that lists orphaned blocks or reorgs? How often does it happen in general? I only found this site which doesn't show any orphaned blocks after 2017: https://www....
user avatar
  • 123
1 vote
1 answer
74 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 ...
user avatar
1 vote
0 answers
84 views

Where can I find data for abandoned blocks (74,638 to 74,690) for the Value Overflow Incident when ₿184 billion BTC were accidentally created?

I already have data for all the Mainchain Blocks. Where can I find data for the orphaned/abandoned blocks (74,638 to 74,690) before the re-organisation occurred? I can only seem to find information ...
user avatar
3 votes
1 answer
58 views

What is the proper way to handle reorgs when fetching headers

I work on bitcoin-s, and we've found a problem where if a node is stopped with it's chain tip being a one that is later reorged out it will not be able to continue syncing headers. This happens ...
user avatar
4 votes
1 answer
307 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 ...
user avatar
  • 449
2 votes
1 answer
67 views

What are the reasons to avoid spend-paths that become invalid over time (without a transaction)?

I have been told that a spend-path that expires is something bitcoin designers have explicitly avoided, and that it would cause bad reorg behavior (eg here). To be clear about what I mean by an ...
user avatar
  • 1,491
0 votes
1 answer
86 views

Rewriting the blockchain?

The main bitcoin blockchain (the chain that miners choose to work on) is the chain with the most proof of work ("heaviest" chain). Currently, the cumulative proof of work on the bitcoin main ...
user avatar
0 votes
1 answer
53 views

Undo files format change and reorg process question for v0.19

This is a follow-up question for rev.dat file format Pieter Wuille gave a great explanation that is easy to follow. Since that posting there was a replacement of CTxInUndo with Coin, does the format ...
user avatar
1 vote
1 answer
197 views

Bitcoind not publishing blocks via ZMQ after reorganization

On the testnet, I am running a bitcoin core deamon (bitcoind) and am using ZMQ to receive updates about transactions and blocks (subscribed to both 'rawblock' and 'rawtx'). I was curious as to how ...
user avatar
  • 113
2 votes
1 answer
1k views

What is the length of largest known reorganization in bitcoin? [duplicate]

Usually there is an assumption, that a transaction is fully finalized after 6 confirmations, e.g. 6 blocks mined on top of the block, which includes given transaction. What is the length of largest ...
user avatar
2 votes
1 answer
379 views

Understanding getchaintips in terms of chain reorganisations

I'm trying to get an understanding of the chain reorganisations my node has experienced by looking at bitcoin-cli getchaintips. The "status" of the different branches tells me the following: 1. "...
user avatar
  • 2,788
1 vote
1 answer
357 views

bitcoin reorg question

if a block takes 10 minutes to be mined does it need 21 minutes to be reorged? if the reorg started immediately after the block was mined because 100% was mining and 51.5% will reorg how long does ...
user avatar
5 votes
1 answer
337 views

How long are orphaned or stale blocks kept in bitcoin core nodes memory?

If there was a chain reorg, for example: Blockchain: 0a---1a---2a---3a becomes... 0a---1a---2b---3b How long are blocks 2b and 3b kept in memory on the node? If I query the node for block 2b ...
user avatar
  • 197
1 vote
0 answers
55 views

how do I mark coins spent in invalid blocks as unspent?

I was just testing bitcoin (v17) in regtest mode with the local, built-in wallet. If I send money to an address (I don't own), generate 1, and then invalidate that block, the local wallet does not ...
user avatar
  • 179
0 votes
1 answer
96 views

Where is the code of chain reorganization in Bitcoin Core

I'm trying to understand how Bitcoin Core works in-depth. Can someone tell me where is the code executed during a blockchain reorganization in Bitcoin Core? Any explanation would also be greatly ...
user avatar
1 vote
1 answer
59 views

Is Block Finalization a valid development to remove the threat of 51% attacks?

https://www.reddit.com/r/btc/comments/bq8cqo/btctop_currently_has_51_hashing_power/eo2p4md?utm_source=share&utm_medium=web2x A recent comment from a Reddit user in response to BTC.top acquiring ...
user avatar
1 vote
2 answers
245 views

Why do large blocks increase the probability of chain reorgs?

After the recent two chain reorgs taking place in Bitcoin Cash SV, I am finding a number of developers stating that large blocks are the reason for the reorgs: "Almost each time someone is trying to ...
user avatar
0 votes
1 answer
82 views

Bitcoin fork resolution - Fork losers download previous blocks 'til common block?

When resolving a naturally occurring fork in Bitcoin, do the miners who were working on the orphaned fork download previous blocks from the miner who won the block reward that resolved the fork until ...
user avatar
1 vote
0 answers
91 views

confirmations: 0 vs confirmations: -1?

I'm looking at a bitcoin clone, not sure what codebase it was cloned from, but I've noticed that the listSinceBlock output sometimes includes: a receive that has 0 confirmations a send that has 0 ...
user avatar
3 votes
3 answers
989 views

Why you need to rehash each block after a changed block when changing data in a blockchain?

Maybe my question is stupid, but, why you need to rehash each block after a changed block when changing data in a blockchain? Each block contains a hash of its data and hash of previous block. If I ...
user avatar
  • 33
6 votes
2 answers
1k views

51% attack and rewriting to the latest checkpoint

This is not a question about the consequence of a 51% on the price nor as to the motivation of the attacker. Let say we don't care that it's not realistic and we don't care that the attacker wouldn't ...
user avatar
1 vote
1 answer
284 views

Why is the Bitcoin blockchain designed so that a block can be unconfirmed?

After a transaction is confirmed and included in a block, it is said to have a depth (confirmation) of one. However I've read that many companies require "multiple" confirmations (up to 6) ...
user avatar
  • 405
1 vote
2 answers
472 views

Valid block on top of invalid block

I have been researching a little on the concept of blockchain for some time now. If there is any corrupted block then others won't try to build blocks on top of it. But suppose for some time if it ...
user avatar
  • 11
1 vote
2 answers
530 views

What going to happend with transactions that is in both rejectend AND accepted chains?

I have been reading about blockchain forks and the longest chain situations and I cannot really understand what is going to happend in the situation when the transacton were included in both accepted ...
user avatar
  • 25
1 vote
0 answers
134 views

Bitcoinj stuck after chain split

I am using LevelDBFullPrunedBlockStore as a BlockChain. once in every 2-3 chainsplit in the network my bitcoinJ node stops to download new block. The scenario is always the same 1)My node get block ...
user avatar
  • 11
5 votes
2 answers
1k views

How to detect reorganization from bitcoind via ZMQ?

I have my own bitcoind server (bitcoin core) and receive transaction data from the bitcoind via ZMQ. Then the transactions are stored into my database for data analytics or statics. [bitcoind] --> (...
user avatar
  • 1,815
4 votes
1 answer
221 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 ...
user avatar
3 votes
2 answers
257 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 ...
user avatar
  • 155
0 votes
2 answers
277 views

What would happen if a private fork several hundred blocks ahead tried to merge back?

Suppose mining pool has been off the main network for a long time so that they are 100 or so blocks behind, but managed to mine 200 blocks in the period (say, some combination of had 33% before, ...
user avatar
  • 129
2 votes
2 answers
121 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 ...
user avatar
  • 121
2 votes
1 answer
207 views

In what scenarios can the blockchain size decrease for bitcoin?

I am running a private bitcoin network for which I changed the target time between two blocks to 12 seconds and the difficulty adjustment to 25 blocks interval. I ran the network for about 4 hours ...
user avatar
2 votes
1 answer
400 views

What happens to non-standard transactions in the case of a blockchain reorg?

Blockchain [m1]-> [m2] -> [m3] -> [m4] | -> [f1] -> [f2] -> [new] m - mainchain blocks f - fork blocks new - tip of the fork that is at greater height than the previous ...
user avatar
2 votes
1 answer
241 views

What would you do while a hard fork lasts?

It is conceivable (though generally buried with cognitive dissonance, I imagine) that a hard fork might not get resolved. This almost happened once before, and the miners picked the fork that solved ...
user avatar
1 vote
1 answer
544 views

Do we need to maintain the ability to do a reorg over 100 blocks?

The protocol requires that freshly generated coins wait 100 blocks before they can be spent in order to avoid polluting bitcoin addresses with bitcoins that are "uncreated" by a reorg that invalidates ...
user avatar
3 votes
1 answer
167 views

When an attacker publishes a longer chain, does Bitcoin Core emit a warning?

I tried answering a question about a majority-attacker's power to change the blockchain yesterday. There is one thing I haven't been able to get a clear picture on, yet: When a previously unknown ...
user avatar
  • 62.4k
3 votes
1 answer
729 views

Can an attacker with 51% of hash power change old blocks?

I read what an attacker with 51% of hash power can do in here and here. However, I want to know whether an attacker with 51% of hash power can change old blocks? For example, assume the attacker has ...
user avatar