server/asset/eth: forget reorg handling#2105
Merged
Merged
Conversation
chappjc
approved these changes
Feb 6, 2023
| } | ||
| if bhdr.Hash() == best.hash { | ||
| if bn == eth.bestHeight { | ||
| // Same hash, nothing to do. |
JoeGruffins
approved these changes
Feb 6, 2023
Member
JoeGruffins
left a comment
There was a problem hiding this comment.
According to https://www.paradigm.xyz/2021/07/ethereum-reorgs-after-the-merge#post-merge-ethereum-with-proof-of-stake
Finally, long reorgs are not possible because all blocks that are deeper than 2 epochs in the past are considered "finalized", i.e. it is impossible to revert past them. If an attacker caused two conflicting blocks to be finalized (e.g by controlling 67% of the stake), the system would need to fall back to social intervention to recover.
So, I think, if confirms are 3+ we are fine.
Member
|
Good find @JoeGruffins. I wonder what "social intervention to recover" is supposed to mean, panic mode and politicking I guess. |
chappjc
reviewed
Feb 6, 2023
| // reorganization. | ||
| update(true, false) | ||
| send(true, nil) | ||
| eth.log.Debugf("Tip change from %d to %d.", eth.bestHeight, bn) |
Member
There was a problem hiding this comment.
Final note that tip change log no longer includes the block hashes, and I'm fine with that.
If we really need the reorg bool and the best block hashes back, we can keep polling using eth_blockNumber, and put back the eth.node.headerByHeight call if the height has changed. At least the frequency will be more like 12 seconds instead of 1 sec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
re: #2104 (comment)
We don't use reorg. No need for complex tip change handling.