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
0
votes
1answer
65 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 ...
1
vote
0answers
10 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?
6
votes
2answers
2k 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 ...
0
votes
1answer
236 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 ...
0
votes
2answers
494 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 ...
1
vote
1answer
61 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 ...
32
votes
5answers
4k 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. ...
1
vote
0answers
27 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 ...
2
votes
2answers
104 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?
0
votes
1answer
40 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->....' ...
1
vote
1answer
82 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 ...
5
votes
3answers
421 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 ...
7
votes
2answers
457 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 ...
2
votes
0answers
70 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 ...
9
votes
2answers
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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
126 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; ...
1
vote
1answer
158 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 ...
3
votes
1answer
712 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....
5
votes
1answer
213 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 ...
1
vote
0answers
315 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: "...
1
vote
0answers
118 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 ...
1
vote
0answers
143 views

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

I want to simulate orphaned block locally, it's possible to do this?
3
votes
1answer
149 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 ...
12
votes
1answer
741 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) ...
8
votes
1answer
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 ...
16
votes
1answer
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?