Skip to main content

Questions tagged [chain-reorganization]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
320 views

Reorg on Optimism/Base

I was looking into the Optimism derivation spec and saw that it mentioned there are possibilities that Optimism/Base block can be reorged. One of them is due to consolidation failure. According to ...
johnhckuo's user avatar
  • 415
1 vote
1 answer
52 views

If blockhash changes, did block become uncle?

if I first get the block hash of a block at height A. Later on I get the block hash of the block at height A again, if the block hashes differ, does that mean the first block became uncle? Example ...
Filipe Aleixo's user avatar
1 vote
0 answers
15 views

Attesters consider attestations from other attesters at the same slot for getting head?

I was looking into ex-post reorg presentations and documents by Caspar Schwarz. https://vimeo.com/637529564 I got something awkward. In ex-post reorg explanation, it seems like attesters doesn't ...
mitmotw's user avatar
  • 31
2 votes
1 answer
38 views

Attestation on fork or reorg

Suppose a validator needs to do attestation for slot N. It sends the attestation but later discovers that there was a fork or reorg on slot N-1 (and that he attested for the wrong fork). Should he ...
Matheus Franco's user avatar
1 vote
1 answer
190 views

Does block number increase when a slot has no proposed block?

If a slot has no proposed block (ie an empty slot), does the block number still increase?
dbmikus's user avatar
  • 145
1 vote
2 answers
338 views

What is the best way to maintain a complete list of events using web3.py?

I need a complete in-order list of every event emitted by a specific contract, the list needs to be updated as each block is mined and it needs to be able to handle a chain reorganization gracefully (...
Noah McIlraith's user avatar
2 votes
0 answers
550 views

Listen for Reorganized Blocks using Web3js

Assuming there is a reorganization at block height N, the block with hash H being the forked block and H' the block that is the 'actual' one. 1. Will web3.eth.subscribe('newBlockHeaders' \[, callback\]...
l30c0d35's user avatar
8 votes
2 answers
523 views

What prevents miners from cooperating and causing intentional chain reorgs?

The top 5 ethereum mining pools currently have more than 60% of the network's hashrate. What prevents these pools from cooperating to cause planned reorgs? There could be many reasons to do it, like ...
Sam's user avatar
  • 103
3 votes
0 answers
187 views

When running a geth node, how can I know when reorg occur?

I want to add a script to notify the dev team if re-org bigger than 200 blocks took place. How can I achieve it?
user3652172's user avatar
2 votes
1 answer
700 views

Etherscan Forked Blocks' Reorg-Depth is Incorrect?

I suddenly found there is an reorg happened today whose depth is 3 on Etherscan.io here. The uncle blocks is at height 9919331 and the hash is ...
Troublor's user avatar
  • 169
2 votes
0 answers
145 views

Chain reorganisation: How often one confirmation transactions do not end up to the first block the wallet thinks

Currently web3.js wallets like MetaMask work so that they return the transaction receipt to the dApp as soon as the Ethereum node, connected internally by the wallet itself, sees one confirmation for ...
Mikko Ohtamaa's user avatar
0 votes
1 answer
2k views

What does MetaMask mean by stop injecting web3.js?

MetaMask announced that they will stop injecting web3.js here. I know previously MetaMask will add a global variable in browser window.web3 and this global lowercase web3 variable will be deprecated ...
Troublor's user avatar
  • 169
1 vote
2 answers
6k views

Web3.js eth.subscribe: on('changed', function(event){}) doesn't work with Metamask?

I write a demo DApp website with this javascript const web3 = new Web3(ethereum); const contractAddr = "0x0Aa27e4B13D5c08A8767B36a0ACb76ED4549B7EA"; const abi = ...; let inst = new ...
Troublor's user avatar
  • 169
2 votes
2 answers
714 views

How to test chain reorganization with testrpc?

I am working on blockchain synchronization script. I need a way to make reorganization programmatically for testing purposes. Is there such functionality in some testrpc?
Ivan Zakharov's user avatar
0 votes
1 answer
94 views

How does oraclize deal with chain reorg?

As title, does oraclize deal with the case where the query transaction and callback transaction are executed in different side chains? I mean in this situation: A-B \ B'->C->D->....' ...
Troublor's user avatar
  • 169
1 vote
1 answer
347 views

Transactions and smart contracts during reorganization

I learned from this question that transactions will be reverted and rollback after chain reorganization. But after a transaction is reverted, will the sender needs to resend this transaction? Or this ...
Troublor's user avatar
  • 169
2 votes
0 answers
113 views

How can I extract sidechains (transient forks) from a geth node before they get discarded?

According to my understanding, transient forks (also known as sidechains in geth's source code) are discarded or overwritten when a reorganization happens. But before that, when the node detects a ...
isra's user avatar
  • 56
1 vote
1 answer
300 views

Is it possible to get duplicates of the log events on Ethereum when we have a fork of the chain?

Let's suppose we have 2 chains of ethereum blockchain. When I fetching contract's log events from x block to getBlockNumber(). Will i get two or one the same log events from each block? Or ...
Andrei Vaulin's user avatar
0 votes
1 answer
344 views

What is the change in smart contract when the 'chain reorganizations'?

Recently I learned about 'chain reorganization'. What is the change in smart contract when the 'chain reorganizations'? for example, contract Contract{ event LOG_Increase(); uint sum = 0; ...
Errcode's user avatar
  • 15
8 votes
3 answers
2k views

Distribution of chain-reorganization events?

I'm curious about, for instance, the frequency of chain reorganizations, and the distribution of their depths. Is this information available anywhere? Mostly this is because I'm interested in rules ...
Alex Coventry's user avatar
1 vote
1 answer
585 views

Syncing events on Database - Dealing with blockchain reorganization

My Dapp relies on live events synchronization on a centralized database. There is always a server side script polling the blockchain for new events, parsing then and do the corresponding operations on ...
pan1994's user avatar
  • 169
6 votes
1 answer
372 views

In what cases if any, does a transaction get lost from the network forever?

Is it possible for a transaction that was included in the pending pool across multiple nodes, to become lost from the network forever (i.e. get dropped by all nodes)? If yes, in what cases is that ...
Dcompoze's user avatar
  • 387
3 votes
1 answer
2k views

Log index change during chain reorganization

While working with log filters i've noticed interesting behavior of logs during chain reorganizations. Sometimes same event (log) can have different logIndex in transaction after chain reorganizations....
Coder's user avatar
  • 43
9 votes
2 answers
2k views

Persistent "deep transaction reorg" whilst syncing full geth node

Whilst syncing a new full node using the geth comand "geth --syncmode full", every other line after a few hundred blocks I see the following: WARN [12-02|02:30:46] Skipping deep transaction reorg ...
AnotherGethUser's user avatar
7 votes
2 answers
1k views

Geth Websocket Behavior during reorganization

I have a question about the behaviour of Geth during re-org. Particularly, I am connecting to Geth web-socket to receive new blocks when they are discovered. Usually every 10 to 15 seconds I get a ...
user2058975's user avatar
2 votes
0 answers
471 views

Local ethereum node contain two different blocks but with same height

I am using geth node and found 2 different block with same number eth.getBlock("0x162ae4b189f77ed65d0be270aa8dea08d4e7dcd70432a7d1fd4e6b0fb1b301d6") { difficulty: 1001546728, extraData: "...
DeV1doR's user avatar
  • 637
1 vote
0 answers
146 views

How to test forked block on local machine?

Read this article How can I reliably induce a blockchain fork for testing purposes?. Example from that thread is outdated, and need to be refreshed. First my step is create initial chaindata from ...
DeV1doR's user avatar
  • 637
1 vote
0 answers
161 views

How to simulate orphaned/forked block locally? [duplicate]

I want to simulate orphaned block locally, it's possible to do this?
DeV1doR's user avatar
  • 637
8 votes
2 answers
3k views

What happens to transactions in orphaned/forked blocks?

From my investigation and reading a lot about this, it seems like the transaction is just removed and the ether returns back to some address. With Bitcoin, orphaned blocks are initially accepted by ...
DeV1doR's user avatar
  • 637
1 vote
2 answers
3k views

Chain Reorganization (TX HASH Change)

I would like to know is it possible that hash of transaction will change during chain reorganization? I noticed that difference is only between block number and block hash. Also, polling geth with ...
Coder's user avatar
  • 43
3 votes
1 answer
186 views

What is the accepted methodology for verifying the integrity of pulled chain data?

What is the accepted methodology of checking the integrity of a chain? If I poll my Geth/Parity node for block data using web3.js how can I confirm that the data returned is not going to be subject ...
Thomas Clowes's user avatar
8 votes
1 answer
1k views

Can a transaction get lost?

Given that I am connected to the network with at least one peer, can I be sure that a transaction I sent will be executed (either with fail or success)? Is there a possibility that it will never make ...
jeff's user avatar
  • 2,580
12 votes
1 answer
813 views

parity Ropsten testnet forked at block 296151?

I am seeing what looks like a fork in the Ropsten testnet at block 296151 (Jan 6, 11:14 PM UTC). Is this expected? My local Parity node (Parity/v1.4.7-beta-f2058bd-20161227/x86_64-macos/rustc1.13.0) ...
pyggie's user avatar
  • 578
38 votes
6 answers
8k views

How can a DApp detect a fork or chain reorganization using web3.js or additional libraries?

Take an example of a voting DApp. A user clicks on a vote button, then behind the scenes a transaction gets mined on the blockchain, and finally the DApp tells the user their vote has been recorded. ...
eth's user avatar
  • 86.5k
16 votes
1 answer
2k views

How should I handle blockchain forks in my DApp?

In the user interface of my DApp, how can I detect that a blockchain reorganization happened and what should I do to update the UI state once the fork is resolved?
J-B's user avatar
  • 8,971