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.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
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
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
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
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
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
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
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
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
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