-
Notifications
You must be signed in to change notification settings - Fork 21.5k
eth: fix corner case in sync head determination #21695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
synchronisation failure when local header is ahead of local full block.
|
Could you give some more context here? In what scenarios would this happen, and why is the fix improving the situation? |
I integrate a BFT-based consensus into go-ethereum, and launch a 3 nodes network via docker-compose.yml. After shutdown and restart the cluster, one node(A) still have the latest header and block, but the other two node(B,C) just have latest header and it's parent block. In such a situation, B and C can't sync to the latest block. |
|
In your changes, did you change the rollback mechanism at sync failure? I don't understand how they can have the latest |
|
The thing about this change, is that it may possibly fix some cornercase you're experiencing with your modified version of the code, but we need to ensure that there's exactly no way that this change screws up with regular go-ethereum mainnet clients. And that's very hard to do, unless we spend a lot of time analyzing what the possible consequences are, and ensure that we have sufficient test coverage of every potential case. So it's very unlikely (imo) that we will accept this PR, unless it actually improves something or solves a problem relevant for ethereum mainnet clients. |
No, I don't change rollback mechanism at sync failure. |
holiman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This avoids synchronisation failures when the local header is ahead of the local full block.
synchronisation failure when local header is ahead of local full block.