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
1
vote
0answers
62 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. ...
1
vote
0answers
20 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 ...
7
votes
2answers
588 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
1answer
62 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 ...
2
votes
0answers
40 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....
1
vote
1answer
39 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 ...
1
vote
0answers
70 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 ...
3
votes
1answer
37 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 ...
4
votes
1answer
188 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
1answer
60 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 ...
0
votes
1answer
55 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 ...
0
votes
1answer
42 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 ...
1
vote
1answer
123 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 ...
2
votes
1answer
599 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 ...
1
vote
1answer
234 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. "...
1
vote
1answer
302 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 ...
5
votes
1answer
235 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 ...
1
vote
0answers
53 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 ...
0
votes
1answer
83 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 ...
1
vote
1answer
52 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 ...
1
vote
2answers
220 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 ...
0
votes
1answer
73 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 ...
1
vote
0answers
85 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 ...
3
votes
3answers
830 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 ...
6
votes
2answers
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 ...
1
vote
1answer
280 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) ...
1
vote
2answers
456 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 ...
1
vote
2answers
478 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 ...
1
vote
0answers
125 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 ...
5
votes
2answers
916 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] --> (...
4
votes
1answer
209 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
247 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 ...
0
votes
2answers
269 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, ...
2
votes
2answers
100 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 ...
2
votes
1answer
201 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 ...
2
votes
1answer
374 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 ...
2
votes
1answer
232 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 ...
1
vote
1answer
502 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 ...
3
votes
1answer
146 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 ...
3
votes
1answer
670 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 ...
1
vote
0answers
663 views

Mempool tracking

I'm trying to clear up some uncertainties around the mempool A tx comes in, its validated, and no other transactions have currently marked any of its inputs. Tx gets added to mempool. If a double ...
3
votes
1answer
571 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?
3
votes
1answer
301 views

What happens to my outgoing txs in a block reorganization?

Let's assume I create and send a series of txs: |------block A--------|------block B----------|----block C-----|----block D-----| |Tx1......Tx2.........|...Tx3.................|................|.........
3
votes
1answer
919 views

Conflicted transactions in blockchain reorganizations

When my service detects a conflicted transaction (either sent or received) it rollbacks everything that was logically built upon this transaction. The "problem" is that transactions can go from ...
2
votes
2answers
404 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
690 views

What happens to off chain transactions when the blockchain is reorganised?

Many companies seem to use off chain transactions to transfer bitcoins between their own customers. What happens when a side chain gains dominance and no longer contains a block with the underlying ...
5
votes
1answer
499 views

How frequent are side-chain reorganizations of various lengths?

I'm wondering if anyone has collected statistics on how often reorganizations of side-chains with length 1 happen in comparison with lengths of 2, 3, or more. Related: What is the longest chain ...
1
vote
1answer
119 views

Would it be possible to overtake the network by running a secluded mining operation for many years?

I have a scenario. Let's say I start my own Bitcoin mining on a secluded network. I leave this to mine for many years or even pass it down to future generations. To the very point that my chain is ...
8
votes
2answers
844 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 ...
0
votes
2answers
255 views

Why can't I create a fork of BTC that has no difficulty changes so I can premine the rest of the coins?

I don't want to necessarily do this, but what prevents this scenario from being possible? [just timestamps and a difficulty modifier alone? - if that's the case then why can't I modify the client to ...